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

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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Impala 2.7.0
    • Impala 2.8.0
    • Backend

    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

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

            Dates

              Created:
              Updated:
              Resolved: