From 11638eb071d93243a4a64a744c3d47f58e1dc98d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 2 Dec 2020 19:12:30 +0300 Subject: Dbx_mdbx: fix for losing information during reboot --- plugins/Dbx_mdbx/src/dbintf.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins/Dbx_mdbx') diff --git a/plugins/Dbx_mdbx/src/dbintf.cpp b/plugins/Dbx_mdbx/src/dbintf.cpp index 58c037652e..edef04f79b 100644 --- a/plugins/Dbx_mdbx/src/dbintf.cpp +++ b/plugins/Dbx_mdbx/src/dbintf.cpp @@ -145,7 +145,8 @@ void CDbxMDBX::DBFlush(bool bForce) if (m_pWriteTran) { mdbx_txn_commit(m_pWriteTran); - + mdbx_env_sync(m_env); + m_pWriteTran = nullptr; m_dbError = mdbx_txn_begin(m_env, nullptr, MDBX_TXN_READWRITE, &m_pWriteTran); // FIXME: throw an exception -- cgit v1.2.3