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

Don't hold process wide lock while serializing Runtime Profile in GetRuntimeProfileStr()

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Impala 2.7.0
    • Fix Version/s: Impala 2.8.0
    • Component/s: Backend
    • Labels:

      Description

      In ImpalaServer::GetRuntimeProfileStr(), we hold the query_exec_state_map_lock_ while serializing the runtime profile.
      https://github.com/apache/incubator-impala/blob/master/be/src/service/impala-server.cc#L568

      The SerializeToArchiveString() is a slow operation and is called at least once per query. We don't need to hold the map lock, we can instead take a shared_ptr reference and hold the individual exec_state lock while serializing the runtime profile.

      If the query gets unregistered during the serialization operation, it will wait on the exec_state lock in QueryExecState::Done() until the serialization is complete.
      https://github.com/apache/incubator-impala/blob/master/be/src/service/query-exec-state.cc#L526

        Attachments

          Activity

            People

            • Assignee:
              sailesh Sailesh Mukil
              Reporter:
              sailesh Sailesh Mukil
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: