backport glib version fix, lsn_reset fix
This commit is contained in:
parent
cd7c2961dc
commit
60a3d11df2
4 changed files with 3736 additions and 7 deletions
3729
depends/glibc_version_header/force_link_glibc_2.19.h
Normal file
3729
depends/glibc_version_header/force_link_glibc_2.19.h
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,11 +1,11 @@
|
||||||
linux_CFLAGS=-pipe
|
linux_CFLAGS=-pipe
|
||||||
linux_CXXFLAGS=$(linux_CFLAGS)
|
linux_CXXFLAGS=$(linux_CFLAGS)
|
||||||
|
|
||||||
linux_release_CFLAGS=-O2
|
linux_release_CFLAGS=-O3 -g -include $(BASEDIR)/glibc_version_header/force_link_glibc_2.19.h
|
||||||
linux_release_CXXFLAGS=$(linux_release_CFLAGS)
|
linux_release_CXXFLAGS=$(linux_release_CFLAGS)
|
||||||
|
|
||||||
linux_debug_CFLAGS=-Og
|
linux_debug_CFLAGS=-O1 -g
|
||||||
linux_debug_CXXFLAGS=$(linux_debug_CFLAGS)
|
linux_debug_CXXFLAGS=-O0 -g
|
||||||
|
|
||||||
linux_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC
|
linux_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC
|
||||||
|
|
||||||
|
|
|
@ -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,7 +799,7 @@ 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);
|
env->CheckpointLSN(strFile, false); // too expensive to reset LSN periodically (and it's triggered on flush or backup
|
||||||
|
|
||||||
env->mapFileUseCount.erase(mi++);
|
env->mapFileUseCount.erase(mi++);
|
||||||
LogPrint(BCLog::DB, "Flushed %s %dms\n", strFile, GetTimeMillis() - nStart);
|
LogPrint(BCLog::DB, "Flushed %s %dms\n", strFile, GetTimeMillis() - nStart);
|
||||||
|
|
|
@ -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