Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-4928

Fix intermittent testQdisp failure

    Details

    • Type: Bug
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      The mocks used in the executive class don't mock cancellation correctly and doing so would require significant effort. When Executive::squash() is called, the mocks threads are already running but waiting on the _go barrier. squash() calls JobQuery::cancel() for each thread and cancel() calls markComplete() for the job because a QueryResource has not been aquirred from xrootd. Once all the jobs are cancelled and _go is set to true, the ex.join() command doesn't wait for the jobs to complete since markComplete() has already been called for all of the jobs. If any of the jobs take longer to complete than the main thread, they call markComplete for an Executive that no longer exists and cause the test to fail.

        Attachments

          Activity

          Hide
          salnikov Andy Salnikov added a comment -

          John, fix looks OK to me but then I'm not sure I understand everything about threading issues in a mock. I guess we are trusting you on this.

          Show
          salnikov Andy Salnikov added a comment - John, fix looks OK to me but then I'm not sure I understand everything about threading issues in a mock. I guess we are trusting you on this.
          Hide
          jgates John Gates added a comment -

          The threads in the cancel test are a side effect, so these changes are about keeping them from doing any damage.

          Show
          jgates John Gates added a comment - The threads in the cancel test are a side effect, so these changes are about keeping them from doing any damage.

            People

            • Assignee:
              jgates John Gates
              Reporter:
              jgates John Gates
              Reviewers:
              Andy Salnikov
              Watchers:
              Andy Salnikov, Jacek Becla, John Gates
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel