[RELEASE-7.1] Refactor locality-based exclusion checks to reduce additional overhead#11835
Merged
jzhou77 merged 6 commits intoDec 19, 2024
Conversation
Contributor
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
Contributor
Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x
|
Contributor
Result of foundationdb-pr-macos on macOS Ventura 13.x
|
Contributor
Result of foundationdb-pr-clang on Linux CentOS 7
|
Contributor
Result of foundationdb-pr-cluster-tests on Linux CentOS 7
|
Contributor
Result of foundationdb-pr on Linux CentOS 7
|
Contributor
Author
|
Simulation runs: |
Contributor
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
Contributor
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
Contributor
Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x
|
Contributor
Result of foundationdb-pr-clang on Linux CentOS 7
|
Contributor
Result of foundationdb-pr-macos on macOS Ventura 13.x
|
Contributor
Result of foundationdb-pr-cluster-tests on Linux CentOS 7
|
Contributor
Result of foundationdb-pr on Linux CentOS 7
|
Contributor
Result of foundationdb-pr-cluster-tests on Linux CentOS 7
|
Contributor
Result of foundationdb-pr-clang on Linux CentOS 7
|
Contributor
Result of foundationdb-pr on Linux CentOS 7
|
…he failed flag is set to true
Contributor
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
Contributor
Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x
|
Contributor
Result of foundationdb-pr-macos on macOS Ventura 13.x
|
Contributor
Result of foundationdb-pr-clang on Linux CentOS 7
|
Contributor
Result of foundationdb-pr-cluster-tests on Linux CentOS 7
|
Contributor
Result of foundationdb-pr on Linux CentOS 7
|
jzhou77
requested changes
Dec 13, 2024
Contributor
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
Contributor
Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x
|
Contributor
Result of foundationdb-pr-macos on macOS Ventura 13.x
|
Contributor
Result of foundationdb-pr-clang on Linux CentOS 7
|
Contributor
Result of foundationdb-pr-cluster-tests on Linux CentOS 7
|
Contributor
Result of foundationdb-pr on Linux CentOS 7
|
johscheuer
commented
Dec 16, 2024
johscheuer
left a comment
Contributor
Author
There was a problem hiding this comment.
Result of the simulation runs:
20241216-121828-jscheuermann-30f2a35f06fbf7f0 compressed=True data_size=39505031 duration=4460437 ended=100000 fail_fast=10 max_runs=100000 pass=100000 priority=100 remaining=0 runtime=1:16:56 sanity=False started=100000 stopped=20241216-133524 submitted=20241216-121828 timeout=5400 username=jscheuermann
jzhou77
reviewed
Dec 16, 2024
Contributor
Result of foundationdb-pr-clang-arm on Linux CentOS 7
|
Contributor
Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x
|
Contributor
Result of foundationdb-pr-macos on macOS Ventura 13.x
|
Contributor
Result of foundationdb-pr-clang on Linux CentOS 7
|
Contributor
Result of foundationdb-pr-cluster-tests on Linux CentOS 7
|
Contributor
Result of foundationdb-pr on Linux CentOS 7
|
Contributor
Author
|
@jzhou77 could you tag someone for a 2nd review? :) |
5 tasks
Collaborator
|
@johscheuer Will review this today or by latest tomorrow. |
spraza
reviewed
Dec 18, 2024
Comment on lines
+1010
to
+1012
| for (std::map<std::string, std::vector<std::string>>::iterator it = parsedLocalities.begin(); | ||
| it != parsedLocalities.end(); | ||
| ++it) { |
Collaborator
There was a problem hiding this comment.
Suggested change
| for (std::map<std::string, std::vector<std::string>>::iterator it = parsedLocalities.begin(); | |
| it != parsedLocalities.end(); | |
| ++it) { | |
| for (const auto& parsedLocality : parsedLocalities) { |
Some benefits:
- more readable
- const correct
You will still have to do parsedLocality.first and parsedLocality.second instead of it->first and it->second. If you want to make it even more readable, then you can try:
Suggested change
| for (std::map<std::string, std::vector<std::string>>::iterator it = parsedLocalities.begin(); | |
| it != parsedLocalities.end(); | |
| ++it) { | |
| for (const auto& [localityKey, localityVal] : parsedLocalities) { |
Collaborator
There was a problem hiding this comment.
Oops. I merged without checking this comment.
Collaborator
There was a problem hiding this comment.
No worries, it was minor so I approved and left a comment. I'll message @johscheuer in case he wants to make a follow-up PR.
5 tasks
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.
Restructure some of the exclusion code to reduce the requests that are made by locality-based exclusions and make sure we fetch the information only once. Under normal circumstances the additional work is not critical but in some cases when the cluster is under heavy load or a set of workers is slow in responding, the additional work can prevent that locality-baed exclusions work (but the IP:port based exclusions work).
I made the PR against 7.1 as I was testing against a 7.1 cluster. Once the changes look good I'll create a PR for main and 7.3 (and make sure we merge the PR for the main branch first).
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)