diff --git a/src/ripple/app/data/SociDB.cpp b/src/ripple/app/data/SociDB.cpp index 12f7b1c13..f400a0f23 100644 --- a/src/ripple/app/data/SociDB.cpp +++ b/src/ripple/app/data/SociDB.cpp @@ -224,9 +224,13 @@ WALCheckpointer::~WALCheckpointer () void WALCheckpointer::runCheckpoint (const char* db, int pages) { - if ((pages + 1) % checkpointPageCount) + if (pages < 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_)