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

MetaStore Clients are being shared across different sessions

    XMLWordPrintableJSON

Details

    Description

      The Hive object (and the underlying MetaStoreClient object) seems to be getting shared across different sessions.  While most operations work, there can be occasional glitches. 

      One such noted glitch is that when session 1 ends, it closes the connection.  If session 2 then tries an operation, the first try will fail.  Normally this can proceed because the RetryingMetaStoreClient will re-establish a new connection, but in some operations, the retrying logic will not kick in (by design).

      It seems there was an attempt to fix this issue in HIVE-20682.  However, this implementation seems to be flawed.  The HiveSessionImpl object creates a Hive object and makes sure all thread queries belonging to the same session will run with the same Hive object.  The flaw is that the initial Hive Object within HiveSessionImpl is created in thread local storage.  The thread being run at that moment is not session specific.  It belongs to a thread pool that happens to be handling this specific session.

       

      Attachments

        Issue Links

          Activity

            People

              scarlin Steve Carlin
              scarlin Steve Carlin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 50m
                  1h 50m