-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
storage: queue replicas for raft log truncation after write ops #7125
storage: queue replicas for raft log truncation after write ops #7125
Conversation
@bdarnell I wanted to get feedback on this approach before I push it any further. In manual testing it seems to work as expected, keeping the raft log proactively truncated. Before merging I would want to add some specific testing of this functionality. |
My only concern would be that under heavy load, we might be checking the raft log state too often. Specifically, calling |
@BramGrunier That said, only checking for whether the replica should be queued after every Nth write would be very easy to add. |
7b0b4e1
to
986b2c5
Compare
@BramGrunier I tweaked |
Reviewed 1 of 6 files at r1, 5 of 5 files at r2. storage/client_metrics_test.go, line 152 [r2] (raw file):
does this want to be a loop? does it need a helpful comment? storage/queue.go, line 262 [r2] (raw file):
can this move up the stack to avoid creating the queue? storage/replica_test.go, line 866 [r2] (raw file):
does this need a comment? Comments from Reviewable |
986b2c5
to
4cba101
Compare
Review status: 3 of 6 files reviewed at latest revision, 3 unresolved discussions, all commit checks successful. storage/client_metrics_test.go, line 152 [r2] (raw file):
|
Review status: 3 of 6 files reviewed at latest revision, 4 unresolved discussions, all commit checks successful. storage/replica.go, line 2354 [r3] (raw file):
I'm not seeing an easy way to test this. If I disable the Curious how we're testing the Comments from Reviewable |
4cba101
to
8c79418
Compare
Reviewed 3 of 3 files at r3, 2 of 2 files at r4. storage/queue.go, line 262 [r2] (raw file):
|
Review status: all files reviewed at latest revision, 2 unresolved discussions, all commit checks successful. storage/queue.go, line 262 [r2] (raw file):
|
LGTM modulo tests.
|
8c79418
to
0806632
Compare
Reviewed 3 of 3 files at r5. Comments from Reviewable |
0806632
to
5f8992b
Compare
I added the ability to disable a |
1ce7952
to
53bf860
Compare
Review status: 3 of 6 files reviewed at latest revision, 2 unresolved discussions, some commit checks pending. storage/replica.go, line 2354 [r3] (raw file):
|
Reviewed 2 of 2 files at r6, 1 of 1 files at r7. storage/raft_log_queue_test.go, line 180 [r7] (raw file):
should be Fatal storage/raft_log_queue_test.go, line 187 [r7] (raw file):
should be Fatal storage/replica.go, line 2597 [r7] (raw file):
any reason not to storage/scanner.go, line 121 [r7] (raw file):
this function should be in the file Comments from Reviewable |
53bf860
to
d390791
Compare
Review status: all files reviewed at latest revision, 6 unresolved discussions, all commit checks successful. storage/raft_log_queue_test.go, line 180 [r7] (raw file):
|
Reviewed 4 of 4 files at r8. storage/helpers_test.go, line 122 [r8] (raw file):
missing period storage/raft_log_queue_test.go, line 79 [r8] (raw file):
this is pretty weird - why is it even here? Comments from Reviewable |
Review status: all files reviewed at latest revision, 4 unresolved discussions, all commit checks successful. storage/helpers_test.go, line 122 [r8] (raw file):
|
d390791
to
a4b7a46
Compare
Review status: 6 of 7 files reviewed at latest revision, 1 unresolved discussion, all commit checks successful. storage/raft_log_queue_test.go, line 201 [r9] (raw file):
Comment looks stale (or else it's not clear where ForceRaftLogScanAndProcess is getting called) Comments from Reviewable |
Review status: 6 of 7 files reviewed at latest revision, 1 unresolved discussion, all commit checks successful. storage/raft_log_queue_test.go, line 201 [r9] (raw file):
|
Fixes #6012.
This change is