@@ -157,7 +157,7 @@ std::string UserQuerySelect::getError() const {
157
157
158
158
// / Attempt to kill in progress.
159
159
void UserQuerySelect::kill () {
160
- LOGS (_log, LOG_LVL_DEBUG, " UserQuerySelect kill" );
160
+ // LOGS(_log, LOG_LVL_DEBUG, "UserQuerySelect kill");
161
161
std::lock_guard<std::mutex> lock (_killMutex);
162
162
if (!_killed) {
163
163
_killed = true ;
@@ -228,7 +228,7 @@ std::string UserQuerySelect::getResultQuery() const {
228
228
if (not orderBy.empty ()) {
229
229
resultQuery += " " + orderBy;
230
230
}
231
- LOGS (_log, LOG_LVL_DEBUG, " made result query:" << resultQuery);
231
+ // LOGS(_log, LOG_LVL_DEBUG, "made result query:" << resultQuery);
232
232
return resultQuery;
233
233
}
234
234
@@ -238,7 +238,7 @@ void UserQuerySelect::submit() {
238
238
239
239
// Using the QuerySession, generate query specs (text, db, chunkId) and then
240
240
// create query messages and send them to the async query manager.
241
- LOGS (_log, LOG_LVL_DEBUG, " UserQuerySelect beginning submission" );
241
+ // LOGS(_log, LOG_LVL_DEBUG, "UserQuerySelect beginning submission");
242
242
assert (_infileMerger);
243
243
244
244
auto taskMsgFactory = std::make_shared<qproc::TaskMsgFactory>();
@@ -249,9 +249,9 @@ void UserQuerySelect::submit() {
249
249
250
250
auto queryTemplates = _qSession->makeQueryTemplates ();
251
251
252
- LOGS (_log, LOG_LVL_DEBUG,
253
- " first query template:" << (queryTemplates.size () > 0 ? queryTemplates[0 ].sqlFragment ()
254
- : " none produced." ));
252
+ // LOGS(_log, LOG_LVL_DEBUG,
253
+ // "first query template:" << (queryTemplates.size() > 0 ? queryTemplates[0].sqlFragment()
254
+ // : "none produced."));
255
255
256
256
// Writing query for each chunk, stop if query is cancelled.
257
257
// attempt to change priority, requires root
@@ -266,7 +266,7 @@ void UserQuerySelect::submit() {
266
266
try {
267
267
_queryStatsData->queryStatsTmpRegister (_qMetaQueryId, _qSession->getChunksSize ());
268
268
} catch (qmeta::SqlError const & e) {
269
- LOGS (_log, LOG_LVL_WARN, " Failed queryStatsTmpRegister " << e.what ());
269
+ // LOGS(_log, LOG_LVL_WARN, "Failed queryStatsTmpRegister " << e.what());
270
270
}
271
271
272
272
_executive->setScanInteractive (_qSession->getScanInteractive ());
@@ -278,7 +278,7 @@ void UserQuerySelect::submit() {
278
278
std::function<void (util::CmdData*)> funcBuildJob = [this , sequence, // sequence must be a copy
279
279
&chunkSpec, &queryTemplates, &chunks, &chunksMtx,
280
280
&ttn, &taskMsgFactory](util::CmdData*) {
281
- QSERV_LOGCONTEXT_QUERY (_qMetaQueryId);
281
+ // QSERV_LOGCONTEXT_QUERY(_qMetaQueryId);
282
282
283
283
qproc::ChunkQuerySpec::Ptr cs;
284
284
{
@@ -308,7 +308,7 @@ void UserQuerySelect::submit() {
308
308
threadPriority.restoreOriginalValues ();
309
309
}
310
310
311
- LOGS (_log, LOG_LVL_DEBUG, " total jobs in query=" << sequence);
311
+ // LOGS(_log, LOG_LVL_DEBUG, "total jobs in query=" << sequence);
312
312
_executive->waitForAllJobsToStart ();
313
313
314
314
// we only care about per-chunk info for ASYNC queries
@@ -327,7 +327,7 @@ QueryState UserQuerySelect::join() {
327
327
int64_t finalRows = 0 ;
328
328
if (!_infileMerger->finalize (collectedBytes, finalRows)) {
329
329
successful = false ;
330
- LOGS (_log, LOG_LVL_ERROR, " InfileMerger::finalize failed" );
330
+ // LOGS(_log, LOG_LVL_ERROR, "InfileMerger::finalize failed");
331
331
// Error: 1105 SQLSTATE: HY000 (ER_UNKNOWN_ERROR) Message: Unknown error
332
332
_messageStore->addMessage (-1 , " MERGE" , 1105 , " Failure while merging result" ,
333
333
MessageSeverity::MSG_ERROR);
@@ -339,7 +339,7 @@ QueryState UserQuerySelect::join() {
339
339
} catch (std::exception const & exc) {
340
340
// exception here means error in qserv logic, we do not want to leak
341
341
// it or expose it to user, just dump it to log
342
- LOGS (_log, LOG_LVL_ERROR, " exception from _discardMerger: " << exc.what ());
342
+ // LOGS(_log, LOG_LVL_ERROR, "exception from _discardMerger: " << exc.what());
343
343
}
344
344
345
345
// Update the permanent message table.
@@ -355,15 +355,15 @@ QueryState UserQuerySelect::join() {
355
355
QueryState state = SUCCESS;
356
356
if (successful) {
357
357
_qMetaUpdateStatus (qmeta::QInfo::COMPLETED, collectedRows, collectedBytes, finalRows);
358
- LOGS (_log, LOG_LVL_INFO, " Joined everything (success)" );
358
+ // LOGS(_log, LOG_LVL_INFO, "Joined everything (success)");
359
359
} else if (_killed) {
360
360
// status is already set to ABORTED
361
- LOGS (_log, LOG_LVL_ERROR, " Joined everything (killed)" );
361
+ // LOGS(_log, LOG_LVL_ERROR, "Joined everything (killed)");
362
362
operation = proto::QueryManagement::CANCEL;
363
363
state = ERROR;
364
364
} else {
365
365
_qMetaUpdateStatus (qmeta::QInfo::FAILED, collectedRows, collectedBytes, finalRows);
366
- LOGS (_log, LOG_LVL_ERROR, " Joined everything (failure!)" );
366
+ // LOGS(_log, LOG_LVL_ERROR, "Joined everything (failure!)");
367
367
operation = proto::QueryManagement::CANCEL;
368
368
state = ERROR;
369
369
}
@@ -373,7 +373,7 @@ QueryState UserQuerySelect::join() {
373
373
xrdreq::QueryManagementAction::notifyAllWorkers (czarConfig->getXrootdFrontendUrl (), operation,
374
374
_qMetaCzarId, _qMetaQueryId);
375
375
} catch (std::exception const & ex) {
376
- LOGS (_log, LOG_LVL_WARN, ex.what ());
376
+ // LOGS(_log, LOG_LVL_WARN, ex.what());
377
377
}
378
378
}
379
379
return state;
@@ -409,18 +409,18 @@ void UserQuerySelect::discard() {
409
409
// Silence merger discarding errors, because this object is being released.
410
410
// client no longer cares about merger errors.
411
411
}
412
- LOGS (_log, LOG_LVL_INFO, " Discarded UserQuerySelect" );
412
+ // LOGS(_log, LOG_LVL_INFO, "Discarded UserQuerySelect");
413
413
}
414
414
415
415
// / Setup merger (for results handling and aggregation)
416
416
void UserQuerySelect::setupMerger () {
417
- LOGS (_log, LOG_LVL_TRACE, " Setup merger" );
417
+ // LOGS(_log, LOG_LVL_TRACE, "Setup merger");
418
418
_infileMergerConfig->targetTable = _resultTable;
419
419
_infileMergerConfig->mergeStmt = _qSession->getMergeStmt ();
420
- LOGS (_log, LOG_LVL_DEBUG,
421
- " setting mergeStmt:" << (_infileMergerConfig->mergeStmt != nullptr
422
- ? _infileMergerConfig->mergeStmt ->getQueryTemplate ().sqlFragment ()
423
- : " nullptr" ));
420
+ // LOGS(_log, LOG_LVL_DEBUG,
421
+ // "setting mergeStmt:" << (_infileMergerConfig->mergeStmt != nullptr
422
+ // ? _infileMergerConfig->mergeStmt->getQueryTemplate().sqlFragment()
423
+ // : "nullptr"));
424
424
_infileMerger =
425
425
std::make_shared<rproc::InfileMerger>(*_infileMergerConfig, _databaseModels, _semaMgrConn);
426
426
@@ -474,7 +474,7 @@ void UserQuerySelect::_expandSelectStarInMergeStatment(std::shared_ptr<query::Se
474
474
void UserQuerySelect::saveResultQuery () { _queryMetadata->saveResultQuery (_qMetaQueryId, getResultQuery ()); }
475
475
476
476
void UserQuerySelect::_setupChunking () {
477
- LOGS (_log, LOG_LVL_TRACE, " Setup chunking" );
477
+ // LOGS(_log, LOG_LVL_TRACE, "Setup chunking");
478
478
// Do not throw exceptions here, set _errorExtra .
479
479
std::shared_ptr<qproc::IndexMap> im;
480
480
std::string dominantDb = _qSession->getDominantDb ();
@@ -488,11 +488,11 @@ void UserQuerySelect::_setupChunking() {
488
488
eSet = _qSession->getEmptyChunks ();
489
489
if (!eSet) {
490
490
eSet = std::make_shared<IntSet>();
491
- LOGS (_log, LOG_LVL_WARN, " Missing empty chunks info for " << dominantDb);
491
+ // LOGS(_log, LOG_LVL_WARN, "Missing empty chunks info for " << dominantDb);
492
492
}
493
493
}
494
494
// FIXME add operator<< for QuerySession
495
- LOGS (_log, LOG_LVL_TRACE, " _qSession: " << _qSession);
495
+ // LOGS(_log, LOG_LVL_TRACE, "_qSession: " << _qSession);
496
496
if (_qSession->hasChunks ()) {
497
497
auto areaRestrictors = _qSession->getAreaRestrictors ();
498
498
auto secIdxRestrictors = _qSession->getSecIdxRestrictors ();
@@ -506,15 +506,15 @@ void UserQuerySelect::_setupChunking() {
506
506
csv = im->getAllChunks ();
507
507
}
508
508
509
- LOGS (_log, LOG_LVL_TRACE, " Chunk specs: " << util::printable (csv));
509
+ // LOGS(_log, LOG_LVL_TRACE, "Chunk specs: " << util::printable(csv));
510
510
// Filter out empty chunks
511
511
for (qproc::ChunkSpecVector::const_iterator i = csv.begin (), e = csv.end (); i != e; ++i) {
512
512
if (eSet->count (i->chunkId ) == 0 ) { // chunk not in empty?
513
513
_qSession->addChunk (*i);
514
514
}
515
515
}
516
516
} else {
517
- LOGS (_log, LOG_LVL_TRACE, " No chunks added, QuerySession will add dummy chunk" );
517
+ // LOGS(_log, LOG_LVL_TRACE, "No chunks added, QuerySession will add dummy chunk");
518
518
}
519
519
_qSession->setScanInteractive ();
520
520
}
@@ -578,8 +578,8 @@ void UserQuerySelect::qMetaRegister(std::string const& resultLocation, std::stri
578
578
_qMetaQueryId = _queryMetadata->registerQuery (qInfo, tableNames);
579
579
_queryIdStr = QueryIdHelper::makeIdStr (_qMetaQueryId);
580
580
// Add logging context with query ID
581
- QSERV_LOGCONTEXT_QUERY (_qMetaQueryId);
582
- LOGS (_log, LOG_LVL_DEBUG, " UserQuery registered " << _qSession->getOriginal ());
581
+ // QSERV_LOGCONTEXT_QUERY(_qMetaQueryId);
582
+ // LOGS(_log, LOG_LVL_DEBUG, "UserQuery registered " << _qSession->getOriginal());
583
583
584
584
// update #QID# with actual query ID
585
585
boost::replace_all (_resultLoc, " #QID#" , std::to_string (_qMetaQueryId));
@@ -597,7 +597,7 @@ void UserQuerySelect::qMetaRegister(std::string const& resultLocation, std::stri
597
597
if (_executive != nullptr ) {
598
598
_executive->setQueryId (_qMetaQueryId);
599
599
} else {
600
- LOGS (_log, LOG_LVL_WARN, " No Executive, assuming invalid query" );
600
+ // LOGS(_log, LOG_LVL_WARN, "No Executive, assuming invalid query");
601
601
}
602
602
603
603
// Note that ordering is important here, this check must happen after
@@ -626,7 +626,7 @@ void UserQuerySelect::_qMetaUpdateStatus(qmeta::QInfo::QStatus qStatus, size_t r
626
626
try {
627
627
_queryStatsData->queryStatsTmpRemove (_qMetaQueryId);
628
628
} catch (qmeta::SqlError const &) {
629
- LOGS (_log, LOG_LVL_WARN, " queryStatsTmp remove failed " << _queryIdStr);
629
+ // LOGS(_log, LOG_LVL_WARN, "queryStatsTmp remove failed " << _queryIdStr);
630
630
}
631
631
}
632
632
@@ -637,7 +637,7 @@ void UserQuerySelect::_qMetaUpdateMessages() {
637
637
try {
638
638
_queryMetadata->addQueryMessages (_qMetaQueryId, msgStore);
639
639
} catch (qmeta::SqlError const & ex) {
640
- LOGS (_log, LOG_LVL_WARN, " UserQuerySelect::_qMetaUpdateMessages failed " << ex.what ());
640
+ // LOGS(_log, LOG_LVL_WARN, "UserQuerySelect::_qMetaUpdateMessages failed " << ex.what());
641
641
}
642
642
}
643
643
0 commit comments