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

Don't start K/V ensemble peers until riak_kv is up #984

Closed
jtuple opened this issue Jun 16, 2014 · 3 comments
Closed

Don't start K/V ensemble peers until riak_kv is up #984

jtuple opened this issue Jun 16, 2014 · 3 comments
Assignees
Milestone

Comments

@jtuple
Copy link
Contributor

jtuple commented Jun 16, 2014

After restarting a node that previously created K/V ensembles, riak_ensemble will start up those ensemble peers before riak_kv itself has come up. This leads to the peers all crashing trying to access the AAE information ETS table as part of the riak_kv_ensemble_backend:sync logic. Not only does this spam the log, but at least one case has been seen where the crashes happen fast enough to force the riak_ensemble_peer supervisor to reach maximum restart intensity and bring the Riak node down.

We should ensure that ensemble peers are not started before the relevant application has started.

Suggested solution is to extend the riak_ensemble_backend behavior to have a ready_to_start (or some such named) callback that is checked by the riak_ensemble_manager to gate the call to riak_ensemble_peer_sup:start_peer. This allows backends to generically choose their ready conditions.

For riak_kv_ensemble_backend, this new callback should be implemented to return true only when the riak_kv service is ready/up.

/cc basho/riak#536

@engelsanchez
Copy link
Contributor

I'm taking this task. Scream if you are working on it but forgot to make yourself the assignee.

@engelsanchez
Copy link
Contributor

A couple of PRs have been opened to attempt to address this issue.

@engelsanchez
Copy link
Contributor

This has been fixed in basho/riak_ensemble#32 and #989

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

No branches or pull requests

3 participants