diff --git a/src/qdisp/Executive.cc b/src/qdisp/Executive.cc index db3c2e550..870a2e895 100644 --- a/src/qdisp/Executive.cc +++ b/src/qdisp/Executive.cc @@ -113,7 +113,6 @@ Executive::~Executive() { } if (_asyncTimer != nullptr) { _asyncTimer->cancel(); - //&&& qdisp::CzarStats::get()->untrackQueryProgress(_id); } qdisp::CzarStats::get()->untrackQueryProgress(_id); } diff --git a/src/qdisp/JobQuery.cc b/src/qdisp/JobQuery.cc index a2560e691..a495ac057 100644 --- a/src/qdisp/JobQuery.cc +++ b/src/qdisp/JobQuery.cc @@ -60,9 +60,8 @@ JobQuery::~JobQuery() { /// Cancel response handling. Return true if this is the first time cancel has been called. bool JobQuery::cancel(bool superfluous) { QSERV_LOGCONTEXT_QUERY_JOB(getQueryId(), getJobId()); - LOGS(_log, LOG_LVL_DEBUG, "JobQuery::cancel() " << superfluous); - LOGS(_log, LOG_LVL_WARN, "&&&JobQuery::cancel() " << superfluous); if (_cancelled.exchange(true) == false) { + LOGS(_log, LOG_LVL_INFO, "JobQuery::cancel() " << superfluous); VMUTEX_NOT_HELD(_jqMtx); lock_guard lock(_jqMtx); @@ -83,7 +82,7 @@ bool JobQuery::cancel(bool superfluous) { } return true; } - LOGS(_log, LOG_LVL_TRACE, "cancel, skipping, already cancelled."); + LOGS(_log, LOG_LVL_TRACE, "JobQuery::cancel, skipping, already cancelled."); return false; } @@ -129,8 +128,7 @@ bool JobQuery::unassignFromUberJob(UberJobId ujId) { _uberJobId = -1; auto exec = _executive.lock(); - // Do not increase the count as it should have been increased when the job was started. - //&&&_jobDescription->incrAttemptCount(exec, false); + // Do not increase the attempt count as it should have been increased when the job was started. return true; } diff --git a/src/qdisp/JobQuery.h b/src/qdisp/JobQuery.h index 4524d4efa..10e2bd59a 100644 --- a/src/qdisp/JobQuery.h +++ b/src/qdisp/JobQuery.h @@ -60,7 +60,6 @@ class JobQuery { QueryId getQueryId() const { return _qid; } JobId getJobId() const { return _jobDescription->id(); } std::string const& getIdStr() const { return _idStr; } - //&&&std::shared_ptr getRespHandler() { return _jobDescription->respHandler(); } JobDescription::Ptr getDescription() { return _jobDescription; } qmeta::JobStatus::Ptr getStatus() { return _jobStatus; } diff --git a/src/qdisp/UberJob.h b/src/qdisp/UberJob.h index cc2a32a31..6333b3eb2 100644 --- a/src/qdisp/UberJob.h +++ b/src/qdisp/UberJob.h @@ -171,7 +171,7 @@ class UberJob : public std::enable_shared_from_this { czar::CzarChunkMap::WorkerChunksData::Ptr _workerData; // TODO:UJ this may not be needed // Contact information for the target worker. - protojson::WorkerContactInfo::Ptr _wContactInfo; // Change to ActiveWorker &&& ??? + protojson::WorkerContactInfo::Ptr _wContactInfo; // TODO:UJ Maybe change to ActiveWorker? }; } // namespace lsst::qserv::qdisp diff --git a/src/wcontrol/Foreman.cc b/src/wcontrol/Foreman.cc index 06109654e..9b42c14b6 100644 --- a/src/wcontrol/Foreman.cc +++ b/src/wcontrol/Foreman.cc @@ -120,9 +120,8 @@ Foreman::Foreman(wsched::BlendScheduler::Ptr const& scheduler, _resourceMonitor(make_shared()), _io_service(), _httpServer(qhttp::Server::create(_io_service, 0 /* grab the first available port */)), - _wCzarInfoMap(WCzarInfoMap::create()) { - - _setupFqdn(); + _wCzarInfoMap(WCzarInfoMap::create()), + _fqdn(util::getCurrentHostFqdnBlocking()) { // Make the chunk resource mgr // Creating backend makes a connection to the database for making temporary tables. @@ -189,12 +188,6 @@ Foreman::~Foreman() { _httpServer->stop(); } -void Foreman::_setupFqdn() { - while (_fqdn == "") { - _fqdn = util::get_current_host_fqdn(); - } -} - void Foreman::processTasks(vector const& tasks) { std::vector cmds; util::Timer timerQ; //&&& diff --git a/src/wcontrol/Foreman.h b/src/wcontrol/Foreman.h index cad643309..f7a6a0aeb 100644 --- a/src/wcontrol/Foreman.h +++ b/src/wcontrol/Foreman.h @@ -172,9 +172,6 @@ class Foreman { /// was restarted when this value changes. uint64_t const _workerStartupTime = millisecSinceEpoch(CLOCK::now()); - /// Set the value of _fdqn. - void _setupFqdn(); - std::shared_ptr _chunkResourceMgr; util::ThreadPool::Ptr _pool; @@ -214,8 +211,8 @@ class Foreman { /// Map of czar information for all czars that have contacted this worker. std::shared_ptr const _wCzarInfoMap; - /// FQDN for this worker. Once set, this is constant. - std::string _fqdn; + /// FQDN for this worker. + std::string const _fqdn; static Ptr _globalForeman; ///< Pointer to the global instance. };