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

Make index_hashtree process exit when related vnode exits #458

Merged
merged 1 commit into from
Dec 28, 2012

Conversation

jtuple
Copy link
Contributor

@jtuple jtuple commented Dec 28, 2012

When a riak_kv_vnode exits, the associated riak_kv_index_hashtree should also shutdown because a future riak_kv_vnode process will try to create a new riak_kv_index_hashtree. If the old index_hashtree is still alive, it retains a lock to the LevelDB instance, causing the newer index_hashtree to fail endlessly when trying to open the LevelDB instance.

This commit changes riak_kv_index_hashtree to monitor the associated riak_kv_vnode, shutting down if the riak_kv_vnode ever exits.

When a riak_kv_vnode exits, the associated riak_kv_index_hashtree
should also shutdown because a future riak_kv_vnode process will try
to create a new riak_kv_index_hashtree. If the old index_hashtree is
still alive, it retains a lock to the LevelDB instance, causing the
newer index_hashtree to fail endlessly when trying to open the LevelDB
instance.

This commit changes riak_kv_index_hashtree to monitor the associated
riak_kv_vnode, shutting down if the riak_kv_vnode ever exits.
@engelsanchez
Copy link
Contributor

Well, the code looks good to me and I just ran this branch against the partition_repair test with the massive slaughter of kv nodes without the hashtree problems that happened before virtually all of the time. So I would say 👍

@jtuple jtuple merged commit 17cfd96 into master Dec 28, 2012
@seancribbs seancribbs deleted the jdb-aae-vnode-monitor branch April 1, 2015 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants