Skip to content

[release-7.3] Process ranges in chunks when evicting stale peers - #13643

Merged
spraza merged 2 commits into
apple:release-7.3from
spraza:stalepeer-chunkRanges-v2-on7.3.77
Jul 8, 2026
Merged

spraza merged 2 commits into
apple:release-7.3from
spraza:stalepeer-chunkRanges-v2-on7.3.77

Conversation

@spraza

@spraza spraza commented Jul 2, 2026 •

Copy link
Copy Markdown
Collaborator

Problem: On every sweep of the eviction actor, invalidateCacheByAddresses is called, which invalidates all cached ranges mapping to stale servers. However, invalidateCacheByAddresses was a blocking call with runtime complexity O(|cached ranges|), which can be as high as 600K (based on the LOCATION_CACHE_EVICTION_SIZE knob default). It is unclear whether this is actually a problem in practice e.g., hogging the main event loop for too long could prevent other critical tasks from making progress. This change is a preemptive fix in case invalidateCacheByAddresses turns out to be too expensive for realistic workloads.

Solution: Introduce a chunk-size knob. invalidateCacheByAddresses now processes ranges in chunks of up to this knob value, yielding before processing the next chunk.

Testing: Simulation testing was done to ensure correctness i.e., that this does not break general DB functionality, and that we continue to fix the stale peer issue. See results below.

Ran 250K general test suite: 20260702-221148-praza-stalepeer-chunkRanges-v2-on7.3.77-25f8 compressed=True data_size=34949681 duration=5923005 ended=250000 fail=2 fail_fast=10 max_runs=250000 pass=249998 priority=100 remaining=0 runtime=1:13:55 sanity=False started=250000 stopped=20260702-232543 submitted=20260702-221148 timeout=5400 username=praza-stalepeer-chunkRanges-v2-on7.3.77-25f80264e08efbc72f892955dd2604ef87d3c46f. Both failures are not related.

Ran StalePeerTest specifically 10K times: 20260702-221157-praza-stalepeer-chunkRanges-v2-on7.3.77-25f8 compressed=True data_size=34984822 duration=340545 ended=10000 fail_fast=100 max_runs=10000 pass=10000 priority=100 remaining=0 runtime=0:10:22 sanity=False started=10000 stopped=20260702-222219 submitted=20260702-221157 timeout=5400 username=praza-stalepeer-chunkRanges-v2-on7.3.77-25f80264e08efbc72f892955dd2604ef87d3c46f

wait(yield());
}

// Phase 2: invalidate the cache based on invalid ranges computed in Phase 1

