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 <noreply@anthropic.com>
This commit is contained in:
jolavillette 2026-08-05 13:24:48 +02:00
parent d02b5dd2b3
commit b26e445273

View File

@ -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::milliseconds>(
std::chrono::steady_clock::now() - t0).count()
<< " ms" << std::endl;
}
int RsDataService::retrieveGxsMsgMetaData(const GxsMsgReq& reqIds, GxsMsgMetaResult& msgMeta)