From 9bd00e05b31e2ddb709b2afbc8569b7e4d767745 Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Tue, 8 Aug 2023 14:36:47 +0200 Subject: fix asserts and exceptions (#344) * Send proper error to caller of GetChunkInfo instead of assert * catch and handle exceptions when checking for state_marker * properly wait for background tasks if oplop-export fails * changelog --- src/zenserver/projectstore/remoteprojectstore.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/zenserver/projectstore/remoteprojectstore.cpp') diff --git a/src/zenserver/projectstore/remoteprojectstore.cpp b/src/zenserver/projectstore/remoteprojectstore.cpp index c0fbad755..20acdf159 100644 --- a/src/zenserver/projectstore/remoteprojectstore.cpp +++ b/src/zenserver/projectstore/remoteprojectstore.cpp @@ -236,6 +236,13 @@ BuildContainer(CidStore& ChunkStore, fmt::format("Failed to find attachment {} for op", AttachmentHash), {}); ZEN_ERROR("Failed to build container ({}). Reason: '{}'", RemoteResult.GetError(), RemoteResult.GetErrorReason()); + + BlockCreateLatch.CountDown(); + while (!BlockCreateLatch.Wait(1000)) + { + ZEN_INFO("Aborting, {} blocks remaining...", BlockCreateLatch.Remaining()); + } + return {}; } uint64_t PayloadSize = Payload.GetSize(); -- cgit v1.2.3