Use fully static linkage #364
2 changed files with 6 additions and 5 deletions
|
@ -469,10 +469,10 @@ bool BerkeleyEnvironment::Salvage(const std::string& strFile, bool fAggressive,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void BerkeleyEnvironment::CheckpointLSN(const std::string& strFile)
|
void BerkeleyEnvironment::CheckpointLSN(const std::string& strFile, bool lsnReset)
|
||||||
{
|
{
|
||||||
dbenv->txn_checkpoint(0, 0, 0);
|
dbenv->txn_checkpoint(0, 0, 0);
|
||||||
if (fMockDb)
|
if (fMockDb || !lsnReset)
|
||||||
return;
|
return;
|
||||||
dbenv->lsn_reset(strFile.c_str(), 0);
|
dbenv->lsn_reset(strFile.c_str(), 0);
|
||||||
}
|
}
|
||||||
|
@ -799,9 +799,10 @@ bool BerkeleyBatch::PeriodicFlush(BerkeleyDatabase& database)
|
||||||
|
|
||||||
// Flush wallet file so it's self contained
|
// Flush wallet file so it's self contained
|
||||||
env->CloseDb(strFile);
|
env->CloseDb(strFile);
|
||||||
env->CheckpointLSN(strFile);
|
// don't call lsn_reset at periodic time
|
||||||
|
// it causes performace issues on big wallets
|
||||||
|
env->CheckpointLSN(strFile, /* lsnReset */ false);
|
||||||
|
|
||||||
env->mapFileUseCount.erase(mi++);
|
|
||||||
LogPrint(BCLog::DB, "Flushed %s %dms\n", strFile, GetTimeMillis() - nStart);
|
LogPrint(BCLog::DB, "Flushed %s %dms\n", strFile, GetTimeMillis() - nStart);
|
||||||
ret = true;
|
ret = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,7 +83,7 @@ public:
|
||||||
bool Open(bool retry);
|
bool Open(bool retry);
|
||||||
void Close();
|
void Close();
|
||||||
void Flush(bool fShutdown);
|
void Flush(bool fShutdown);
|
||||||
void CheckpointLSN(const std::string& strFile);
|
void CheckpointLSN(const std::string& strFile, bool lsnReset = true);
|
||||||
|
|
||||||
void CloseDb(const std::string& strFile);
|
void CloseDb(const std::string& strFile);
|
||||||
void ReloadDbEnv();
|
void ReloadDbEnv();
|
||||||
|
|
Loading…
Reference in a new issue