Skip to content

Commit

Permalink
Merge branch 'task/SDK-3759_Message-about-recursiveSync-logged-too-of…
Browse files Browse the repository at this point in the history
…ten' into 'develop'

SDK-3759. Reduce noProgressCount logging frecuency

Closes SDK-3759

See merge request sdk/sdk!5387
  • Loading branch information
vmgaGH committed Mar 18, 2024
2 parents 284891f + 0aa5c68 commit 60e1f13
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/sync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12005,10 +12005,14 @@ void Syncs::syncLoop()
lastRecurseMs = unsigned(std::chrono::duration_cast<std::chrono::milliseconds>(
std::chrono::high_resolution_clock::now() - recurseStart).count());

LOG_verbose << "recursiveSync took ms: " << lastRecurseMs
<< (skippedForScanning ? " (" + std::to_string(skippedForScanning)+ " skipped due to ongoing scanning)" : "")
<< (mSyncFlags->noProgressCount ? " no progress count: " + std::to_string(mSyncFlags->noProgressCount) : "")
<< (earlyExit ? " (earlyExit)" : "");
const int noProgressCountLoggingFrequency = 500; // Log this every 500 counts
if (!skippedForScanning && !earlyExit && mSyncFlags->noProgressCount && (mSyncFlags->noProgressCount % noProgressCountLoggingFrequency == 0))
{
LOG_verbose << "recursiveSync took ms: " << lastRecurseMs
<< (skippedForScanning ? " (" + std::to_string(skippedForScanning)+ " skipped due to ongoing scanning)" : "")
<< (mSyncFlags->noProgressCount ? " no progress count: " + std::to_string(mSyncFlags->noProgressCount) : "")
<< (earlyExit ? " (earlyExit)" : "");
}


waiter->bumpds();
Expand Down

0 comments on commit 60e1f13

Please sign in to comment.