@@ -222,6 +222,7 @@ QueryRequest::~QueryRequest() {
222
222
// content of request data
223
223
char * QueryRequest::GetRequest (int & requestLength) {
224
224
QSERV_LOGCONTEXT_QUERY_JOB (_qid, _jobid);
225
+ LOGS (_log, LOG_LVL_INFO, " &&& QueryRequest::GetRequest" );
225
226
lock_guard<mutex> lock (_finishStatusMutex);
226
227
auto jq = _job;
227
228
if (_finishStatus != ACTIVE || jq == nullptr ) {
@@ -448,7 +449,7 @@ void QueryRequest::_processData(JobBase::Ptr const& jq, int blen, bool xrdLast)
448
449
ResponseHandler::BufPtr bufPtr = _askForResponseDataCmd->getBufPtr ();
449
450
_askForResponseDataCmd.reset (); // No longer need it, and don't want the destructor calling _errorFinish().
450
451
451
-
452
+ LOGS (_log, LOG_LVL_INFO, " &&&QueryRequest::_processData a " );
452
453
int const protoHeaderSize = proto::ProtoHeaderWrap::getProtoHeaderSize ();
453
454
ResponseHandler::BufPtr nextHeaderBufPtr;
454
455
@@ -463,19 +464,20 @@ void QueryRequest::_processData(JobBase::Ptr const& jq, int blen, bool xrdLast)
463
464
// - The first (bytes = blen - ProtoHeaderWrap::getProtheaderSize())
464
465
// is the result associated with the previously received header.
465
466
// - The second is the header for the next message.
466
-
467
467
int respSize = blen - protoHeaderSize;
468
468
nextHeaderBufPtr = make_shared<vector<char >>(bufPtr->begin () + respSize, bufPtr->end ());
469
-
469
+ LOGS (_log, LOG_LVL_INFO, " &&&QueryRequest::_processData b " );
470
470
// Read the result
471
471
/* &&& rebase
472
472
flushOk = jq->getDescription()->respHandler()->flush(respSize, bufPtr, last,
473
473
largeResult, nextBufSize);
474
474
*/
475
- bool largeResult = false ;
476
- int nextBufSize = 0 ;
477
- bool last = false ;
478
- bool flushOk = jq->getRespHandler ()->flush (respSize, bufPtr, last, largeResult, nextBufSize);
475
+ // &&& bool largeResult = false;
476
+ // &&& int nextBufSize = 0;
477
+ // &&& bool last = false;
478
+ // Values for last, largeResult, and nextBufSize filled in by flush
479
+ flushOk = jq->getRespHandler ()->flush (respSize, bufPtr, last, largeResult, nextBufSize);
480
+ LOGS (_log, LOG_LVL_INFO, " &&&QueryRequest::_processData c" );
479
481
if (last) {
480
482
// Last should only be true when the header is read, not the result.
481
483
throw Bug (" _processData result had 'last' true, which cannot be allowed." );
@@ -486,7 +488,7 @@ void QueryRequest::_processData(JobBase::Ptr const& jq, int blen, bool xrdLast)
486
488
throw Bug (" Unexpected header size from flush(result) call QID="
487
489
+ to_string (_qid) + " #" + to_string (_jobid));
488
490
}
489
-
491
+ LOGS (_log, LOG_LVL_INFO, " &&&QueryRequest::_processData d " );
490
492
if (!flushOk) {
491
493
_flushError (jq);
492
494
return ;
@@ -497,11 +499,14 @@ void QueryRequest::_processData(JobBase::Ptr const& jq, int blen, bool xrdLast)
497
499
// Values for largeResult, last, and nextBufSize will be filled in by flush().
498
500
flushOk = jq->getDescription()->respHandler()->flush(protoHeaderSize, nextHeaderBufPtr, last,
499
501
largeResult, nextBufSize);
500
- */
502
+
501
503
largeResult = false;
502
504
nextBufSize = 0;
505
+ */
506
+ // Values for last, largeResult, and nextBufSize filled in by flush
507
+ LOGS (_log, LOG_LVL_INFO, " &&&QueryRequest::_processData e" );
503
508
flushOk = jq->getRespHandler ()->flush (protoHeaderSize, nextHeaderBufPtr, last, largeResult, nextBufSize);
504
-
509
+ LOGS (_log, LOG_LVL_INFO, " &&&QueryRequest::_processData f " );
505
510
if (largeResult) {
506
511
if (!_largeResult) LOGS (_log, LOG_LVL_DEBUG, " holdState largeResult set to true" );
507
512
_largeResult = true ; // Once the worker indicates it's a large result, it stays that way.
@@ -512,22 +517,28 @@ void QueryRequest::_processData(JobBase::Ptr const& jq, int blen, bool xrdLast)
512
517
LOGS (_log, LOG_LVL_DEBUG, " processData disagreement between last=" << last
513
518
<< " and xrdLast=" << xrdLast);
514
519
}
520
+ LOGS (_log, LOG_LVL_INFO, " &&&QueryRequest::_processData g" );
515
521
if (last) {
522
+ LOGS (_log, LOG_LVL_INFO, " &&&QueryRequest::_processData h" );
516
523
jq->getStatus ()->updateInfo (_jobIdStr, JobStatus::COMPLETE);
517
524
_finish ();
518
525
// At this point all blocks for this job have been read, there's no point in
519
526
// having XrdSsi wait for anything.
520
527
return ;
521
528
} else {
529
+ LOGS (_log, LOG_LVL_INFO, " &&&QueryRequest::_processData i" );
522
530
_askForResponseDataCmd = make_shared<AskForResponseDataCmd>(shared_from_this (), jq, nextBufSize);
523
531
LOGS (_log, LOG_LVL_DEBUG, " queuing askForResponseDataCmd bufSize=" << nextBufSize);
532
+ LOGS (_log, LOG_LVL_INFO, " &&&QueryRequest::_processData j" );
524
533
_queueAskForResponse (_askForResponseDataCmd, jq, false );
525
534
}
526
535
} else {
536
+ LOGS (_log, LOG_LVL_INFO, " &&&QueryRequest::_processData k" );
527
537
LOGS (_log, LOG_LVL_WARN, " flushOk = false" );
528
538
_flushError (jq);
529
539
return ;
530
540
}
541
+ LOGS (_log, LOG_LVL_INFO, " &&&QueryRequest::_processData end" );
531
542
return ;
532
543
}
533
544
0 commit comments