From 34c782b11e0a93db439a8033123cf8929e7ad169 Mon Sep 17 00:00:00 2001 From: ms Date: Tue, 9 Jul 2024 12:41:52 +0200 Subject: [PATCH] catch up all archive slices --- validator/db/archive-manager.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/validator/db/archive-manager.cpp b/validator/db/archive-manager.cpp index cf623d0fa..97275a9dd 100644 --- a/validator/db/archive-manager.cpp +++ b/validator/db/archive-manager.cpp @@ -1008,13 +1008,15 @@ td::Status ArchiveManager::catch_up_package(const PackageId& id) { FileDescription desc{id, x->deleted_}; desc.first_blocks = std::move(first_blocks); desc.file = std::move(it->second.file); + if (!desc.deleted) { + td::actor::send_closure(desc.file_actor_id(), &ArchiveSlice::try_catch_up_with_primary); + } map.erase(it); map.emplace(id, std::move(desc)); + } else if (!it->second.deleted) { + td::actor::send_closure(it->second.file_actor_id(), &ArchiveSlice::try_catch_up_with_primary); } - - // probably we should also call ArchiveSlice::try_catch_up_with_primary for desc.file, - // but for now we do it in ArchiveManager::get_max_masterchain_seqno, since it's the only use case. - + return td::Status::OK(); }