From b26e445273ec8ed739bfa7a916cb335af01b47c2 Mon Sep 17 00:00:00 2001 From: jolavillette Date: Wed, 5 Aug 2026 13:24:48 +0200 Subject: [PATCH] gxs: log a summary line when the msg meta cache warm-up completes One line per database (rows, slices, duration) so the background warm-up can be observed and validated from the logs. Co-Authored-By: Claude Fable 5 --- src/gxs/rsdataservice.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/gxs/rsdataservice.cc b/src/gxs/rsdataservice.cc index cef80630a..0504831f2 100644 --- a/src/gxs/rsdataservice.cc +++ b/src/gxs/rsdataservice.cc @@ -1335,6 +1335,9 @@ void RsDataService::msgMetaWarmupThreadBody() int64_t last_rowid = 0; bool done = false; + uint64_t total_rows = 0; + uint32_t n_slices = 0; + auto t0 = std::chrono::steady_clock::now(); while(!done && !mMsgMetaWarmupStop) { @@ -1372,6 +1375,9 @@ void RsDataService::msgMetaWarmupThreadBody() delete c; + total_rows += n_rows; + ++n_slices; + if(n_rows < WARMUP_SLICE_ROWS) { // Last slice. Every group of this database now holds all its @@ -1389,6 +1395,13 @@ void RsDataService::msgMetaWarmupThreadBody() if(!done) std::this_thread::sleep_for(std::chrono::milliseconds(20)); } + + if(done) + RsInfo() << mDbName << ": message meta cache warm-up completed: " + << total_rows << " metas in " << n_slices << " slices, " + << std::chrono::duration_cast( + std::chrono::steady_clock::now() - t0).count() + << " ms" << std::endl; } int RsDataService::retrieveGxsMsgMetaData(const GxsMsgReq& reqIds, GxsMsgMetaResult& msgMeta)