Added a little bit more logging for the node checkin/bigtable write process

This commit is contained in:
Grant Limberg 2026-04-03 09:52:55 -07:00
parent ea5c91b0e9
commit af7eae5d9e
No known key found for this signature in database
GPG key ID: 8F2F97D3BE8D7735
2 changed files with 5 additions and 2 deletions

View file

@ -85,6 +85,7 @@ void BigTableStatusWriter::writePending()
toWrite.swap(_pending);
}
if (toWrite.empty()) {
fprintf(stderr, "BigTableStatusWriter::writePending: nothing to write\n");
return;
}

View file

@ -1539,11 +1539,10 @@ void CentralDB::onlineNotificationThread()
lastOnline.swap(_lastOnline);
}
uint64_t updateCount = 0;
uint64_t writtenCount = 0;
auto c = _pool->borrow();
pqxx::work w(*c->c);
for (auto i = lastOnline.begin(); i != lastOnline.end(); ++i) {
updateCount += 1;
uint64_t nwid_i = i->first.first;
char nwidTmp[64];
char memTmp[64];
@ -1605,7 +1604,10 @@ void CentralDB::onlineNotificationThread()
_statusWriter->updateNodeStatus(networkId, memberId, os, arch, version, i->second.physicalAddress,
ts, frontend);
writtenCount++;
}
fprintf(stderr, "onlineNotificationThread: %llu entries in lastOnline, %llu passed to status writer\n",
(unsigned long long)lastOnline.size(), (unsigned long long)writtenCount);
_statusWriter->writePending();
w.commit();
_pool->unborrow(c);