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

Race condition on fullsync start/stop [JIRA: RIAK-2535] #741

Open
macintux opened this issue Apr 29, 2016 · 0 comments
Open

Race condition on fullsync start/stop [JIRA: RIAK-2535] #741

macintux opened this issue Apr 29, 2016 · 0 comments

Comments

@macintux
Copy link
Contributor

The repl_cancel_fullsync test can fail when the sync_worker field of the state record in riak_repl2_fssource is undefined and riak_repl_keylist_server:cancel_fullsync is invoked. This happens if the worker has not started yet.

Extraordinarily unlikely to happen in production, but the code should handle the situation better. Some thoughts from @bsparrow435:

so the worker hadnt started yet
and it tried to do a gen_fsm:send_event to an undefined pid

2016-04-29 00:25:13.232 [info]  ---riak_test--- Starting fullsync.
2016-04-29 00:25:13.588 [info]  ---riak_test--- Stopping fullsync.
maybe we should wait for worker start here
instead of checking if the fscoordinator is running

honestly cancel_fullsync should be able to catch this in a guard and return no workers started
@Basho-JIRA Basho-JIRA changed the title Race condition on fullsync start/stop Race condition on fullsync start/stop [JIRA: RIAK-2535] Apr 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants