aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/projectstore/jupiterremoteprojectstore.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2023-09-19 06:04:10 -0400
committerGitHub <[email protected]>2023-09-19 12:04:10 +0200
commit46e17d04154be01d26b2f30afcda37a11ba290fc (patch)
tree39d56fc8e3d0bb289aebcd0155fc68b8f7d582bb /src/zenserver/projectstore/jupiterremoteprojectstore.cpp
parenthandle errors in spdlog gracefully (#410) (diff)
downloadzen-46e17d04154be01d26b2f30afcda37a11ba290fc.tar.xz
zen-46e17d04154be01d26b2f30afcda37a11ba290fc.zip
Add retry if FinalizeRef responds with non-empty "Needs" attachments (#409)
* Add retry if FinalizeRef responds with non-empty "Needs" attachments * better logging/progress report * changelog
Diffstat (limited to 'src/zenserver/projectstore/jupiterremoteprojectstore.cpp')
-rw-r--r--src/zenserver/projectstore/jupiterremoteprojectstore.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/zenserver/projectstore/jupiterremoteprojectstore.cpp b/src/zenserver/projectstore/jupiterremoteprojectstore.cpp
index e59bac6d6..cfe273eba 100644
--- a/src/zenserver/projectstore/jupiterremoteprojectstore.cpp
+++ b/src/zenserver/projectstore/jupiterremoteprojectstore.cpp
@@ -124,22 +124,22 @@ public:
return Result;
}
- virtual Result FinalizeContainer(const IoHash& RawHash) override
+ virtual FinalizeResult FinalizeContainer(const IoHash& RawHash) override
{
- const int32_t MaxAttempts = 3;
- CloudCacheResult FinalizeResult;
+ const int32_t MaxAttempts = 3;
+ FinalizeRefResult FinalizeRefResult;
{
CloudCacheSession Session(m_CloudClient.Get());
- for (int32_t Attempt = 0; Attempt < MaxAttempts && !FinalizeResult.Success; Attempt++)
+ for (int32_t Attempt = 0; Attempt < MaxAttempts && !FinalizeRefResult.Success; Attempt++)
{
- FinalizeResult = Session.FinalizeRef(m_Namespace, m_Bucket, m_Key, RawHash);
- if (!FinalizeResult.Success)
+ FinalizeRefResult = Session.FinalizeRef(m_Namespace, m_Bucket, m_Key, RawHash);
+ if (!FinalizeRefResult.Success)
{
Sleep(100 * (Attempt + 1));
}
}
}
- Result Result{ConvertResult(FinalizeResult)};
+ FinalizeResult Result{ConvertResult(FinalizeRefResult), {FinalizeRefResult.Needs.begin(), FinalizeRefResult.Needs.end()}};
if (Result.ErrorCode)
{
Result.Reason = fmt::format("Failed finalizing oplog container to {}/{}/{}/{}. Reason: '{}'",