mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Small WAL cleanup.
This commit is contained in:
@@ -223,18 +223,19 @@ bool SqliteDatabase::setupCheckpointing(JobQueue *q)
|
||||
|
||||
void SqliteDatabase::doHook(const char *db, int pages)
|
||||
{
|
||||
if (pages < 1024)
|
||||
if (pages < 1000)
|
||||
return;
|
||||
boost::mutex::scoped_lock sl(walMutex);
|
||||
if (!walRunning)
|
||||
{
|
||||
boost::mutex::scoped_lock sl(walMutex);
|
||||
if (walRunning)
|
||||
return;
|
||||
walRunning = true;
|
||||
}
|
||||
if (mWalQ)
|
||||
mWalQ->addJob(jtWAL, std::string("WAL:") + mHost, boost::bind(&SqliteDatabase::runWal, this));
|
||||
else
|
||||
boost::thread(boost::bind(&SqliteDatabase::runWal, this)).detach();
|
||||
}
|
||||
}
|
||||
|
||||
void SqliteDatabase::runWal()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user