Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storcon: sk heartbeat fixes #10891

Merged
merged 5 commits into from
Feb 19, 2025
Merged

storcon: sk heartbeat fixes #10891

merged 5 commits into from
Feb 19, 2025

Conversation

arpad-m
Copy link
Member

@arpad-m arpad-m commented Feb 19, 2025

This PR does the following things:

  • The initial heartbeat round blocks the storage controller from becoming online again. If all safekeepers are unresponsive, this can cause storage controller startup to be very slow. The original intent of storcon: track safekeepers in memory, send heartbeats to them #10583 was that heartbeats don't affect normal functionality of the storage controller. So add a short timeout to prevent it from impeding storcon functionality.

  • Fix the URL of the utilization endpoint.

  • Don't send heartbeats to safekeepers which are decomissioned.

Part of #9011

context: https://neondb.slack.com/archives/C033RQ5SPDH/p1739966807592589

@arpad-m arpad-m changed the title Put a small timeout for initial sk heartbeats storcon: sk heartbeat fixes Feb 19, 2025
@arpad-m arpad-m requested a review from arssher February 19, 2025 13:43
@arpad-m arpad-m enabled auto-merge February 19, 2025 14:08
Copy link

github-actions bot commented Feb 19, 2025

7546 tests run: 7175 passed, 0 failed, 371 skipped (full report)


Flaky tests (5)

Postgres 17

Code coverage* (full report)

  • functions: 32.9% (8622 of 26200 functions)
  • lines: 48.9% (72729 of 148881 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
22e854c at 2025-02-19T17:05:28.436Z :recycle:

@arpad-m arpad-m added this pull request to the merge queue Feb 19, 2025
Merged via the queue into main with commit 9ba2a87 Feb 19, 2025
88 checks passed
@arpad-m arpad-m deleted the arpad/sk_initial_heartbeat_timeout branch February 19, 2025 17:03
arpad-m added a commit that referenced this pull request Feb 19, 2025
github-merge-queue bot pushed a commit that referenced this pull request Feb 19, 2025
Fix an issue caused by PR
#10891: we introduced the
concept of timeouts for heartbeats, where we would hang up on the other
side of the oneshot channel if a timeout happened (future gets
cancelled, receiver is dropped).

This hang up would make the heartbeat task panic when it did obtain the
response, as we unwrap the result of the result sending operation. The
panic would lead to the heartbeat task panicing itself, which is then
according to logs the last sign of life we of that process invocation.
I'm not sure what brings down the process, in theory tokio [should
continue](https://docs.rs/tokio/latest/tokio/runtime/enum.UnhandledPanic.html#variant.Ignore),
but idk.

Alternative to #10901.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants