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

Add timeout for snapshot_sync_ctx #561

Merged
merged 2 commits into from
Jan 16, 2025
Merged

Add timeout for snapshot_sync_ctx #561

merged 2 commits into from
Jan 16, 2025

Conversation

yuwmao
Copy link
Contributor

@yuwmao yuwmao commented Jan 10, 2025

Add a dedicated timeout for snapshot_sync_ctx, and user can set this value in raft_param.

src/handle_timeout.cxx Outdated Show resolved Hide resolved
@@ -74,6 +74,7 @@ struct raft_params {
, log_sync_stop_gap_(99999)
, snapshot_distance_(0)
, snapshot_block_size_(0)
, snapshot_sync_ctx_timeout_(2500)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put 0 by default, and if zero, keep the current behavior (heart_beat_interval_ * response_limit_). There are lots of users with different heartbeats, and such a newly introduced parameter with a fixed default value will suddenly break their systems.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, good suggestion, thx.

xiaoxichen
xiaoxichen previously approved these changes Jan 15, 2025
Copy link

@xiaoxichen xiaoxichen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Contributor

@greensky00 greensky00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good. Fixed indent and put a comment.

@greensky00 greensky00 merged commit bf5e149 into eBay:master Jan 16, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants