diff options
Diffstat (limited to 'zenserver/cache/structuredcachestore.cpp')
| -rw-r--r-- | zenserver/cache/structuredcachestore.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/zenserver/cache/structuredcachestore.cpp b/zenserver/cache/structuredcachestore.cpp index 6b7b73dcf..4edc13b4a 100644 --- a/zenserver/cache/structuredcachestore.cpp +++ b/zenserver/cache/structuredcachestore.cpp @@ -1769,7 +1769,7 @@ ZenCacheDiskLayer::CacheBucket::PutStandaloneCacheValue(const IoHash& HashKey, c // We retry to move the file since it can be held open for read. // This happens if the server processes a Get request for the file or // if we are busy sending the file upstream - int RetryCount = 3; + int RetryCount = 4; do { Ec.clear(); @@ -1789,7 +1789,8 @@ ZenCacheDiskLayer::CacheBucket::PutStandaloneCacheValue(const IoHash& HashKey, c if (!ExistingEc && (OldFileSize == NewFileSize)) { ZEN_INFO( - "Failed to move temporary file '{}' to '{}'. Target file has same size, assuming concurrent write of same value, " + "Failed to move temporary file '{}' to '{}' for '{}'. Target file has same size, assuming concurrent write of same " + "value, " "move " "failed with reason '{}'", DataFile.GetPath(), @@ -1865,9 +1866,8 @@ ZenCacheDiskLayer::CacheBucket::PutStandaloneCacheValue(const IoHash& HashKey, c Ec.message()); // Semi arbitrary back-off - zen::Sleep(200 * (4 - RetryCount)); // Sleep at most for a total of 2 seconds - RetryCount--; - } while (RetryCount > 0); + zen::Sleep(200 * (5 - RetryCount)); // Sleep at most for a total of 3 seconds + } while (RetryCount-- > 0); throw std::system_error(Ec, fmt::format("Failed to finalize file '{}' for put in '{}'", DataFilePath.ToUtf8(), m_BucketDir)); } |