Checkpoint SOCI exactly every 1000 pages.

This commit is contained in:
Tom Ritchford
2015-04-06 16:24:05 -04:00
committed by Nik Bougalis
parent 03d1c0ed21
commit e874a2624f

View File

@@ -224,13 +224,9 @@ WALCheckpointer::~WALCheckpointer ()
void WALCheckpointer::runCheckpoint (const char* db, int pages)
{
if (pages < checkpointPageCount)
if ((pages + 1) % checkpointPageCount)
return;
// TODO: after it reaches 1000 pages, won't it checkpoint on every
// page after that?
// Should the line above be if ((1 + pages) % checkpointPageCount)?
{
ScopedLockType sl (mutex_);
if (running_)