diff options
| author | Dan Engelbrecht <[email protected]> | 2026-02-02 10:46:09 +0100 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2026-02-02 10:46:09 +0100 |
| commit | 8fe906e95324b07779923b1968a7cce7fffc9931 (patch) | |
| tree | a2a869a0b6e0c9fb524299e18ca8df3d420240a6 | |
| parent | 5.7.20-pre0 (diff) | |
| download | zen-8fe906e95324b07779923b1968a7cce7fffc9931.tar.xz zen-8fe906e95324b07779923b1968a7cce7fffc9931.zip | |
only disable backlog scheduling when downloaded payload is not on disk (#741)
| -rw-r--r-- | CHANGELOG.md | 1 | ||||
| -rw-r--r-- | src/zenremotestore/builds/buildstorageoperations.cpp | 18 | ||||
| -rw-r--r-- | src/zenremotestore/include/zenremotestore/builds/buildstorageoperations.h | 3 |
3 files changed, 15 insertions, 7 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a210c6e2..26199bcd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ - Improvement: Reduce maximum size per chunk to read to reduce disk contention - Improvement: Reduce default size for block store chunk read window when iterating chunks - Improvement: Increase timeout before warning on slow shut down of zenserver +- Improvement: Revise logic for enabling work backlog during `zen builds download` - Bugfix: Restore `/health/log` and `/health/info` endpoint functionality ## 5.7.19 diff --git a/src/zenremotestore/builds/buildstorageoperations.cpp b/src/zenremotestore/builds/buildstorageoperations.cpp index 5368c7df4..26968efc1 100644 --- a/src/zenremotestore/builds/buildstorageoperations.cpp +++ b/src/zenremotestore/builds/buildstorageoperations.cpp @@ -1335,7 +1335,7 @@ BuildsOperationUpdateFolder::Execute(FolderContent& OutLocalFolderState) FilteredWrittenBytesPerSecond); } }, - WorkerThreadPool::EMode::DisableBacklog); + WorkerThreadPool::EMode::EnableBacklog); } std::unique_ptr<CloneQueryInterface> CloneQuery; @@ -1596,7 +1596,8 @@ BuildsOperationUpdateFolder::Execute(FolderContent& OutLocalFolderState) } } }, - WorkerThreadPool::EMode::DisableBacklog); + OnDiskPath.empty() ? WorkerThreadPool::EMode::DisableBacklog + : WorkerThreadPool::EMode::EnableBacklog); } }); } @@ -1785,7 +1786,8 @@ BuildsOperationUpdateFolder::Execute(FolderContent& OutLocalFolderState) } } }, - WorkerThreadPool::EMode::DisableBacklog); + BlockChunkPath.empty() ? WorkerThreadPool::EMode::DisableBacklog + : WorkerThreadPool::EMode::EnableBacklog); } } } @@ -3189,6 +3191,8 @@ BuildsOperationUpdateFolder::WriteLooseChunk(const uint32_t RemoteChunkInd { FilteredDownloadedBytesPerSecond.Stop(); } + IoBufferFileReference FileRef; + bool EnableBacklog = Payload.GetFileReference(FileRef); AsyncWriteDownloadedChunk(m_Options.ZenFolderPath, RemoteChunkIndex, std::move(ChunkTargetPtrs), @@ -3198,7 +3202,8 @@ BuildsOperationUpdateFolder::WriteLooseChunk(const uint32_t RemoteChunkInd SequenceIndexChunksLeftToWriteCounters, WritePartsComplete, TotalPartWriteCount, - FilteredWrittenBytesPerSecond); + FilteredWrittenBytesPerSecond, + EnableBacklog); }); } }); @@ -4309,7 +4314,8 @@ BuildsOperationUpdateFolder::AsyncWriteDownloadedChunk(const std::filesystem::pa std::span<std::atomic<uint32_t>> SequenceIndexChunksLeftToWriteCounters, std::atomic<uint64_t>& WritePartsComplete, const uint64_t TotalPartWriteCount, - FilteredRate& FilteredWrittenBytesPerSecond) + FilteredRate& FilteredWrittenBytesPerSecond, + bool EnableBacklog) { ZEN_TRACE_CPU("AsyncWriteDownloadedChunk"); @@ -4427,7 +4433,7 @@ BuildsOperationUpdateFolder::AsyncWriteDownloadedChunk(const std::filesystem::pa } } }, - WorkerThreadPool::EMode::DisableBacklog); + EnableBacklog ? WorkerThreadPool::EMode::EnableBacklog : WorkerThreadPool::EMode::DisableBacklog); } void diff --git a/src/zenremotestore/include/zenremotestore/builds/buildstorageoperations.h b/src/zenremotestore/include/zenremotestore/builds/buildstorageoperations.h index 47f402e15..6304159ae 100644 --- a/src/zenremotestore/include/zenremotestore/builds/buildstorageoperations.h +++ b/src/zenremotestore/include/zenremotestore/builds/buildstorageoperations.h @@ -378,7 +378,8 @@ private: std::span<std::atomic<uint32_t>> SequenceIndexChunksLeftToWriteCounters, std::atomic<uint64_t>& WritePartsComplete, const uint64_t TotalPartWriteCount, - FilteredRate& FilteredWrittenBytesPerSecond); + FilteredRate& FilteredWrittenBytesPerSecond, + bool EnableBacklog); void VerifyAndCompleteChunkSequencesAsync(std::span<const uint32_t> RemoteSequenceIndexes, ParallelWork& Work); bool CompleteSequenceChunk(uint32_t RemoteSequenceIndex, std::span<std::atomic<uint32_t>> SequenceIndexChunksLeftToWriteCounters); |