Skip to content

Commit

Permalink
Merge pull request #4129
Browse files Browse the repository at this point in the history
ee31383 db_lmdb: don't sync a read only DB (moneromooo-monero)
  • Loading branch information
luigi1111 committed Jul 27, 2018
2 parents 21b1fa1 + ee31383 commit 0dddfea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/blockchain_db/lmdb/db_lmdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1413,6 +1413,9 @@ void BlockchainLMDB::sync()
LOG_PRINT_L3("BlockchainLMDB::" << __func__);
check_open();

if (is_read_only())
return;

// Does nothing unless LMDB environment was opened with MDB_NOSYNC or in part
// MDB_NOMETASYNC. Force flush to be synchronous.
if (auto result = mdb_env_sync(m_env, true))
Expand Down

0 comments on commit 0dddfea

Please sign in to comment.