Skip to content

Commit

Permalink
Some cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgates108 committed Feb 3, 2025
1 parent 2277f63 commit ccab87c
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 22 deletions.
1 change: 0 additions & 1 deletion src/qdisp/Executive.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ Executive::~Executive() {
}
if (_asyncTimer != nullptr) {
_asyncTimer->cancel();
//&&& qdisp::CzarStats::get()->untrackQueryProgress(_id);
}
qdisp::CzarStats::get()->untrackQueryProgress(_id);
}
Expand Down
8 changes: 3 additions & 5 deletions src/qdisp/JobQuery.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down
1 change: 0 additions & 1 deletion src/qdisp/JobQuery.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<ResponseHandler> getRespHandler() { return _jobDescription->respHandler(); }
JobDescription::Ptr getDescription() { return _jobDescription; }
qmeta::JobStatus::Ptr getStatus() { return _jobStatus; }

Expand Down
2 changes: 1 addition & 1 deletion src/qdisp/UberJob.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ class UberJob : public std::enable_shared_from_this<UberJob> {
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
Expand Down
11 changes: 2 additions & 9 deletions src/wcontrol/Foreman.cc
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,8 @@ Foreman::Foreman(wsched::BlendScheduler::Ptr const& scheduler,
_resourceMonitor(make_shared<ResourceMonitor>()),
_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.
Expand Down Expand Up @@ -189,12 +188,6 @@ Foreman::~Foreman() {
_httpServer->stop();
}

void Foreman::_setupFqdn() {
while (_fqdn == "") {
_fqdn = util::get_current_host_fqdn();
}
}

void Foreman::processTasks(vector<wbase::Task::Ptr> const& tasks) {
std::vector<util::Command::Ptr> cmds;
util::Timer timerQ; //&&&
Expand Down
7 changes: 2 additions & 5 deletions src/wcontrol/Foreman.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<wdb::ChunkResourceMgr> _chunkResourceMgr;

util::ThreadPool::Ptr _pool;
Expand Down Expand Up @@ -214,8 +211,8 @@ class Foreman {
/// Map of czar information for all czars that have contacted this worker.
std::shared_ptr<wcontrol::WCzarInfoMap> 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.
};
Expand Down

0 comments on commit ccab87c

Please sign in to comment.