@@ -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);
@@ -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,19 @@ 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
+ // ?
423
+ // _infileMergerConfig->mergeStmt->getQueryTemplate().sqlFragment()
424
+ // : "nullptr"));
424
425
_infileMerger =
425
426
std::make_shared<rproc::InfileMerger>(*_infileMergerConfig, _databaseModels, _semaMgrConn);
426
427
@@ -474,7 +475,7 @@ void UserQuerySelect::_expandSelectStarInMergeStatment(std::shared_ptr<query::Se
474
475
void UserQuerySelect::saveResultQuery () { _queryMetadata->saveResultQuery (_qMetaQueryId, getResultQuery ()); }
475
476
476
477
void UserQuerySelect::_setupChunking () {
477
- LOGS (_log, LOG_LVL_TRACE, " Setup chunking" );
478
+ // LOGS(_log, LOG_LVL_TRACE, "Setup chunking");
478
479
// Do not throw exceptions here, set _errorExtra .
479
480
std::shared_ptr<qproc::IndexMap> im;
480
481
std::string dominantDb = _qSession->getDominantDb ();
@@ -488,11 +489,11 @@ void UserQuerySelect::_setupChunking() {
488
489
eSet = _qSession->getEmptyChunks ();
489
490
if (!eSet) {
490
491
eSet = std::make_shared<IntSet>();
491
- LOGS (_log, LOG_LVL_WARN, " Missing empty chunks info for " << dominantDb);
492
+ // LOGS(_log, LOG_LVL_WARN, "Missing empty chunks info for " << dominantDb);
492
493
}
493
494
}
494
495
// FIXME add operator<< for QuerySession
495
- LOGS (_log, LOG_LVL_TRACE, " _qSession: " << _qSession);
496
+ // LOGS(_log, LOG_LVL_TRACE, "_qSession: " << _qSession);
496
497
if (_qSession->hasChunks ()) {
497
498
auto areaRestrictors = _qSession->getAreaRestrictors ();
498
499
auto secIdxRestrictors = _qSession->getSecIdxRestrictors ();
@@ -506,15 +507,15 @@ void UserQuerySelect::_setupChunking() {
506
507
csv = im->getAllChunks ();
507
508
}
508
509
509
- LOGS (_log, LOG_LVL_TRACE, " Chunk specs: " << util::printable (csv));
510
+ // LOGS(_log, LOG_LVL_TRACE, "Chunk specs: " << util::printable(csv));
510
511
// Filter out empty chunks
511
512
for (qproc::ChunkSpecVector::const_iterator i = csv.begin (), e = csv.end (); i != e; ++i) {
512
513
if (eSet->count (i->chunkId ) == 0 ) { // chunk not in empty?
513
514
_qSession->addChunk (*i);
514
515
}
515
516
}
516
517
} else {
517
- LOGS (_log, LOG_LVL_TRACE, " No chunks added, QuerySession will add dummy chunk" );
518
+ // LOGS(_log, LOG_LVL_TRACE, "No chunks added, QuerySession will add dummy chunk");
518
519
}
519
520
_qSession->setScanInteractive ();
520
521
}
@@ -578,8 +579,8 @@ void UserQuerySelect::qMetaRegister(std::string const& resultLocation, std::stri
578
579
_qMetaQueryId = _queryMetadata->registerQuery (qInfo, tableNames);
579
580
_queryIdStr = QueryIdHelper::makeIdStr (_qMetaQueryId);
580
581
// Add logging context with query ID
581
- QSERV_LOGCONTEXT_QUERY (_qMetaQueryId);
582
- LOGS (_log, LOG_LVL_DEBUG, " UserQuery registered " << _qSession->getOriginal ());
582
+ // QSERV_LOGCONTEXT_QUERY(_qMetaQueryId);
583
+ // LOGS(_log, LOG_LVL_DEBUG, "UserQuery registered " << _qSession->getOriginal());
583
584
584
585
// update #QID# with actual query ID
585
586
boost::replace_all (_resultLoc, " #QID#" , std::to_string (_qMetaQueryId));
@@ -597,7 +598,7 @@ void UserQuerySelect::qMetaRegister(std::string const& resultLocation, std::stri
597
598
if (_executive != nullptr ) {
598
599
_executive->setQueryId (_qMetaQueryId);
599
600
} else {
600
- LOGS (_log, LOG_LVL_WARN, " No Executive, assuming invalid query" );
601
+ // LOGS(_log, LOG_LVL_WARN, "No Executive, assuming invalid query");
601
602
}
602
603
603
604
// Note that ordering is important here, this check must happen after
@@ -626,7 +627,7 @@ void UserQuerySelect::_qMetaUpdateStatus(qmeta::QInfo::QStatus qStatus, size_t r
626
627
try {
627
628
_queryStatsData->queryStatsTmpRemove (_qMetaQueryId);
628
629
} catch (qmeta::SqlError const &) {
629
- LOGS (_log, LOG_LVL_WARN, " queryStatsTmp remove failed " << _queryIdStr);
630
+ // LOGS(_log, LOG_LVL_WARN, "queryStatsTmp remove failed " << _queryIdStr);
630
631
}
631
632
}
632
633
@@ -637,7 +638,7 @@ void UserQuerySelect::_qMetaUpdateMessages() {
637
638
try {
638
639
_queryMetadata->addQueryMessages (_qMetaQueryId, msgStore);
639
640
} catch (qmeta::SqlError const & ex) {
640
- LOGS (_log, LOG_LVL_WARN, " UserQuerySelect::_qMetaUpdateMessages failed " << ex.what ());
641
+ // LOGS(_log, LOG_LVL_WARN, "UserQuerySelect::_qMetaUpdateMessages failed " << ex.what());
641
642
}
642
643
}
643
644
0 commit comments