-
Notifications
You must be signed in to change notification settings - Fork 330
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
Call truncate
on leaders AND followers
#3908
Merged
Merged
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
guilload
force-pushed
the
guilload/close-shards-delete-queues-on-startup
branch
from
October 4, 2023 16:51
ff571c9
to
1f9ddbb
Compare
guilload
force-pushed
the
guilload/call-truncate-on-leader-and-follower
branch
from
October 4, 2023 17:42
026c87c
to
df0807b
Compare
guilload
force-pushed
the
guilload/call-truncate-on-leader-and-follower
branch
from
October 4, 2023 17:51
df0807b
to
72686e4
Compare
guilload
force-pushed
the
guilload/close-shards-delete-queues-on-startup
branch
from
October 5, 2023 16:37
1f9ddbb
to
1de1432
Compare
guilload
force-pushed
the
guilload/call-truncate-on-leader-and-follower
branch
from
October 5, 2023 16:48
72686e4
to
5eafb0e
Compare
guilload
force-pushed
the
guilload/close-shards-delete-queues-on-startup
branch
from
October 6, 2023 13:57
1de1432
to
64ea389
Compare
guilload
force-pushed
the
guilload/call-truncate-on-leader-and-follower
branch
from
October 6, 2023 14:23
5eafb0e
to
1220169
Compare
guilload
force-pushed
the
guilload/close-shards-delete-queues-on-startup
branch
2 times, most recently
from
October 6, 2023 19:20
0c7c884
to
aa0fc9f
Compare
Base automatically changed from
guilload/close-shards-delete-queues-on-startup
to
main
October 6, 2023 19:49
guilload
force-pushed
the
guilload/call-truncate-on-leader-and-follower
branch
from
October 6, 2023 20:03
1220169
to
26cdbce
Compare
guilload
force-pushed
the
guilload/call-truncate-on-leader-and-follower
branch
from
October 6, 2023 20:30
26cdbce
to
42eadaa
Compare
fulmicoton
reviewed
Oct 8, 2023
@@ -202,7 +202,8 @@ mod tests { | |||
mrecordlog.clone(), | |||
state.clone(), | |||
); | |||
tokio::time::sleep(REMOVAL_GRACE_PERIOD * 2).await; | |||
// Wait for the removal task to run. | |||
tokio::time::sleep(Duration::from_millis(100)).await; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect this test will be flaky.
fulmicoton
approved these changes
Oct 8, 2023
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.
Description
Before this change, indexers called truncate on leaders, and leaders replicated the truncation request on followers. After this change, indexers are responsible for calling
truncate
on both leaders and followers. Leaders are no longer in charge of replicating the request.That way, followers see their queues truncated even if leaders are unavailable. The code is also simplified.
How was this PR tested?
Updated tests