Sophia database => fail

Howard Chu hyc at highlandsun.com
Tue Jun 21 17:17:36 EDT 2016


Bron Gondwana via Cyrus-devel wrote:

> I'm going to try to build an LMDB backend. I do have some questions for
Howard about how best to do it... :) The CyrusDB abstraction layer allows
opening multiple databases by filename. Should we be opening one environment
per file, or just a single environment per process? Looking at:

The preferred usage model is to use a single environment per process. It 
simplifies choosing the env mapsize, just use one very large number. With 
individual environments per file, you are required to think about how big each 
file can be relative to each other. Better to avoid that complexity.
>
> http://lmdb.tech/doc/starting.html
>
> We could us MDB_NOSUBDIR to use the file path as a data file via
> mdb_env_open...
>
> We already use internal "open file" tracking in most of our database
> types,
so I'd add that for the LMDB backend as well. I just use a linked list, since
we tend to have at most 3-4 databases open at once in each process.
>
> We don't use threading for anything except mupdate, and that uses a mutex
around all the database access, so multiple thread synchronisation should be OK :)
>
> Bron.
>


-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/


More information about the Cyrus-devel mailing list