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

Set Index hashtree sync_stop timeout to infinity #1803

Merged
merged 1 commit into from
Nov 9, 2021

Conversation

systream
Copy link
Contributor

@systream systream commented Nov 3, 2021

When stopping a riak node, riak_kv_vnode terminates and riak_kv_index_hashtree:sync_stop/1 called.
This may end up in crash if it could not finish in 5 sec:

CRASH REPORT Process <0.1193.0> with 1 neighbours exited with reason: {timeout,{gen_server,call,[<0.1248.0>,stop]}} in gen_fsm:terminate/7 line 600


I think this could created a situation where a normal riak stop can cause this error:

CRASH REPORT Process <0.3158.0> with 0 neighbours exited with reason: no match of right hand value {error,{db_open,"Corruption: truncated record at end of file"}} in hashtree:new_segment_store/2 line 728 in gen_server:init_it/6 line 328

@martinsumner
Copy link
Contributor

I think there are plenty of situations where 5s could be too short, so I agree about changing this. However, do we want to allow this to try forever, especially as it can recover from the crash?

My gut feeling is to use 60s not infinity. That is just an immediate reaction though, happy to discuss.

I will review that area of the code in more detail later this week, but I will make sure whatever we agree to change goes into the 3.0.9 release which should be out in the next 2 weeks.

@systream
Copy link
Contributor Author

systream commented Nov 4, 2021

Agree, 60 sec could be enough (or at least helps a lot) and we won't run the risk what if it hangs somehow.

Thanks!

@martinsumner martinsumner merged commit 4e402b2 into basho:develop-3.0 Nov 9, 2021
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.

2 participants