Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-9756

Queries are not guaranteed to be cancelled before unregistration

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Impala 4.0.0
    • Impala 4.0.0
    • Backend
    • None
    • ghx-label-13

    Description

      I noticed while running TSAN on a branch that it's possible for a query to be unregistered while cancellation is in progress, if the cancellation is triggered by a different thread (e.g. a separate client connection) and

      This is because ClientRequestState::Cancel() will return early if cancellation was already started, and ImpalaServer::Unregister() will proceed.

      I think the main consequence of this is that the profile may be missing information that is added during cancellation (ComputeQuerySummary(), etc), but it generally makes the code more racy and bugs more likely.

      Instead Finalize() should wait for the cancellation to finish in the other thread before proceeding.

      Attachments

        Issue Links

          Activity

            People

              tarmstrong Tim Armstrong
              tarmstrong Tim Armstrong
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: