mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-05-28 04:35:57 -04:00
ITS#10454 lmdb: can't rely on O_DSYNC on MacOS
So we must explicitly sync writes to the metapage.
This commit is contained in:
parent
e30a2d1672
commit
bd9cd548b0
1 changed files with 12 additions and 0 deletions
|
|
@ -4865,6 +4865,12 @@ mdb_env_write_meta(MDB_txn *txn)
|
|||
rc = ErrCode();
|
||||
goto fail;
|
||||
}
|
||||
#if defined(__APPLE__)
|
||||
if (MDB_FDATASYNC(env->me_mfd)) {
|
||||
rc = ErrCode();
|
||||
goto fail;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
goto done;
|
||||
}
|
||||
|
|
@ -4924,6 +4930,12 @@ fail:
|
|||
env->me_flags |= MDB_FATAL_ERROR;
|
||||
return rc;
|
||||
}
|
||||
#if defined(__APPLE__)
|
||||
if (mfd == env->me_mfd && MDB_FDATASYNC(env->me_mfd)) {
|
||||
rc = ErrCode();
|
||||
return rc;
|
||||
}
|
||||
#endif
|
||||
/* MIPS has cache coherency issues, this is a no-op everywhere else */
|
||||
CACHEFLUSH(env->me_map + off, len, DCACHE);
|
||||
done:
|
||||
|
|
|
|||
Loading…
Reference in a new issue