Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-18808

Make compaction more robust when stats update fails

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0
    • Fix Version/s: 3.0.0
    • Component/s: Transactions
    • Labels:
      None
    • Target Version/s:

      Description

       

      Worker.gatherStats() runs a "analyze table..." command to update stats which requires SessionState.  SessionState objects are cached in ThreadLocal.  If for some reason Session init fails, it may still get attached to the thread which then causes a subsequent request that uses the same thread to gather stats fail because it has a bad session object.  HIVE-15658 describes the same issue in a different context.  

      There is currently no way to recycle a session from outside HMS.

      Failure to gather stats should not kill a compaction job which then prevents Cleaner from running.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ekoifman Eugene Koifman
                Reporter:
                ekoifman Eugene Koifman
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: