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

Re: ext3/ext4 fsync hack

Sorry, forgot this one.

On 01/06/2015 03:18 PM, Howard Chu wrote:
Hallvard Breien Furuseth wrote:
Another issue: After an MDB_NOSYNC commit, mdb_env_sync()
only fdatasync()s.  It does not know when the file grew.

I suppose we can change the FORCE flag to also cause fsync() to be used.

Insufficient if the user commits with MDB_NOSYNC (maybe when creating
the DB), then turns off MDB_NOSYNC and does mdb_env_sync(env, 0).
Or another process without MDB_NOSYNC doing mdb_env_sync(env, 0).

The lockfile could track what has been synced how, though.
Except it won't know at init, so if someone does a lot of
<open env, commit, close env> they'll end up fsync'ing each time.