Repository navigation
Refactor log router monitoring and re-recruitment - #12642
Conversation
This logic now is refactored to monitorAndRecruitWorkerSet() actor so that it can be reused for backup workers as well.
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
Result of foundationdb-pr-clang on Linux RHEL 9
|
Result of foundationdb-pr-clang-ide on Linux RHEL 9
|
Result of foundationdb-pr on Linux RHEL 9
|
Result of foundationdb-pr-cluster-tests on Linux RHEL 9
|
Result of foundationdb-pr-cluster-tests on Linux RHEL 9
|
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
Result of foundationdb-pr-clang-ide on Linux RHEL 9
|
Result of foundationdb-pr-clang on Linux RHEL 9
|
Result of foundationdb-pr-macos on macOS Ventura 13.x
|
Result of foundationdb-pr on Linux RHEL 9
|
Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x
|
dlambrig
left a comment
There was a problem hiding this comment.
one question and nit otherwise lgtm
| return Void(); | ||
| } | ||
| when(std::vector<int> failedWorkers = wait(monitor())) { | ||
| recruitment = recruit(failedWorkers); |
There was a problem hiding this comment.
Would there be a problem if recruitment were overwritten while a previous recruitment is still in flight, e.g., if wait(monitor()) fires twice?
There was a problem hiding this comment.
If wait(monitor()) fires twice, the second time this assignment will automatically cancel the first recruitment. If the first recruitment already finished, nothing bad here. Repeating recruitment a second time is safe, as consumers of log routers will learn from ServerDBInfo updates of new log routers and switch to use new log routers.
If the first recruitment hasn't finished, the second one would cancel it and does its own recruitment. Since monitor check all log routers. If there are some tags in the first recruitment, but not in the second, the monitor will notice them and fire again.
Since there is a delay(failedRecuitDelay) below, firing twice is unlikely to happen when the first recruitment has not finished, because recruitment is usually a few milliseconds.
| .detail("FailedCount", failedWorkers.size()); | ||
| } | ||
| when(wait(recruitment)) { | ||
| failedRecuitDelay = 1.0; // Reset backoff on success |
Result of foundationdb-pr-macos on macOS Ventura 13.x
|
Result of foundationdb-pr-clang-ide on Linux RHEL 9
|
Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x
|
Result of foundationdb-pr on Linux RHEL 9
|
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
Result of foundationdb-pr-clang on Linux RHEL 9
|
Result of foundationdb-pr-cluster-tests on Linux RHEL 9
|
|
ctest failure is unrelated: |
|
Another is s3 test, also unrelated. cc @saintstack |
Result of foundationdb-pr on Linux RHEL 9
|
File read can't be cancelled, so we have to hold on the buffer and issue reads. This was found in apple#12642 test, seed: -f ./tests/slow/BulkDumpingS3WithChaos.toml -s 1554084314 -b off
This logic now is refactored to monitorAndRecruitWorkerSet() actor so that it can be reused for backup workers as well.
This was part of #12564, split from that PR for easy review.
20260116-003003-jzhou-a3261de59a2924df compressed=True data_size=34492678 duration=3538624 ended=100000 fail=1 fail_fast=10 max_runs=100000 pass=99999 priority=100 remaining=0 runtime=1:03:52 sanity=False started=100000 stopped=20260116-013355 submitted=20260116-003003 timeout=5400 username=jzhou
The failure is a newly added test
-f ./tests/slow/BulkDumpingS3WithChaos.toml -s 1554084314 -b offcc @saintstack
Code-Reviewer Section
The general pull request guidelines can be found here.
Please check each of the following things and check all boxes before accepting a PR.
For Release-Branches
If this PR is made against a release-branch, please also check the following:
release-branchormainif this is the youngest branch)