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

Concurrency: FunctionRegistry::getFunctionInfo is static object locked

    XMLWordPrintableJSON

Details

    Description

      The lock is inside a HS2-wide static object

      https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java#L191

        // registry for system functions
        private static final Registry system = new Registry(true);
      

      And this is the lock itself

      https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/exec/Registry.java#L332

        public FunctionInfo getFunctionInfo(String functionName) throws SemanticException {
          lock.lock();
      

      Attachments

        1. FunctionRegistry-lock.png
          437 kB
          Gopal Vijayaraghavan
        2. HIVE-22737.2.patch
          6 kB
          Ashutosh Chauhan
        3. HIVE-22737.3.patch
          6 kB
          Ashutosh Chauhan
        4. HIVE-22737.4.patch
          6 kB
          Ashutosh Chauhan
        5. HIVE-22737.5.patch
          6 kB
          Ashutosh Chauhan
        6. HIVE-22737.6.patch
          6 kB
          Ashutosh Chauhan
        7. HIVE-22737.7.patch
          6 kB
          Ashutosh Chauhan
        8. HIVE-22737.patch
          4 kB
          Ashutosh Chauhan

        Activity

          People

            ashutoshc Ashutosh Chauhan
            gopalv Gopal Vijayaraghavan
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: