-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Priority-based auditStorage #10855
Open
kakaiu
wants to merge
6
commits into
apple:main
Choose a base branch
from
kakaiu:priority-based-audit-storage
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Priority-based auditStorage #10855
Conversation
This file contains 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
Result of foundationdb-pr-clang-ide on Linux CentOS 7
|
Result of foundationdb-pr-macos on macOS Ventura 13.x
|
Result of foundationdb-pr on Linux CentOS 7
|
Result of foundationdb-pr-clang on Linux CentOS 7
|
Result of foundationdb-pr-cluster-tests on Linux CentOS 7
|
Result of foundationdb-pr-clang-ide on Linux CentOS 7
|
Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x
|
Result of foundationdb-pr-clang on Linux CentOS 7
|
Result of foundationdb-pr on Linux CentOS 7
|
Result of foundationdb-pr-cluster-tests on Linux CentOS 7
|
kakaiu
force-pushed
the
priority-based-audit-storage
branch
from
September 1, 2023 21:10
abe869b
to
17d1bc1
Compare
Result of foundationdb-pr-clang-ide on Linux CentOS 7
|
Result of foundationdb-pr-clang-ide on Linux CentOS 7
|
Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x
|
Result of foundationdb-pr-macos on macOS Ventura 13.x
|
Result of foundationdb-pr-clang on Linux CentOS 7
|
Result of foundationdb-pr on Linux CentOS 7
|
Result of foundationdb-pr-cluster-tests on Linux CentOS 7
|
Result of foundationdb-pr on Linux CentOS 7
|
Result of foundationdb-pr-clang on Linux CentOS 7
|
Result of foundationdb-pr-cluster-tests on Linux CentOS 7
|
kakaiu
force-pushed
the
priority-based-audit-storage
branch
2 times, most recently
from
September 6, 2023 03:39
a6f3873
to
930d02e
Compare
Result of foundationdb-pr-clang on Linux CentOS 7
|
Result of foundationdb-pr-clang-ide on Linux CentOS 7
|
Result of foundationdb-pr-cluster-tests on Linux CentOS 7
|
Result of foundationdb-pr on Linux CentOS 7
|
Result of foundationdb-pr-clang-ide on Linux CentOS 7
|
Result of foundationdb-pr on Linux CentOS 7
|
Result of foundationdb-pr-clang-ide on Linux CentOS 7
|
Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x
|
Result of foundationdb-pr-macos on macOS Ventura 13.x
|
Result of foundationdb-pr on Linux CentOS 7
|
Result of foundationdb-pr-clang on Linux CentOS 7
|
Result of foundationdb-pr-clang on Linux CentOS 7
|
Result of foundationdb-pr-clang-ide on Linux CentOS 7
|
Result of foundationdb-pr on Linux CentOS 7
|
Result of foundationdb-pr-cluster-tests on Linux CentOS 7
|
Result of foundationdb-pr-clang on Linux CentOS 7
|
Result of foundationdb-pr-clang-ide on Linux CentOS 7
|
Result of foundationdb-pr on Linux CentOS 7
|
Result of foundationdb-pr-cluster-tests on Linux CentOS 7
|
kakaiu
force-pushed
the
priority-based-audit-storage
branch
from
September 9, 2023 00:03
91d6755
to
2552eb0
Compare
Result of foundationdb-pr-clang-ide on Linux CentOS 7
|
Result of foundationdb-pr on Linux CentOS 7
|
Result of foundationdb-pr-clang on Linux CentOS 7
|
Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x
|
Result of foundationdb-pr-cluster-tests on Linux CentOS 7
|
Result of foundationdb-pr-macos on macOS Ventura 13.x
|
Result of foundationdb-pr-clang-ide on Linux CentOS 7
|
Result of foundationdb-pr-macos-m1 on macOS Ventura 13.x
|
Result of foundationdb-pr-macos on macOS Ventura 13.x
|
Result of foundationdb-pr-clang on Linux CentOS 7
|
Result of foundationdb-pr on Linux CentOS 7
|
Result of foundationdb-pr-cluster-tests on Linux CentOS 7
|
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.
Priority-based auditStorage is designed to audit the data consistency of risky shards in real time. Currently, the risk of a shard is simply defined as equal to the write rate of the shard, capturing an intuition that the more write/clear to a shard, the higher the chance the shard will get corrupted.
The implementation has two components: (1) tracker; (2) audit.
The tracker periodically walks through all shards in the system and selects the most risky shards to audit. Those shards will be appended to a queue. The audit is a background actor that consumes risky shards (in the queue) using the existing auditStorage system. The queue is a limited-size queue. When the queue is full, any new shard will get dropped. Any shard already in the queue is guaranteed to be audited.
tracker => [queue] => audit.
When designing the queuing mechanism, there are four concerns:
(1) The audit load should be forcibly limited;
(2) The tracker should issue ranges to audit as many as possible under the above limit;
(3) The queue should be small for most of the time;
(4) The queue should not drop many requests (aka shards to audit).
The system addresses the concerns by dynamically controlling the queue length.
Users set the frequency of proposing ranges to audit by setting the PRIORITY_BASED_AUDIT_TRACKER_PERIOD.
Then, the system will automatically and dynamically choose an appropriate number of proposed shards to audit in each period, according to the observation of the current queue length. If the queue is too long, the system will decrease the speed of issuing ranges by the tracker. If the queue is too short, the system will increase the speed of issuing ranges.
Users can control the audit load by setting
PRIORITY_BASED_AUDIT_REST_FACTOR
. Suppose the audit of a round takest
time to complete, then the system will be forced to sleep forPRIORITY_BASED_AUDIT_REST_FACTOR * t
time.100K correctness:
20230908-233928-zhewang-ee5132d49bb4864c compressed=True data_size=34744649 duration=7626086 ended=100000 fail=8 fail_fast=10 max_runs=100000 pass=99992 priority=100 remaining=0 runtime=1:20:08 sanity=False started=100000 stopped=20230909-005936 submitted=20230908-233928 timeout=5400 username=zhewang
100K auditStorage:
20230909-015126-zhewang-b1d56e19b9727a04 compressed=True data_size=34777289 duration=9339143 ended=100000 fail_fast=10 max_runs=100000 pass=100000 priority=100 remaining=0 runtime=1:05:14 sanity=False started=100000 stopped=20230909-025640 submitted=20230909-015126 timeout=5400 username=zhewang
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-branch
ormain
if this is the youngest branch)