View in context in the libbitcoin Slack #general mirror.
flush_writes = true, the database will always corrupt with lock failure error. I also read the implementation of class flush_lock , and seems the failure is indeed can be triggered easily. Because flush_lock::try_lock only check the existence of the lock file without creating it, while flush_lock::lock_shared fails if it cannot create lock file immediately. Is this intentional?
I think semantic behavior is try_lock for non-blocking lock (this is what flush_lock::lock_shared does currently), and lock_shared for blocking lock.