@@ -317,7 +317,6 @@ string FileChannelShared::makeIdStr(int qId, int jId) {
317317
318318bool FileChannelShared::buildAndTransmitError (util::MultiError& multiErr, shared_ptr<Task> const & task,
319319 bool cancelled) {
320- // &&& Arena may not really be needed.
321320 std::unique_ptr<google::protobuf::Arena> protobufArena = make_unique<google::protobuf::Arena>();
322321 lock_guard<mutex> const tMtxLock (_tMtx);
323322 if (!_sendResponse (tMtxLock, protobufArena, task, cancelled, multiErr)) {
@@ -329,7 +328,6 @@ bool FileChannelShared::buildAndTransmitError(util::MultiError& multiErr, shared
329328
330329bool FileChannelShared::buildAndTransmitResult (MYSQL_RES* mResult , shared_ptr<Task> const & task,
331330 util::MultiError& multiErr, atomic<bool >& cancelled) {
332- LOGS (_log, LOG_LVL_WARN, " &&& FileChannelShared::buildAndTransmitResult start" );
333331 // Operation stats. Note that "buffer fill time" included the amount
334332 // of time needed to write the result set to disk.
335333 util::Timer transmitT;
@@ -347,7 +345,6 @@ bool FileChannelShared::buildAndTransmitResult(MYSQL_RES* mResult, shared_ptr<Ta
347345 bool erred = false ;
348346 bool hasMoreRows = true ;
349347
350- // &&& Arena may not really be needed.
351348 std::unique_ptr<google::protobuf::Arena> protobufArena = make_unique<google::protobuf::Arena>();
352349 proto::ResponseData* responseData = nullptr ;
353350
@@ -389,9 +386,7 @@ bool FileChannelShared::buildAndTransmitResult(MYSQL_RES* mResult, shared_ptr<Ta
389386 // the current request (note that certain classes of requests may require
390387 // more than one task for processing).
391388 if (!hasMoreRows && transmitTaskLast ()) {
392- LOGS (_log, LOG_LVL_WARN, " &&& FileChannelShared::buildAndTransmitResult e" );
393389 lock_guard<mutex> const tMtxLock (_tMtx);
394- LOGS (_log, LOG_LVL_WARN, " &&& FileChannelShared::buildAndTransmitResult e1" );
395390
396391 // Make sure the file is sync to disk before notifying Czar.
397392 _file.flush ();
@@ -424,11 +419,6 @@ bool FileChannelShared::buildAndTransmitResult(MYSQL_RES* mResult, shared_ptr<Ta
424419 // successfully processing the query and writing all results into the file.
425420 // The file is not going to be used by Czar in either of these scenarios.
426421 if (cancelled || erred || isDead ()) {
427- /* &&&
428- //&&& it may be better to set a flag and call _removeFile in the destructor.
429- lock_guard<mutex> const tMtxLockA(_tMtx);
430- _removeFile(tMtxLockA);
431- */
432422 // Set a flag to delete the file in the destructor. That should prevent any
433423 // possible race conditions with other threads expecting the file to exist.
434424 _issueRequiresFileRemoval = true ;
@@ -446,7 +436,6 @@ bool FileChannelShared::_writeToFile(proto::ResponseData* responseData,
446436 shared_ptr<Task> const & task, MYSQL_RES* mResult , int & bytes, int & rows,
447437 util::MultiError& multiErr) {
448438 // Transfer rows from a result set into the response data object.
449- LOGS (_log, LOG_LVL_WARN, " &&& _writeToFile start" );
450439 if (nullptr == responseData) {
451440 responseData = google::protobuf::Arena::CreateMessage<proto::ResponseData>(protobufArena.get ());
452441 } else {
@@ -464,9 +453,7 @@ bool FileChannelShared::_writeToFile(proto::ResponseData* responseData,
464453 bytes = msg.size ();
465454
466455 LOGS (_log, LOG_LVL_TRACE, __func__ << " file write " << task->getIdStr () << " start" );
467- LOGS (_log, LOG_LVL_WARN, " &&& _writeToFile d" );
468456 lock_guard<mutex> const tMtxLock (_tMtx);
469- LOGS (_log, LOG_LVL_WARN, " &&& _writeToFile d1" );
470457 // Create the file if not open.
471458 if (!_file.is_open ()) {
472459 _fileName = task->resultFilePath ();
@@ -488,7 +475,6 @@ bool FileChannelShared::_writeToFile(proto::ResponseData* responseData,
488475 throw runtime_error (" FileChannelShared::" + string (__func__) + " failed to write " +
489476 to_string (msg.size ()) + " bytes into the file '" + _fileName + " '." );
490477 }
491- LOGS (_log, LOG_LVL_WARN, " &&& _writeToFile end" );
492478 return hasMoreRows;
493479}
494480
0 commit comments