mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2026-04-07 05:40:57 -07:00
Added a little bit more logging for the node checkin/bigtable write process
This commit is contained in:
parent
ea5c91b0e9
commit
af7eae5d9e
2 changed files with 5 additions and 2 deletions
|
|
@ -85,6 +85,7 @@ void BigTableStatusWriter::writePending()
|
|||
toWrite.swap(_pending);
|
||||
}
|
||||
if (toWrite.empty()) {
|
||||
fprintf(stderr, "BigTableStatusWriter::writePending: nothing to write\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue