basho/riak_kv — pull request #395 by jonmeredith (2012-09-14 16:34:33+00:00)
Title: Add retry on eleveldb lock errors during open for up to 1 minute.

If a vnode crashes, the eleveldb NIF will close the leveldb database cleanly, writing out any pending data. However, the vnode supervisor can restart the crashed vnode faster than the close process and trigger a lock error which fails the vnode start and takes riak down.

This patch adds a retry every two seconds, waiting up to a minute for the lock to clear.