Skip to content

Commit

Permalink
Reduced logging level in the worker request classes
Browse files Browse the repository at this point in the history
  • Loading branch information
iagaponenko committed Aug 8, 2023
1 parent 3044511 commit 2245505
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 33 deletions.
6 changes: 3 additions & 3 deletions src/xrdreq/ChunkGroupQservRequest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ namespace lsst::qserv::xrdreq {
ChunkGroupQservRequest::ChunkGroupQservRequest(bool add, unsigned int chunk, vector<string> const& databases,
bool force, CallbackType onFinish)
: _add(add), _chunk(chunk), _databases(databases), _force(force), _onFinish(onFinish) {
LOGS(_log, LOG_LVL_DEBUG,
LOGS(_log, LOG_LVL_TRACE,
"ChunkGroupQservRequest[" << (_add ? "add" : "remove") << "] ** CONSTRUCTED **");
}

ChunkGroupQservRequest::~ChunkGroupQservRequest() {
LOGS(_log, LOG_LVL_DEBUG, "ChunkGroupQservRequest[" << (_add ? "add" : "remove") << "] ** DELETED **");
LOGS(_log, LOG_LVL_TRACE, "ChunkGroupQservRequest[" << (_add ? "add" : "remove") << "] ** DELETED **");
}

void ChunkGroupQservRequest::onRequest(proto::FrameBuffer& buf) {
Expand All @@ -67,7 +67,7 @@ void ChunkGroupQservRequest::onResponse(proto::FrameBufferView& view) {
proto::WorkerCommandChunkGroupR reply;
view.parse(reply);

LOGS(_log, LOG_LVL_DEBUG,
LOGS(_log, LOG_LVL_TRACE,
"ChunkGroupQservRequest[" << (_add ? "add" : "remove") << "** SERVICE REPLY ** status: "
<< proto::WorkerCommandStatus_Code_Name(reply.status().code()));

Expand Down
10 changes: 5 additions & 5 deletions src/xrdreq/ChunkListQservRequest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ namespace lsst::qserv::xrdreq {

ChunkListQservRequest::ChunkListQservRequest(bool rebuild, bool reload, CallbackType onFinish)
: _rebuild(rebuild), _reload(reload), _onFinish(onFinish) {
LOGS(_log, LOG_LVL_DEBUG, "ChunkListQservRequest ** CONSTRUCTED **");
LOGS(_log, LOG_LVL_TRACE, "ChunkListQservRequest ** CONSTRUCTED **");
}

ChunkListQservRequest::~ChunkListQservRequest() {
LOGS(_log, LOG_LVL_DEBUG, "ChunkListQservRequest ** DELETED **");
LOGS(_log, LOG_LVL_TRACE, "ChunkListQservRequest ** DELETED **");
}

void ChunkListQservRequest::onRequest(proto::FrameBuffer& buf) {
Expand All @@ -63,7 +63,7 @@ void ChunkListQservRequest::onResponse(proto::FrameBufferView& view) {
proto::WorkerCommandUpdateChunkListR reply;
view.parse(reply);

LOGS(_log, LOG_LVL_DEBUG,
LOGS(_log, LOG_LVL_TRACE,
context << "** SERVICE REPLY ** status: "
<< proto::WorkerCommandStatus_Code_Name(reply.status().code()));

Expand All @@ -77,15 +77,15 @@ void ChunkListQservRequest::onResponse(proto::FrameBufferView& view) {
Chunk chunk{chunkEntry.chunk(), chunkEntry.db()};
added.push_back(chunk);
}
LOGS(_log, LOG_LVL_DEBUG, context << "total chunks added: " << numAdded);
LOGS(_log, LOG_LVL_TRACE, context << "total chunks added: " << numAdded);

int const numRemoved = reply.removed_size();
for (int i = 0; i < numRemoved; i++) {
proto::WorkerCommandChunk const& chunkEntry = reply.removed(i);
Chunk chunk{chunkEntry.chunk(), chunkEntry.db()};
removed.push_back(chunk);
}
LOGS(_log, LOG_LVL_DEBUG, context << "total chunks removed: " << numRemoved);
LOGS(_log, LOG_LVL_TRACE, context << "total chunks removed: " << numRemoved);
}
if (nullptr != _onFinish) {
// Clearing the stored callback after finishing the up-stream notification
Expand Down
8 changes: 4 additions & 4 deletions src/xrdreq/GetChunkListQservRequest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ GetChunkListQservRequest::Ptr GetChunkListQservRequest::create(
GetChunkListQservRequest::GetChunkListQservRequest(bool inUseOnly,
GetChunkListQservRequest::CallbackType onFinish)
: _inUseOnly(inUseOnly), _onFinish(onFinish) {
LOGS(_log, LOG_LVL_DEBUG, "GetChunkListQservRequest ** CONSTRUCTED **");
LOGS(_log, LOG_LVL_TRACE, "GetChunkListQservRequest ** CONSTRUCTED **");
}

GetChunkListQservRequest::~GetChunkListQservRequest() {
LOGS(_log, LOG_LVL_DEBUG, "GetChunkListQservRequest ** DELETED **");
LOGS(_log, LOG_LVL_TRACE, "GetChunkListQservRequest ** DELETED **");
}

void GetChunkListQservRequest::onRequest(proto::FrameBuffer& buf) {
Expand All @@ -66,7 +66,7 @@ void GetChunkListQservRequest::onResponse(proto::FrameBufferView& view) {
proto::WorkerCommandGetChunkListR reply;
view.parse(reply);

LOGS(_log, LOG_LVL_DEBUG,
LOGS(_log, LOG_LVL_TRACE,
context << "** SERVICE REPLY ** status: "
<< proto::WorkerCommandStatus_Code_Name(reply.status().code()));

Expand All @@ -80,7 +80,7 @@ void GetChunkListQservRequest::onResponse(proto::FrameBufferView& view) {
Chunk chunk{chunkEntry.chunk(), chunkEntry.db(), chunkEntry.use_count()};
chunks.push_back(chunk);
}
LOGS(_log, LOG_LVL_DEBUG, context << "total chunks: " << num);
LOGS(_log, LOG_LVL_TRACE, context << "total chunks: " << num);
}
if (nullptr != _onFinish) {
// Clearing the stored callback after finishing the up-stream notification
Expand Down
4 changes: 2 additions & 2 deletions src/xrdreq/GetDbStatusQservRequest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ GetDbStatusQservRequest::Ptr GetDbStatusQservRequest::create(GetDbStatusQservReq

GetDbStatusQservRequest::GetDbStatusQservRequest(GetDbStatusQservRequest::CallbackType onFinish)
: _onFinish(onFinish) {
LOGS(_log, LOG_LVL_DEBUG, "GetDbStatusQservRequest ** CONSTRUCTED **");
LOGS(_log, LOG_LVL_TRACE, "GetDbStatusQservRequest ** CONSTRUCTED **");
}

GetDbStatusQservRequest::~GetDbStatusQservRequest() {
LOGS(_log, LOG_LVL_DEBUG, "GetDbStatusQservRequest ** DELETED **");
LOGS(_log, LOG_LVL_TRACE, "GetDbStatusQservRequest ** DELETED **");
}

void GetDbStatusQservRequest::onRequest(proto::FrameBuffer& buf) {
Expand Down
4 changes: 2 additions & 2 deletions src/xrdreq/GetStatusQservRequest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ GetStatusQservRequest::Ptr GetStatusQservRequest::create(wbase::TaskSelector con
GetStatusQservRequest::GetStatusQservRequest(wbase::TaskSelector const& taskSelector,
GetStatusQservRequest::CallbackType onFinish)
: _taskSelector(taskSelector), _onFinish(onFinish) {
LOGS(_log, LOG_LVL_DEBUG, "GetStatusQservRequest ** CONSTRUCTED **");
LOGS(_log, LOG_LVL_TRACE, "GetStatusQservRequest ** CONSTRUCTED **");
}

GetStatusQservRequest::~GetStatusQservRequest() {
LOGS(_log, LOG_LVL_DEBUG, "GetStatusQservRequest ** DELETED **");
LOGS(_log, LOG_LVL_TRACE, "GetStatusQservRequest ** DELETED **");
}

void GetStatusQservRequest::onRequest(proto::FrameBuffer& buf) {
Expand Down
12 changes: 6 additions & 6 deletions src/xrdreq/QservRequest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ QservRequest::~QservRequest() {
delete[] _buf;

--_numClassInstances;
LOGS(_log, LOG_LVL_DEBUG, "QservRequest destructed instances: " << _numClassInstances);
LOGS(_log, LOG_LVL_TRACE, "QservRequest destructed instances: " << _numClassInstances);
}

QservRequest::QservRequest()
Expand All @@ -60,7 +60,7 @@ QservRequest::QservRequest()
// This report is used solely for debugging purposes to allow tracking
// potential memory leaks within applications.
++_numClassInstances;
LOGS(_log, LOG_LVL_DEBUG, "QservRequest constructed instances: " << _numClassInstances);
LOGS(_log, LOG_LVL_TRACE, "QservRequest constructed instances: " << _numClassInstances);
}

void QservRequest::cancel() {
Expand Down Expand Up @@ -113,15 +113,15 @@ bool QservRequest::ProcessResponse(const XrdSsiErrInfo& eInfo, const XrdSsiRespI
onError(errorStr);
return false;
}
LOGS(_log, LOG_LVL_DEBUG,
LOGS(_log, LOG_LVL_TRACE,
context << " eInfo.rType: " << rInfo.rType << "(" << rInfo.State() << ")"
<< ", eInfo.blen: " << rInfo.blen);

switch (rInfo.rType) {
case XrdSsiRespInfo::isData:
case XrdSsiRespInfo::isStream:

LOGS(_log, LOG_LVL_DEBUG, context << "** REQUESTING RESPONSE DATA **");
LOGS(_log, LOG_LVL_TRACE, context << "** REQUESTING RESPONSE DATA **");
GetResponseData(_buf + _bufSize, _bufIncrementSize);
return true;

Expand Down Expand Up @@ -149,7 +149,7 @@ bool QservRequest::ProcessResponse(const XrdSsiErrInfo& eInfo, const XrdSsiRespI
void QservRequest::ProcessResponseData(const XrdSsiErrInfo& eInfo, char* buff, int blen, bool last) {
string const context = "QservRequest::" + string(__func__) + " ";

LOGS(_log, LOG_LVL_DEBUG, context << "eInfo.isOK: " << eInfo.isOK());
LOGS(_log, LOG_LVL_TRACE, context << "eInfo.isOK: " << eInfo.isOK());

if (not eInfo.isOK()) {
// This will decrement the reference counter to the pointee at the end of the current
Expand All @@ -175,7 +175,7 @@ void QservRequest::ProcessResponseData(const XrdSsiErrInfo& eInfo, char* buff, i
onError(errorStr);

} else {
LOGS(_log, LOG_LVL_DEBUG, context << "blen: " << blen << ", last: " << last);
LOGS(_log, LOG_LVL_TRACE, context << "blen: " << blen << ", last: " << last);

// Update the byte counter
_bufSize += blen;
Expand Down
4 changes: 2 additions & 2 deletions src/xrdreq/QueryManagementAction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ void QueryManagementAction::notifyAllWorkers(string const& xrootdFrontendUrl,
}

QueryManagementAction::QueryManagementAction() {
LOGS(_log, LOG_LVL_DEBUG, "QueryManagementAction ** CONSTRUCTED **");
LOGS(_log, LOG_LVL_TRACE, "QueryManagementAction ** CONSTRUCTED **");
}

QueryManagementAction::~QueryManagementAction() {
LOGS(_log, LOG_LVL_DEBUG, "QueryManagementAction ** DELETED **");
LOGS(_log, LOG_LVL_TRACE, "QueryManagementAction ** DELETED **");
}

void QueryManagementAction::_notifyAllWorkers(std::string const& xrootdFrontendUrl,
Expand Down
4 changes: 2 additions & 2 deletions src/xrdreq/QueryManagementRequest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ QueryManagementRequest::Ptr QueryManagementRequest::create(proto::QueryManagemen
QueryManagementRequest::QueryManagementRequest(proto::QueryManagement::Operation op, QueryId queryId,
QueryManagementRequest::CallbackType onFinish)
: _op(op), _queryId(queryId), _onFinish(onFinish) {
LOGS(_log, LOG_LVL_DEBUG, "QueryManagementRequest ** CONSTRUCTED **");
LOGS(_log, LOG_LVL_TRACE, "QueryManagementRequest ** CONSTRUCTED **");
}

QueryManagementRequest::~QueryManagementRequest() {
LOGS(_log, LOG_LVL_DEBUG, "QueryManagementRequest ** DELETED **");
LOGS(_log, LOG_LVL_TRACE, "QueryManagementRequest ** DELETED **");
}

void QueryManagementRequest::onRequest(proto::FrameBuffer& buf) {
Expand Down
8 changes: 4 additions & 4 deletions src/xrdreq/SetChunkListQservRequest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ SetChunkListQservRequest::SetChunkListQservRequest(SetChunkListQservRequest::Chu
vector<string> const& databases, bool force,
SetChunkListQservRequest::CallbackType onFinish)
: _chunks(chunks), _databases(databases), _force(force), _onFinish(onFinish) {
LOGS(_log, LOG_LVL_DEBUG, "SetChunkListQservRequest ** CONSTRUCTED **");
LOGS(_log, LOG_LVL_TRACE, "SetChunkListQservRequest ** CONSTRUCTED **");
}

SetChunkListQservRequest::~SetChunkListQservRequest() {
LOGS(_log, LOG_LVL_DEBUG, "SetChunkListQservRequest ** DELETED **");
LOGS(_log, LOG_LVL_TRACE, "SetChunkListQservRequest ** DELETED **");
}

void SetChunkListQservRequest::onRequest(proto::FrameBuffer& buf) {
Expand All @@ -80,7 +80,7 @@ void SetChunkListQservRequest::onResponse(proto::FrameBufferView& view) {
proto::WorkerCommandSetChunkListR reply;
view.parse(reply);

LOGS(_log, LOG_LVL_DEBUG,
LOGS(_log, LOG_LVL_TRACE,
context << "** SERVICE REPLY ** status: "
<< proto::WorkerCommandStatus_Code_Name(reply.status().code()));

Expand All @@ -93,7 +93,7 @@ void SetChunkListQservRequest::onResponse(proto::FrameBufferView& view) {
Chunk chunk{chunkEntry.chunk(), chunkEntry.db(), chunkEntry.use_count()};
chunks.push_back(chunk);
}
LOGS(_log, LOG_LVL_DEBUG, context << "total chunks: " << num);
LOGS(_log, LOG_LVL_TRACE, context << "total chunks: " << num);
}
if (nullptr != _onFinish) {
// Clearing the stored callback after finishing the up-stream notification
Expand Down
6 changes: 3 additions & 3 deletions src/xrdreq/TestEchoQservRequest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ TestEchoQservRequest::Ptr TestEchoQservRequest::create(string const& value,

TestEchoQservRequest::TestEchoQservRequest(string const& value, TestEchoQservRequest::CallbackType onFinish)
: _value(value), _onFinish(onFinish) {
LOGS(_log, LOG_LVL_DEBUG, "TestEchoQservRequest ** CONSTRUCTED **");
LOGS(_log, LOG_LVL_TRACE, "TestEchoQservRequest ** CONSTRUCTED **");
}

TestEchoQservRequest::~TestEchoQservRequest() {
LOGS(_log, LOG_LVL_DEBUG, "TestEchoQservRequest ** DELETED **");
LOGS(_log, LOG_LVL_TRACE, "TestEchoQservRequest ** DELETED **");
}

void TestEchoQservRequest::onRequest(proto::FrameBuffer& buf) {
Expand All @@ -67,7 +67,7 @@ void TestEchoQservRequest::onResponse(proto::FrameBufferView& view) {
proto::WorkerCommandTestEchoR reply;
view.parse(reply);

LOGS(_log, LOG_LVL_DEBUG,
LOGS(_log, LOG_LVL_TRACE,
"TestEchoQservRequest ** SERVICE REPLY ** status: "
<< proto::WorkerCommandStatus_Code_Name(reply.status().code()));

Expand Down

0 comments on commit 2245505

Please sign in to comment.