New upstream version 8.1.0

This commit is contained in:
geos_one
2025-08-10 01:34:16 +02:00
commit c891bb7105
4398 changed files with 838833 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
#include <common/components/worker/queue/MultiWorkQueue.h>
#include <program/Program.h>
#include <session/SessionStore.h>
#include "RequestMetaDataMsgEx.h"
bool RequestMetaDataMsgEx::processIncoming(ResponseContext& ctx)
{
LogContext log("RequestMetaDataMsg incoming");
App *app = Program::getApp();
Node& node = app->getLocalNode();
MultiWorkQueue *workQueue = app->getWorkQueue();
unsigned sessionCount = app->getSessions()->getSize() + app->getMirroredSessions()->getSize();
NicAddressList nicList(node.getNicList());
std::string hostnameid = System::getHostname();
// highresStats
HighResStatsList statsHistory;
uint64_t lastStatsMS = getValue();
// get stats history
StatsCollector* statsCollector = app->getStatsCollector();
statsCollector->getStatsSince(lastStatsMS, statsHistory);
RequestMetaDataRespMsg requestMetaDataRespMsg(node.getAlias(), hostnameid, node.getNumID(), &nicList,
app->getMetaRoot().getID() == node.getNumID(), workQueue->getIndirectWorkListSize(),
workQueue->getDirectWorkListSize(), sessionCount, &statsHistory);
ctx.sendResponse(requestMetaDataRespMsg);
LOG_DEBUG_CONTEXT(log, 5, std::string("Sent a message with type: " ) +
StringTk::uintToStr(requestMetaDataRespMsg.getMsgType() ) + std::string(" to mon") );
app->getNodeOpStats()->updateNodeOp(ctx.getSocket()->getPeerIP(), MetaOpCounter_REQUESTMETADATA,
getMsgHeaderUserID() );
return true;
}