Fix peer disconnect detection in waitValueOrSignal#12935
Merged
spraza merged 2 commits intoapple:release-7.3from Apr 13, 2026
Merged
Fix peer disconnect detection in waitValueOrSignal#12935spraza merged 2 commits intoapple:release-7.3from
spraza merged 2 commits intoapple:release-7.3from
Conversation
Contributor
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
Contributor
Result of foundationdb-pr-cluster-tests on Linux RHEL 9
|
Contributor
Result of foundationdb-pr on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-clang on Linux RHEL 9
|
ebd2114 to
0fdc2e8
Compare
Contributor
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
Add a when() clause watching peer->disconnect in waitValueOrSignal (genericactors.actor.h) so dead connections (e.g., from NAT timeouts) are detected immediately instead of hanging indefinitely waiting on a connection the lower layer has already replaced. We saw this in an incident where waiting on a long reply on a network with frequent disconnects; low level fdb would make a new connection but high-level would wait until we timed out on the original. Includes unit tests for the peer disconnect detection.
Contributor
Result of foundationdb-pr-clang on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-cluster-tests on Linux RHEL 9
|
Contributor
Result of foundationdb-pr on Linux RHEL 9
|
0fdc2e8 to
157f046
Compare
Contributor
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
Contributor
Result of foundationdb-pr-cluster-tests on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-clang on Linux RHEL 9
|
Contributor
Result of foundationdb-pr on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x
|
Contributor
Result of foundationdb-pr-macos on macOS Ventura 13.x
|
Collaborator
gxglass
approved these changes
Apr 10, 2026
Collaborator
gxglass
left a comment
There was a problem hiding this comment.
Looks great. I took the liberty of penciling this in as an addition AI on the postmortem where this was involved.
spraza
approved these changes
Apr 10, 2026
Contributor
Author
Contributor
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
Contributor
Result of foundationdb-pr-clang on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-cluster-tests on Linux RHEL 9
|
Contributor
Result of foundationdb-pr on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x
|
Contributor
Result of foundationdb-pr-macos on macOS Ventura 13.x
|
saintstack
added a commit
to saintstack/foundationdb
that referenced
this pull request
Apr 18, 2026
Forward-port from 7.3 to 7.4. Add a when() clause watching peer->disconnect in waitValueOrSignal (genericactors.actor.h) so dead connections (e.g., from NAT timeouts) are detected immediately instead of hanging indefinitely waiting on a connection the lower layer has already replaced. We saw this in an incident where waiting on a long reply on a network with frequent disconnects; low level fdb would make a new connection but high-level would wait until we timed out on the original. Includes unit tests for the peer disconnect detection.
saintstack
added a commit
to saintstack/foundationdb
that referenced
this pull request
Apr 24, 2026
Forward-port from 7.3 to 7.4. Add a when() clause watching peer->disconnect in waitValueOrSignal (genericactors.actor.h) so dead connections (e.g., from NAT timeouts) are detected immediately instead of hanging indefinitely waiting on a connection the lower layer has already replaced. We saw this in an incident where waiting on a long reply on a network with frequent disconnects; low level fdb would make a new connection but high-level would wait until we timed out on the original. Includes unit tests for the peer disconnect detection.
saintstack
added a commit
that referenced
this pull request
Apr 27, 2026
* Fix peer disconnect detection in waitValueOrSignal (#12935) Forward-port from 7.3 to 7.4. Add a when() clause watching peer->disconnect in waitValueOrSignal (genericactors.actor.h) so dead connections (e.g., from NAT timeouts) are detected immediately instead of hanging indefinitely waiting on a connection the lower layer has already replaced. We saw this in an incident where waiting on a long reply on a network with frequent disconnects; low level fdb would make a new connection but high-level would wait until we timed out on the original. Includes unit tests for the peer disconnect detection. * Add suppressFor to WaitValueOrSignalPeerDisconnect and remove redundant include
saintstack
added a commit
that referenced
this pull request
May 5, 2026
* Fix peer disconnect detection in waitValueOrSignal (#12935) Forward-port from 7.3 to main. Add a when() clause watching peer->disconnect in waitValueOrSignal (genericactors.actor.h) so dead connections (e.g., from NAT timeouts) are detected immediately instead of hanging indefinitely waiting on a connection the lower layer has already replaced. We saw this in an incident where waiting on a long reply on a network with frequent disconnects; low level fdb would make a new connection but high-level would wait until we timed out on the original. Includes unit tests for the peer disconnect detection. * Remove redundant FlowTransport.h include (already included via fdbrpc.h) * Address PR feedback: check knownUnauthorized on peer disconnect, fix test comments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Add a when() clause watching peer->disconnect in waitValueOrSignal (genericactors.actor.h) so dead connections (e.g., from NAT timeouts) are detected immediately instead of hanging indefinitely waiting on a connection the lower layer has already replaced.
We saw this in an incident where waiting on a long reply on a network with frequent disconnects; low level fdb would make a new connection but high-level would wait until we timed out on the original.
Here is a diagram showing where we'd get stuck :
Here's the call chain showing where requests get stuck:
Also fixes compile errors with fmt::join and template specializations that appear with newer compilers.
Includes unit tests for the peer disconnect detection.
20260409-211017-stack-79f3f7f73910ccd5 compressed=True data_size=50913761 duration=4223818 ended=100000 fail_fast=10 max_runs=100000 pass=100000 priority=100 remaining=0 runtime=0:50:46 sanity=False started=100000 stopped=20260409-220103 submitted=20260409-211017 timeout=5400 username=stack