@spraza spraza Jul 2, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: phase 2 may not need chunking assuming rangesToInvalidate.size() is not too high e.g. O(1K). But given we already have a way to chunk, does not hurt to have an option on hand in case we discover too many invalid ranges for some problematics workload.

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-macos-m1 on macOS 14.x

  • Commit ID: 25f8026
  • Duration 0:32:34
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@spraza
spraza requested review from alecgrieser and johscheuer July 2, 2026 22:57
@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-clang on Linux RHEL 9

  • Commit ID: 25f8026
  • Duration 0:43:16
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-macos on macOS 14.x

  • Commit ID: 25f8026
  • Duration 0:47:39
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-clang-73 on Linux CentOS 7

  • Commit ID: 25f8026
  • Duration 0:49:40
  • Result: ❌ FAILED
  • Error: Error while executing command: if python3 -m joshua.joshua list --stopped | grep ${ENSEMBLE_ID} | grep -q 'pass=10[0-9][0-9][0-9]'; then echo PASS; else echo FAIL && exit 1; fi. Reason: exit status 1
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-73 on Linux CentOS 7

  • Commit ID: 8b5700d
  • Duration 0:42:14
  • Result: ❌ FAILED
  • Error: Error while executing command: ctest -j ${NPROC} --no-compress-output -T test --output-on-failure. Reason: exit status 8
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-macos-m1 on macOS 14.x

  • Commit ID: 8b5700d
  • Duration 0:47:46
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-cluster-tests-73 on Linux CentOS 7

  • Commit ID: 25f8026
  • Duration 0:59:47
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)
  • Cluster Test Logs zip file of the test logs (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-73 on Linux CentOS 7

  • Commit ID: 25f8026
  • Duration 1:00:07
  • Result: ❌ FAILED
  • Error: Error while executing command: if python3 -m joshua.joshua list --stopped | grep ${ENSEMBLE_ID} | grep -q 'pass=10[0-9][0-9][0-9]'; then echo PASS; else echo FAIL && exit 1; fi. Reason: exit status 1
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr on Linux RHEL 9

  • Commit ID: 25f8026
  • Duration 1:00:58
  • Result: ❌ FAILED
  • Error: Error while executing command: if python3 -m joshua.joshua list --stopped | grep ${ENSEMBLE_ID} | grep -q 'pass=10[0-9][0-9][0-9]'; then echo PASS; else echo FAIL && exit 1; fi. Reason: exit status 1
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-clang-73 on Linux CentOS 7

  • Commit ID: 8b5700d
  • Duration 0:51:18
  • Result: ❌ FAILED
  • Error: Error while executing command: if python3 -m joshua.joshua list --stopped | grep ${ENSEMBLE_ID} | grep -q 'pass=10[0-9][0-9][0-9]'; then echo PASS; else echo FAIL && exit 1; fi. Reason: exit status 1
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-clang on Linux RHEL 9

  • Commit ID: 8b5700d
  • Duration 0:53:25
  • Result: ❌ FAILED
  • Error: Error while executing command: if python3 -m joshua.joshua list --stopped | grep ${ENSEMBLE_ID} | grep -q 'pass=10[0-9][0-9][0-9]'; then echo PASS; else echo FAIL && exit 1; fi. Reason: exit status 1
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr on Linux RHEL 9

  • Commit ID: 8b5700d
  • Duration 0:58:18
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-cluster-tests-73 on Linux CentOS 7

  • Commit ID: 8b5700d
  • Duration 1:04:16
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)
  • Cluster Test Logs zip file of the test logs (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-macos on macOS 14.x

  • Commit ID: 8b5700d
  • Duration 1:18:02
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@alecgrieser alecgrieser left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. There are a few places where, theoretically, the extra yields could lead to some unnecessary cache invalidations, I think, which theoretically, we could think about tightening up, but nothing that I think is too likely to happen in practice

auto& loc = iter->value();
for (int i = 0; i < loc->size(); ++i) {
if (addresses.contains(loc->getInterface(i).address())) {
rangesToInvalidate.push_back(KeyRange(KeyRangeRef(iter->begin(), iter->end())));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be converted from a KeyRangeRef to ensure correctness somehow, or would it be possible to keep it as just a reference?

@spraza spraza Jul 7, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

converted from a KeyRangeRef

You mean not have a reference and rather a deep copy? If so, that was my intent with KeyRange(KeyRangeRef(iter->begin().... KeyRange is Standalone<KeyRangeRef>, so it deep copies the underlying bytes.

would it be possible to keep it as just a reference

Between yields, the key range reference obtained via the iterator points into location cache tree nodes, which may be freed, leaving it dangling. So to be safe, I did the deep copy above.

// Evicts cached ranges mapping to any server address in the input addresses set
// Yields every LOCATION_CACHE_PEER_EVICTOR_SCAN_CHUNK ranges
ACTOR static Future<Void> invalidateCacheByAddresses(DatabaseContext* self,
std::unordered_set<NetworkAddress> addresses) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to worry about the case that one of the addresses comes back to life in the middle of a sweep? If that were to happen, then it seems like we may evict its ranges right after inserting it, which could lead to unnecessary cache refetches. Which probably isn't the end of the world

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that is a valid tradeoff. In practice, I don't expect it to matter, but let me add a comment for completeness.

state int phase2Yields = 0;
state double phase2StartT = now();
for (; phase2Idx < rangesToInvalidate.size(); phase2Idx++) {
self->locationCache.insert(rangesToInvalidate[phase2Idx], Reference<LocationInfo>());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to the case that there's an address that comes back to life, it is possible that we have already reloaded a range into the location cache during a yield (I think), which could mean that we invalidate it here unnecessarily. Like with above, I think the worst case is we end up re-loading something into the cache that never needed to be invalidated

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as earlier comment: yes, that is a valid tradeoff. In practice, I don't expect it to matter, but let me add a comment for completeness.

@spraza
spraza requested a review from gxglass July 3, 2026 17:13
// Value must be >= 1 (evictor will assert otherwise).
// If this value is > LOCATION_CACHE_EVICTION_SIZE, then this will boil down to blocking
// invalidation without any yields in between.
int LOCATION_CACHE_PEER_EVICTOR_SCAN_CHUNK;

@gxglass gxglass Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think we could get away with 1 less knob by making the loop time itself (sample the clock every say 1000 entries) and doing say 10ms of work per turn? Essentially this has the code calculate a reasonable value for this parameter at runtime.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that should be possible. Assuming 1000 or 10ms above are hard coded and not knobs?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given we've done fair amount of testing on the current commit hash, let me tackle this suggestion in a small follow-up PR.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that should be possible. Assuming 1000 or 10ms above are hard coded and not knobs?

Right. 1000 is just to avoid sampling the clock too frequently in this loop which I think does not need a knob (it's specific to the rest of the code in the loop more than anything else). the 10ms is generic in nature and may not benefit by being a named constant or knob with semantics like "how much CPU intensive background maintenance work to do before yielding". Even then I don't see why we'd need to change the 10ms. The main thing about it is that it has a reasonable bound altogether (alternatives may not).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, 10 ms also seems like quite a bit of time to be paused in the middle of trying to, say, read an FDB key, though not the end of the world if it's not chronic. Maybe more to the point, I think it gets hard to simulation test because of when the simulated clock gets updated

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(thinking more)

I think the first question is whether we need size (process N entries before yielding) based chunking or time based (do >= 10ms amount of work before yielding). In the past, for different use-case, I've done both. I think here, either would work. Honestly, one can be derived from another anyway (although requires observability from prod).

Time based chunking sounds more like what we'd want since the whole point is to give time to other critical tasks. So let's say we converge on that.

Then the question is: can it be fixed to 10ms or does it have to be a knob for various reasons? Perhaps we can have a knob and have it be default to 10ms (and potentially some other value for simulation). We don't expect to change the 10ms so hopefully no one (other than us right now) has to even know that chunking is happening.

@gxglass @alecgrieser does that sound good? Basically my proposal is:

  • switch to time based chunking
  • have a knob (10ms for prod, maybe some other value for sim). Expect no one to have to tune the knob but it's there in case we need it (prod shows behavior where it needs tuning, reduce simulation noise, etc.).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe see if there is a general solution lurking here for code paths that just want to do a bunch of background maintenance and yield periodically. Anyway fine to pick this up later or main-only.

@johscheuer johscheuer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Comment thread fdbclient/ClientKnobs.cpp
init( LOCATION_CACHE_PEER_EVICTOR_ENABLED, false ); if( randomize && isSimulated ) LOCATION_CACHE_PEER_EVICTOR_ENABLED = deterministicRandom()->coinflip();
init( LOCATION_CACHE_PEER_EVICTOR_DELAY, 60.0 );
init( LOCATION_CACHE_PEER_EVICTOR_FAILED_THRESHOLD, 0 );
init( LOCATION_CACHE_PEER_EVICTOR_SCAN_CHUNK, 1000000 ); if( randomize && BUGGIFY ) LOCATION_CACHE_PEER_EVICTOR_SCAN_CHUNK = deterministicRandom()->randomInt(1, 11);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason we choose 1000000 and not 600000 similar to LOCATION_CACHE_EVICTION_SIZE?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just so that by default, we don't do chunking. But now that we've done some more at-scale testing, I can verify the results and do chunking by default. Having said that, I'm thinking to delete this knob as part of #13643 (comment).

@spraza spraza closed this Jul 7, 2026
@spraza spraza reopened this Jul 7, 2026
@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-macos-m1 on macOS 14.x

  • Commit ID: 8b5700d
  • Duration 0:32:31
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-clang on Linux RHEL 9

  • Commit ID: 8b5700d
  • Duration 0:35:56
  • Result: ❌ FAILED
  • Error: Error while executing command: if python3 -m joshua.joshua list --stopped | grep ${ENSEMBLE_ID} | grep -q 'pass=10[0-9][0-9][0-9]'; then echo PASS; else echo FAIL && exit 1; fi. Reason: exit status 1
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-clang-73 on Linux CentOS 7

  • Commit ID: 8b5700d
  • Duration 0:39:22
  • Result: ❌ FAILED
  • Error: Error while executing command: if python3 -m joshua.joshua list --stopped | grep ${ENSEMBLE_ID} | grep -q 'pass=10[0-9][0-9][0-9]'; then echo PASS; else echo FAIL && exit 1; fi. Reason: exit status 1
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-73 on Linux CentOS 7

  • Commit ID: 8b5700d
  • Duration 0:47:59
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr on Linux RHEL 9

  • Commit ID: 8b5700d
  • Duration 0:48:28
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-cluster-tests-73 on Linux CentOS 7

  • Commit ID: 8b5700d
  • Duration 1:00:18
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)
  • Cluster Test Logs zip file of the test logs (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-macos on macOS 14.x

  • Commit ID: 8b5700d
  • Duration 1:12:46
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@spraza
spraza force-pushed the stalepeer-chunkRanges-v2-on7.3.77 branch from 8b5700d to a2085a9 Compare July 8, 2026 06:12
@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-macos-m1 on macOS 14.x

  • Commit ID: a2085a9
  • Duration 0:33:43
  • Result: ❌ FAILED
  • Error: Error while executing command: ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ${HOME}/.ssh_key ec2-user@${MAC_EC2_HOST} /opt/homebrew/bin/bash --login ./build_pr_macos.sh. Reason: exit status 8
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-73 on Linux CentOS 7

  • Commit ID: a2085a9
  • Duration 0:36:33
  • Result: ❌ FAILED
  • Error: Error while executing command: python3 -m joshua.joshua list --stopped | grep ${ENSEMBLE_ID}. Reason: exit status 2
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-clang-73 on Linux CentOS 7

  • Commit ID: a2085a9
  • Duration 0:40:01
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-clang on Linux RHEL 9

  • Commit ID: a2085a9
  • Duration 0:40:16
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr on Linux RHEL 9

  • Commit ID: a2085a9
  • Duration 0:48:13
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-macos on macOS 14.x

  • Commit ID: a2085a9
  • Duration 1:08:51
  • Result: ❌ FAILED
  • Error: Error while executing command: ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ${HOME}/.ssh_key ec2-user@${MAC_EC2_HOST} /usr/local/bin/bash --login ./build_pr_macos.sh. Reason: exit status 8
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-cluster-tests-73 on Linux CentOS 7

  • Commit ID: a2085a9
  • Duration 2:22:30
  • Result: ❌ FAILED
  • Error: Error while executing command: if $fail_test; then exit 1; fi. Reason: exit status 1
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)
  • Cluster Test Logs zip file of the test logs (available for 30 days)

@spraza spraza closed this Jul 8, 2026
@spraza spraza reopened this Jul 8, 2026
@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-cluster-tests-73 on Linux CentOS 7

  • Commit ID: a2085a9
  • Duration 2:13:51
  • Result: ❌ FAILED
  • Error: Error while executing command: if $fail_test; then exit 1; fi. Reason: exit status 1
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)
  • Cluster Test Logs zip file of the test logs (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-clang-73 on Linux CentOS 7

  • Commit ID: a2085a9
  • Duration 0:39:30
  • Result: ❌ FAILED
  • Error: Error while executing command: if python3 -m joshua.joshua list --stopped | grep ${ENSEMBLE_ID} | grep -q 'pass=10[0-9][0-9][0-9]'; then echo PASS; else echo FAIL && exit 1; fi. Reason: exit status 1
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-macos-m1 on macOS 14.x

  • Commit ID: a2085a9
  • Duration 0:50:59
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-73 on Linux CentOS 7

  • Commit ID: a2085a9
  • Duration 0:47:54
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-clang on Linux RHEL 9

  • Commit ID: a2085a9
  • Duration 0:48:20
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr on Linux RHEL 9

  • Commit ID: a2085a9
  • Duration 0:53:42
  • Result: ❌ FAILED
  • Error: Error while executing command: if python3 -m joshua.joshua list --stopped | grep ${ENSEMBLE_ID} | grep -q 'pass=10[0-9][0-9][0-9]'; then echo PASS; else echo FAIL && exit 1; fi. Reason: exit status 1
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-73 on Linux CentOS 7

  • Commit ID: a2085a9
  • Duration 0:54:39
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-macos-m1 on macOS 14.x

  • Commit ID: a2085a9
  • Duration 1:09:47
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-macos on macOS 14.x

  • Commit ID: a2085a9
  • Duration 1:46:53
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-clang-73 on Linux CentOS 7

  • Commit ID: a2085a9
  • Duration 0:36:39
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr on Linux RHEL 9

  • Commit ID: a2085a9
  • Duration 0:44:01
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-cluster-tests-73 on Linux CentOS 7

  • Commit ID: a2085a9
  • Duration 2:05:22
  • Result: ❌ FAILED
  • Error: Error while executing command: if $fail_test; then exit 1; fi. Reason: exit status 1
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)
  • Cluster Test Logs zip file of the test logs (available for 30 days)

@spraza
spraza merged commit 805c271 into apple:release-7.3 Jul 8, 2026
2 checks passed
@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-macos on macOS 14.x

  • Commit ID: a2085a9
  • Duration 2:28:59
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-cluster-tests-73 on Linux CentOS 7

  • Commit ID: a2085a9
  • Duration 2:20:11
  • Result: ❌ FAILED
  • Error: `Error while executing command: cd ${CODEBUILD_SRC_DIR}

summary / time info

for f in fdb-kubernetes-/logs/.log); do
echo ; echo "$f :"
grep -A3 -E '^Ran [0-9]+ of [0-9]+ Specs in' "$f" || echo "TIMEOUT/PANIC"
done

check all fail types

fail_test=false
if [ -n "${FDB_K8S_TESTS_FAIL:-}" ]; then
echo "FAIL: fdb-kubernetes-tests"
fail_test=true
fi
if [ -n "${FDB_E2E_TESTS_FAIL:-}" ]; then
echo "FAIL: fdb-kubernetes-operator/e2e tests"
fail_test=true
fi

Check for test failures where one or more tests have failed for a test suite.

if grep -q -- "--- FAIL:" fdb-kubernetes-/logs/.log ; then
for f in $(grep -l -- "--- FAIL:" fdb-kubernetes-/logs/.log); do
echo "======================================================================"
echo "FAILED: $f"
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
tail -n90 "$f"
echo "----------------------------------------------------------------------"
done
fail_test=true
fi

Check for all tests that have not finished e.g. because they timed out or they paniced during the execution.

for f in $(grep -L -- "SUCCESS! --" fdb-kubernetes-/logs/.log); do
if ! grep -q -- "--- FAIL:" $f; then
echo "======================================================================"
echo "TIMEOUT/PANIC: $f"
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
tail -n90 "$f"
echo "----------------------------------------------------------------------"
fail_test=true
fi
done
. Reason: exit status 2`

spraza added a commit to spraza/foundationdb that referenced this pull request Aug 19, 2026
…, grv proxy)

Client processes can keep stale RequestStream references to dead
storage-server/proxy peers (via DatabaseContext::locationCache and
MonitorLeader::shrinkProxyList's sampled subset), causing connection-timeout
churn. Adds opt-in draining of dead-peer connections: a per-DatabaseContext
peer evictor driven by a persistent per-address connect-failed counter, a
shrinkProxyList cache clear below the connection cap, eager proxy rebuild on
clientInfo change, and an InterfaceTracker observability layer (all gated by
knobs, default off in production). invalidateCacheByAddress(es) processes
ranges in chunks and yields between chunks to avoid hogging the event loop
on large caches. Includes StalePeerTest, a deterministic repro workload.

Ported from upstream/release-7.3 PR apple#13367 (51e1c42)
and PR apple#13643 (805c271).
Conflicts resolved in: tests/CMakeLists.txt, fdbclient/NativeAPI.actor.cpp,
fdbclient/include/fdbclient/CommitProxyInterface.h,
fdbclient/include/fdbclient/StorageServerInterface.h,
fdbrpc/include/fdbrpc/FlowTransport.h, fdbserver/SimulatedCluster.actor.cpp.
spraza added a commit that referenced this pull request Aug 20, 2026
…, grv proxy) (#13912)

Client processes can keep stale RequestStream references to dead
storage-server/proxy peers (via DatabaseContext::locationCache and
MonitorLeader::shrinkProxyList's sampled subset), causing connection-timeout
churn. Adds opt-in draining of dead-peer connections: a per-DatabaseContext
peer evictor driven by a persistent per-address connect-failed counter, a
shrinkProxyList cache clear below the connection cap, eager proxy rebuild on
clientInfo change, and an InterfaceTracker observability layer (all gated by
knobs, default off in production). invalidateCacheByAddress(es) processes
ranges in chunks and yields between chunks to avoid hogging the event loop
on large caches. Includes StalePeerTest, a deterministic repro workload.

Ported from upstream/release-7.3 PR #13367 (51e1c42)
and PR #13643 (805c271).
Conflicts resolved in: tests/CMakeLists.txt, fdbclient/NativeAPI.actor.cpp,
fdbclient/include/fdbclient/CommitProxyInterface.h,
fdbclient/include/fdbclient/StorageServerInterface.h,
fdbrpc/include/fdbrpc/FlowTransport.h, fdbserver/SimulatedCluster.actor.cpp.
spraza added a commit that referenced this pull request Sep 17, 2026
* Fix stale peers for client facing roles (storage server, commit proxy, grv proxy) (#13912)

Client processes can keep stale RequestStream references to dead
storage-server/proxy peers (via DatabaseContext::locationCache and
MonitorLeader::shrinkProxyList's sampled subset), causing connection-timeout
churn. Adds opt-in draining of dead-peer connections: a per-DatabaseContext
peer evictor driven by a persistent per-address connect-failed counter, a
shrinkProxyList cache clear below the connection cap, eager proxy rebuild on
clientInfo change, and an InterfaceTracker observability layer (all gated by
knobs, default off in production). invalidateCacheByAddress(es) processes
ranges in chunks and yields between chunks to avoid hogging the event loop
on large caches. Includes StalePeerTest, a deterministic repro workload.

Ported from upstream/release-7.3 PR #13367 (51e1c42)
and PR #13643 (805c271).
Conflicts resolved in: tests/CMakeLists.txt, fdbclient/NativeAPI.actor.cpp,
fdbclient/include/fdbclient/CommitProxyInterface.h,
fdbclient/include/fdbclient/StorageServerInterface.h,
fdbrpc/include/fdbrpc/FlowTransport.h, fdbserver/SimulatedCluster.actor.cpp.

(cherry picked from commit 2963ee8)

* Enable stale peer fixes by default on main/8.0

Flip the three stale-peer client-facing mitigation knobs from off to on by
default now that they have had bake time on 7.3/7.4:
  - location_cache_peer_evictor_enabled
  - shrink_proxy_list_clear_cache_below_threshold
  - dbcontext_eager_proxy_update

The forward-port landed these off by default (opt-in). By the 8.0 cut they
will have had sufficient production bake time, so main should ship with them
on. The simulation randomization (coinflip under randomize && isSimulated) is
left unchanged, so simulation still exercises both on and off states; only the
production default changes. The stale_peer_observability tracing knob is
intentionally left off (it is a debug aid, not a mitigation, and carries
overhead).

* fix clang-format

* fix clang-tidy
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.

5 participants