-
Notifications
You must be signed in to change notification settings - Fork 245
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
Conversation
include/libnuraft/raft_params.hxx
Outdated
@@ -74,6 +74,7 @@ struct raft_params { | |||
, log_sync_stop_gap_(99999) | |||
, snapshot_distance_(0) | |||
, snapshot_block_size_(0) | |||
, snapshot_sync_ctx_timeout_(2500) |
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.
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.
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.
Sure, good suggestion, thx.
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.
lgtm
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.
Thanks, looks good. Fixed indent and put a comment.
Add a dedicated timeout for snapshot_sync_ctx, and user can set this value in raft_param.