Skip to content
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

Allow leader to learn new leases upon re-election to avoid unnecessary shardSyncs #1063

Merged
merged 3 commits into from
Mar 15, 2023

Conversation

chenylee-aws
Copy link
Contributor

@chenylee-aws chenylee-aws commented Mar 14, 2023

Description of changes:

Upon leader change the new leader might not have the latest streams in its in-memory map therefore would enqueue shardSyncs for these streams. It can be a waste if the shardSyncs result in no leases created as they have been created by the previous leader. Instead, we should fast forward and sync the leaders in-memory map upon leader change and let the PeriodicShardSyncManager to take care of updating the new streams by first checking the hash range completion before deciding to enqueuing them for shardSyncs to save IOPs.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@stair-aws stair-aws added the v2.x Issues related to the 2.x version label Mar 14, 2023
@chenylee-aws chenylee-aws changed the title Allow leader to learn about new leases upon leader change to avoid unnecessary shardSyncs Allow leader to learn new leases upon re-election to avoid unnecessary shardSyncs Mar 15, 2023
@chenylee-aws chenylee-aws merged commit 0cbd74f into awslabs:master Mar 15, 2023
@chenylee-aws chenylee-aws deleted the sync branch March 15, 2023 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2.x Issues related to the 2.x version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants