[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#7651) LMDB: Uncontrolled database when opened from multiple processes



h.b.furuseth@usit.uio.no wrote:
> I'd call this two doc bugs:
>
> Something should mention that once a page has been used, the file will
> never shrink below that page.  (Can't quite say that the file never
> shrinks, since WRITEMAP and Windows will set it to exact re-configurable
> mapsize in some cases.  If I remember correctly.)

You cannot shrink the mapsize below that last used page, and the last used 
page is a non-decreasing number.

> mdb_env_copy() and mdb_env_copyfd() should document that
>
>    @node This call can trigger siginficant file size growth if run in
>    parallel with write transactions, because it employs a read-only
>    transaction. See long-lived transactions under Caveats.
>
> I wonder that means these functions should have a flag parameter.
> For some databases, users might prefer a _write_ transaction while
> reading the DB, blocking writes while copying.

No one has ever wanted a hot-backup function that halts writes. You might as 
well not do a hot-backup at all.

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