Add support to detect and to prevent multiple callers of the same UNIX process
from simultaneously opening the same database.
Excerpt from previous exchange on leveldb mailing list:
------
Sanjay Ghemawat
View profile
More options Sep 30, 1:04 am
On Thu, Sep 29, 2011 at 8:30 AM, Joseph Wayne Norton wrote:
> Hans -
> Thanks. Is is correct to assume that it is the caller's responsibility to
> ensure this does not happen?
leveldb guarantees that it will catch when two distinct processes
try to open the db concurrently. However it doesn't guarantee what happens
if the same process tries to do so and therefore it is the caller's
responsibility
to check for concurrent opens from the same process.
This is ugly, but the unix file locking primitives are very annoying in
this regard. I'll think about whether or not we should clean up the spec
by doing extra checks inside the leveldb implementation.
------
Original issue reported on code.google.com by josephwn...@gmail.com on 29 Oct 2011 at 12:11
Original issue reported on code.google.com by
josephwn...@gmail.com
on 29 Oct 2011 at 12:11