diff options
| author | 2021-03-25 22:31:47 +0000 | |
|---|---|---|
| committer | 2021-03-25 22:31:47 +0000 | |
| commit | c7c1446c11e24ff7f275c1ccab35719d1d0fb81f (patch) | |
| tree | 0f6008795e832b6910495fb0743c1f352f9e8b94 /services/incremental/IncrementalService.cpp | |
| parent | ca6b81c98550085075baa5e167e58af162976c96 (diff) | |
| parent | 5ac5553879faf44e9c219cccb33489a19f0451e6 (diff) | |
Merge "More logging and better retry logic." into sc-dev
Diffstat (limited to 'services/incremental/IncrementalService.cpp')
| -rw-r--r-- | services/incremental/IncrementalService.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/services/incremental/IncrementalService.cpp b/services/incremental/IncrementalService.cpp index 94f8e59c6057..6695ba841b67 100644 --- a/services/incremental/IncrementalService.cpp +++ b/services/incremental/IncrementalService.cpp @@ -2523,7 +2523,8 @@ std::optional<Milliseconds> IncrementalService::DataLoaderStub::needToBind() { now - mCurrentStatusTs <= Constants::bindingTimeout) { LOG(INFO) << "Binding still in progress. " << (healthy ? "The DL is healthy/freshly bound, ok to retry for a few times." - : "Already unhealthy, don't do anything."); + : "Already unhealthy, don't do anything.") + << " for storage " << mId; // Binding still in progress. if (!healthy) { // Already unhealthy, don't do anything. @@ -2546,7 +2547,8 @@ std::optional<Milliseconds> IncrementalService::DataLoaderStub::needToBind() { const auto previousBindTs = mPreviousBindTs; mPreviousBindTs = now; - const auto nonCrashingInterval = std::max(castToMs(now - previousBindTs), 100ms); + const auto nonCrashingInterval = + std::max(castToMs(now - previousBindTs - mPreviousBindDelay), 100ms); if (previousBindTs.time_since_epoch() == Clock::duration::zero() || nonCrashingInterval > Constants::healthyDataLoaderUptime) { mPreviousBindDelay = 0ms; @@ -2575,7 +2577,8 @@ bool IncrementalService::DataLoaderStub::bind() { const auto bindDelay = *maybeBindDelay; if (bindDelay > 1s) { LOG(INFO) << "Delaying bind to " << mParams.packageName << " by " - << bindDelay.count() / 1000 << "s"; + << bindDelay.count() / 1000 << "s" + << " for storage " << mId; } bool result = false; |