Hive
  1. Hive
  2. HIVE-3533

ZooKeeperHiveLockManager does not respect the option to keep locks alive even after the current session has closed

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.9.0
    • Fix Version/s: 0.10.0
    • Component/s: Locking
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      The HiveLockManager interface defines the following method:

      public List<HiveLock> lock(List<HiveLockObj> objs,
      boolean keepAlive) throws LockException;

      ZooKeeperHiveLockManager implements HiveLockManager, but the current implementation of the "lock" method never actually references the "keepAlive" parameter. As a result, all of the locks acquired by the "lock" method are ephemeral. In other words, Zookeeper-based locks only exist as long as the underlying Zookeeper session exists. As soon as the Zookeeper session ends, any Zookeeper-based locks are automatically released.

        Activity

        Hide
        Matt Martin added a comment -

        Uploading the very simple patch for this issue. Replacing the hardcoded value of "false" with the boolean parameter "keepAlive".

        Show
        Matt Martin added a comment - Uploading the very simple patch for this issue. Replacing the hardcoded value of "false" with the boolean parameter "keepAlive".
        Hide
        Namit Jain added a comment -

        +1

        Show
        Namit Jain added a comment - +1
        Hide
        Namit Jain added a comment -

        Committed. Thanks Matt

        Show
        Namit Jain added a comment - Committed. Thanks Matt
        Hide
        Hudson added a comment -

        Integrated in Hive-trunk-h0.21 #1726 (See https://builds.apache.org/job/Hive-trunk-h0.21/1726/)
        HIVE-3533 ZooKeeperHiveLockManager does not respect the option to keep locks alive even after
        the current session has closed (Matt Martin via namit) (Revision 1395026)

        Result = SUCCESS
        namit : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1395026
        Files :

        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/zookeeper/ZooKeeperHiveLockManager.java
        Show
        Hudson added a comment - Integrated in Hive-trunk-h0.21 #1726 (See https://builds.apache.org/job/Hive-trunk-h0.21/1726/ ) HIVE-3533 ZooKeeperHiveLockManager does not respect the option to keep locks alive even after the current session has closed (Matt Martin via namit) (Revision 1395026) Result = SUCCESS namit : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1395026 Files : /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/zookeeper/ZooKeeperHiveLockManager.java
        Hide
        Hudson added a comment -

        Integrated in Hive-trunk-hadoop2 #54 (See https://builds.apache.org/job/Hive-trunk-hadoop2/54/)
        HIVE-3533 ZooKeeperHiveLockManager does not respect the option to keep locks alive even after
        the current session has closed (Matt Martin via namit) (Revision 1395026)

        Result = ABORTED
        namit : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1395026
        Files :

        • /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/zookeeper/ZooKeeperHiveLockManager.java
        Show
        Hudson added a comment - Integrated in Hive-trunk-hadoop2 #54 (See https://builds.apache.org/job/Hive-trunk-hadoop2/54/ ) HIVE-3533 ZooKeeperHiveLockManager does not respect the option to keep locks alive even after the current session has closed (Matt Martin via namit) (Revision 1395026) Result = ABORTED namit : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1395026 Files : /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/zookeeper/ZooKeeperHiveLockManager.java
        Hide
        Ashutosh Chauhan added a comment -

        This issue is fixed and released as part of 0.10.0 release. If you find an issue which seems to be related to this one, please create a new jira and link this one with new jira.

        Show
        Ashutosh Chauhan added a comment - This issue is fixed and released as part of 0.10.0 release. If you find an issue which seems to be related to this one, please create a new jira and link this one with new jira.

          People

          • Assignee:
            Matt Martin
            Reporter:
            Matt Martin
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development