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

JDOPersistenceManager creation should be controlled by at the Server level and not Thread level

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.15.0
    • None
    • Metastore
    • None

    Description

      When using JDO, we create a thread local RawStore (ObjectStore) object in each metastore thread. This leads to creation of a new JDOPersistenceManager per thread which are cached in JDOPersistanceManagerFactory. To remove JDOPersistenceManager from JDOPersistanceManagerFactory, an explicit JDOPersistenceManager.close needs to be called.
      This is a bad candidate for thread local as the effective object destruction requires the application to call close. So, when metastore threads are killed by the threadpool, this object will never be removed from the JDOPersistanceManagerFactory cache.
      We fixed this for HiveServer2 using embedded metastore (HIVE-7353) by customizing the GC collection of the dying thread, but I believe a better and more efficient solution is to pool JDOPersistenceManager objects and let each thread get an object for its use from the pool.

      Attachments

        Activity

          People

            Unassigned Unassigned
            vgumashta Vaibhav Gumashta
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: