Nico Williams wrote:
On Fri, Nov 25, 2016 at 09:08:37AM +0100, Florian Weimer wrote:
I think you misunderstood what I was asking (see the start of the thread).
I need to support Byzantine readers which do not follow the locking
protocol.  Based on the documentation, LMDB uses locks to implement MVCC and
prevent premature page reuse.

There's a good use case for an LMDB-like COW DB such that readers need
never lock.  That would require vacuuming by writing a new file and
renaming it into place, which is a trade-off.

One of the problems with LMDB's locks is that readers need write
permission to the lock file, IIRC :( but at least it's a separate file.

We developed an alternate locking protocol for Postfix. It just uses standard fcntl() locks.

http://www.postfix.org/lmdb_table.5.html

Of course nothing comes for free - with this approach, writers don't block readers, but readers block writers. That's the best you're going to get without custom lock protocols like LMDB uses natively.

--
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to