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

Clean up concurrency around query_status_

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Backend
    • None
    • ghx-label-6

    Description

      The handling of concurrent access to ClientRequestState::query_status_ is messy - it's exposed directly via query_status() and a lot of callers don't hold ClientRequestState::lock_.

      This appears to be safe in many places for subtle reasons, e.g. because the value won't be modified after a certain point in the query lifecycle, so it's not dangerous to access it when logging an audit record. However this is brittle and likely to lead with bugs if we change the code around it signicantly.

      We could approach this in various ways, e.g. updating callers to consistently acquire the lock and/or documenting invariants around when its safe to do so without holding it. Or we could make Status thread-safe, or have a thread-safe Status wrapper.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: