``lmdb-sync-mode``
^^^^^^^^^^^^^^^^^^
-* Synchronisation mode: sync, nosync, nometasync, mapasync
-* Default: mapasync
+ .. versionchanged:: 4.9.0
-``sync``
+ ``mapasync`` choice removed
+
+* Synchronisation mode: sync, nosync, nometasync
+* Default: sync
+
+``sync`` (default since 4.9.0)
LMDB synchronous mode. Safest option, but also slightly slower. Can also be enabled with ``lmdb-sync-mode=``
``nosync``
``nometasync``
flush system buffers to disk only once per transaction, omit the metadata flush. This maintains database integrity, but can potentially lose the last committed transaction if the operating system crashes.
-``mapasync`` (default)
- Use asynchronous flushes to disk. As with nosync, a system crash can then corrupt the database or lose the last transactions.
+``mapasync`` (default before 4.9.0)
+ Due to a bug before version 4.9.0, this actually gave ``sync`` behaviour.
+ The ``mapasync`` choice has been removed in version 4.9.0.
.. _setting-lmdb-schema-version:
* :ref:`setting-slave` is now :ref:`setting-secondary`
* :ref:`setting-superslave` is now :ref:`setting-autosecondary`
+In :ref:`setting-lmdb-sync-mode`, the previous default ``mapasync`` is no longer a valid value.
+Due to a bug, it was interpreted as ``sync`` in previous versions.
+To avoid operational surprises, ``sync`` is the new default value.
+
Renamed options
^^^^^^^^^^^^^^^
d_asyncFlag = MDB_NOSYNC;
else if (syncMode == "nometasync")
d_asyncFlag = MDB_NOMETASYNC;
- else if (syncMode == "mapasync")
- d_asyncFlag = MDB_MAPASYNC;
else if (syncMode.empty() || syncMode == "sync")
d_asyncFlag = 0;
else
void declareArguments(const string& suffix = "") override
{
declare(suffix, "filename", "Filename for lmdb", "./pdns.lmdb");
- declare(suffix, "sync-mode", "Synchronisation mode: nosync, nometasync, mapasync, sync", "mapasync");
+ declare(suffix, "sync-mode", "Synchronisation mode: nosync, nometasync, sync", "sync");
// there just is no room for more on 32 bit
declare(suffix, "shards", "Records database will be split into this number of shards", (sizeof(void*) == 4) ? "2" : "64");
declare(suffix, "schema-version", "Maximum allowed schema version to run on this DB. If a lower version is found, auto update is performed", std::to_string(SCHEMAVERSION));