[Date Prev][Date Next]
Re: (ITS#8021) Wrong mdb_env_sync() with at least MDB_RDONLY
- To: openldap-its@OpenLDAP.org
- Subject: Re: (ITS#8021) Wrong mdb_env_sync() with at least MDB_RDONLY
- From: firstname.lastname@example.org
- Date: Thu, 08 Jan 2015 20:00:03 +0000
- Auto-submitted: auto-generated (OpenLDAP-ITS)
> Full_Name: Hallvard B Furuseth
> Version: lmdb 0.9.14
> Submission from: (NULL) (188.8.131.52)
> Submitted by: hallvard
> mdb_env_sync() works with MDB_RDONLY at least on Unix, but
> it syncs MDB_WRITEMAP changes incorrectly: fdatasync instead
> of msync because mdb_env_open() cleared MDB_WRITEMAP.
> Users are likely doing the same thing anyway: Using MDB_RDONLY
> instead of MDB_RDONLY|MDB_WRITEMAP on WRITEMAP-written DBs.
mdb_env_sync() shouldn't even be doing any work at all if the env was
opened RDONLY. We should return nop in that case. RDONLY means RDONLY!
No writes, no calls that will alter the storage layer.
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/