Skip to content

Commit

Permalink
For GAHP queries, reopen read-only connection. #5190
Browse files Browse the repository at this point in the history
Job status queries were being done under a read-write connection;
this forces the schedd to service the read queries in the main process.
This causes significant blocking in schedds with a larger number of
jobs.
  • Loading branch information
bbockelm committed Aug 3, 2015
1 parent 0d1e4c5 commit 577dff0
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/condor_c-gahp/schedd_client.cpp
Expand Up @@ -1043,6 +1043,18 @@ doContactSchedd()

// STATUS_CONSTRAINED
command_queue.Rewind();
if (qmgr_connection != NULL)
{
DisconnectQ(qmgr_connection, FALSE);
if ((qmgr_connection = ConnectQ(dc_schedd.addr(), QMGMT_TIMEOUT, true, &errstack, NULL, dc_schedd.version() )) == NULL)
{
formatstr(error_msg, "Error connecting to schedd %s for read-only commands: %s", ScheddAddr, errstack.getFullText().c_str());
dprintf(D_ALWAYS, "%s\n", error_msg.c_str());
failure_line_num = __LINE__;
failure_errno = errno;
goto contact_schedd_disconnect;
}
}
while (command_queue.Next(current_command)) {

if (current_command->status != SchedDRequest::SDCS_NEW)
Expand All @@ -1059,8 +1071,6 @@ doContactSchedd()
if (qmgr_connection != NULL) {
SimpleList <std::string *> matching_ads;

error = FALSE;

ClassAd *next_ad;
ClassAdList adlist;
// Only use GetAllJobsByConstraint if remote schedd is
Expand Down

0 comments on commit 577dff0

Please sign in to comment.