From fab4dfaef2bfc8bf0c46d372efe85dd79fce1068 Mon Sep 17 00:00:00 2001 From: Yura Sorokin Date: Wed, 30 Sep 2026 18:40:31 +0200 Subject: [PATCH] PS-69 fix: Storage checkpointing settings are ignored https://perconadev.atlassian.net/browse/PBS-69 Fixed a regression introduced during one of the refactorings for PBS-6 "Rework storage layer abstractions to support simultaneous reads and writes" (https://perconadev.atlassian.net/browse/PBS-6) (commit 7f8cb69) where the part where checkpointing parameters were transferred from the main configuration file to the 'binsrv::storage' object was silently dropped. --- src/binsrv/storage.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/binsrv/storage.cpp b/src/binsrv/storage.cpp index 2db14602..d95f6c60 100644 --- a/src/binsrv/storage.cpp +++ b/src/binsrv/storage.cpp @@ -49,7 +49,21 @@ namespace binsrv { storage::storage(basic_logger_ptr logger, const main_config &config, storage_construction_mode_type construction_mode) : core_{std::make_unique(std::move(logger), config, - construction_mode)} {} + construction_mode)} { + const auto &storage_config{config.root().get<"storage">()}; + + const auto &checkpoint_size_opt{storage_config.get<"checkpoint_size">()}; + if (checkpoint_size_opt.has_value()) { + checkpoint_size_bytes_ = checkpoint_size_opt->get_value(); + } + + const auto &checkpoint_interval_opt{ + storage_config.get<"checkpoint_interval">()}; + if (checkpoint_interval_opt.has_value()) { + checkpoint_interval_seconds_ = + std::chrono::seconds{checkpoint_interval_opt->get_value()}; + } +} storage::~storage() { if (core_->get_construction_mode() ==