HBase
  1. HBase
  2. HBASE-6268

Can't enable a table on a 0.94 cluster from a 0.92 client

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.92.2, 0.94.2
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      In 0.92 we know a table's enabled by doing this in HCM.isEnabledTable:

      return getTableState(zkw, tableName) == null;

      In 0.94 we do:

      return getTableState(zkw, tableName) == TableState.ENABLED;

      So what happens is that the the 0.92 client will hang forever since the znode contains ENABLED instead of being absent.

      1. 6268-94.txt
        0.7 kB
        Lars Hofhansl
      2. 6268-92.txt
        0.7 kB
        Ted Yu

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        66d 5h 26m 1 stack 31/Aug/12 06:33
        Resolved Resolved Closed Closed
        54d 6m 1 Lars Hofhansl 24/Oct/12 06:40
        Lars Hofhansl made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        Hudson added a comment -

        Integrated in HBase-0.94-security-on-Hadoop-23 #7 (See https://builds.apache.org/job/HBase-0.94-security-on-Hadoop-23/7/)
        HBASE-6268 Can't enable a table on a 0.94 cluster from a 0.92 client (Revision 1379688)

        Result = FAILURE
        larsh :
        Files :

        • /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKTable.java
        Show
        Hudson added a comment - Integrated in HBase-0.94-security-on-Hadoop-23 #7 (See https://builds.apache.org/job/HBase-0.94-security-on-Hadoop-23/7/ ) HBASE-6268 Can't enable a table on a 0.94 cluster from a 0.92 client (Revision 1379688) Result = FAILURE larsh : Files : /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKTable.java
        Hide
        Hudson added a comment -

        Integrated in HBase-0.94-security #51 (See https://builds.apache.org/job/HBase-0.94-security/51/)
        HBASE-6268 Can't enable a table on a 0.94 cluster from a 0.92 client (Revision 1379688)

        Result = FAILURE
        larsh :
        Files :

        • /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKTable.java
        Show
        Hudson added a comment - Integrated in HBase-0.94-security #51 (See https://builds.apache.org/job/HBase-0.94-security/51/ ) HBASE-6268 Can't enable a table on a 0.94 cluster from a 0.92 client (Revision 1379688) Result = FAILURE larsh : Files : /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKTable.java
        Hide
        Hudson added a comment -

        Integrated in HBase-0.94 #446 (See https://builds.apache.org/job/HBase-0.94/446/)
        HBASE-6268 Can't enable a table on a 0.94 cluster from a 0.92 client (Revision 1379688)

        Result = FAILURE
        larsh :
        Files :

        • /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKTable.java
        Show
        Hudson added a comment - Integrated in HBase-0.94 #446 (See https://builds.apache.org/job/HBase-0.94/446/ ) HBASE-6268 Can't enable a table on a 0.94 cluster from a 0.92 client (Revision 1379688) Result = FAILURE larsh : Files : /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKTable.java
        Lars Hofhansl made changes -
        Fix Version/s 0.94.2 [ 12321884 ]
        Hide
        Lars Hofhansl added a comment -

        Committed 0.94 patch as well.

        Show
        Lars Hofhansl added a comment - Committed 0.94 patch as well.
        Hide
        stack added a comment -

        +1 on patch for 0.94

        Show
        stack added a comment - +1 on patch for 0.94
        Hide
        Gregory Chanan added a comment -

        patch lgtm.

        Show
        Gregory Chanan added a comment - patch lgtm.
        Hide
        Lars Hofhansl added a comment -

        I'll commit that to 0.94.

        Show
        Lars Hofhansl added a comment - I'll commit that to 0.94.
        Lars Hofhansl made changes -
        Attachment 6268-94.txt [ 12543408 ]
        Hide
        Lars Hofhansl added a comment -

        0.94 patch.

        Show
        Lars Hofhansl added a comment - 0.94 patch.
        Hide
        Ted Yu added a comment -

        I think Gregory's post makes sense.

        I will wait for further validation result against 0.92.2 RC1 and watch out the discussion thread.

        Show
        Ted Yu added a comment - I think Gregory's post makes sense. I will wait for further validation result against 0.92.2 RC1 and watch out the discussion thread.
        Hide
        Gregory Chanan added a comment -

        Brought up on dev list under the title "0.92/0.94 compatibility and HBASE-5206." My issue is more with leaving in HBASE-5206 as is in 0.94.2 – I probably should have posted on that JIRA. Sorry about that.

        My reading of this patch is that it will work whether we leave in HBASE-5206 or we do the change I propose on the e-mail (moving the enabled state to a different znode). Do you agree, Ted/Lars?

        One nit about the patch, the comment on the isEnabledTable function is no longer valid:

           * Go to zookeeper and see if state of table is {@link TableState#ENABLED}.
        

        but the state doesn't have to be enabled, it can also be null (and should probably point to this JIRA to explain why both are valid?).

        Show
        Gregory Chanan added a comment - Brought up on dev list under the title "0.92/0.94 compatibility and HBASE-5206 ." My issue is more with leaving in HBASE-5206 as is in 0.94.2 – I probably should have posted on that JIRA. Sorry about that. My reading of this patch is that it will work whether we leave in HBASE-5206 or we do the change I propose on the e-mail (moving the enabled state to a different znode). Do you agree, Ted/Lars? One nit about the patch, the comment on the isEnabledTable function is no longer valid: * Go to zookeeper and see if state of table is {@link TableState#ENABLED}. but the state doesn't have to be enabled, it can also be null (and should probably point to this JIRA to explain why both are valid?).
        Hide
        Jonathan Hsieh added a comment -

        I'm a bit concerned about this – i think there are people using 0.92.1 and those clients should work againt the newer 0.94's (which has fewer users since is newer). We'll start a discussion on the dev list.

        Show
        Jonathan Hsieh added a comment - I'm a bit concerned about this – i think there are people using 0.92.1 and those clients should work againt the newer 0.94's (which has fewer users since is newer). We'll start a discussion on the dev list.
        Hide
        Gregory Chanan added a comment -

        I'm not sure I agree with this patch. I'll bring up something on the dev list.

        Show
        Gregory Chanan added a comment - I'm not sure I agree with this patch. I'll bring up something on the dev list.
        Hide
        Hudson added a comment -

        Integrated in HBase-0.92-security #129 (See https://builds.apache.org/job/HBase-0.92-security/129/)
        HBASE-6268 Can't enable a table on a 0.94 cluster from a 0.92 client (Revision 1379292)

        Result = FAILURE
        stack :
        Files :

        • /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKTable.java
        Show
        Hudson added a comment - Integrated in HBase-0.92-security #129 (See https://builds.apache.org/job/HBase-0.92-security/129/ ) HBASE-6268 Can't enable a table on a 0.94 cluster from a 0.92 client (Revision 1379292) Result = FAILURE stack : Files : /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKTable.java
        Hide
        Hudson added a comment -

        Integrated in HBase-0.92 #549 (See https://builds.apache.org/job/HBase-0.92/549/)
        HBASE-6268 Can't enable a table on a 0.94 cluster from a 0.92 client (Revision 1379292)

        Result = FAILURE
        stack :
        Files :

        • /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKTable.java
        Show
        Hudson added a comment - Integrated in HBase-0.92 #549 (See https://builds.apache.org/job/HBase-0.92/549/ ) HBASE-6268 Can't enable a table on a 0.94 cluster from a 0.92 client (Revision 1379292) Result = FAILURE stack : Files : /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKTable.java
        stack made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Hadoop Flags Reviewed [ 10343 ]
        Assignee Ted Yu [ yuzhihong@gmail.com ]
        Resolution Fixed [ 1 ]
        Hide
        stack added a comment -

        Committed to 0.92.0

        Show
        stack added a comment - Committed to 0.92.0
        Hide
        Lars Hofhansl added a comment -

        +1 on patch.
        I apologize to not have caught this in 0.94.0 (HBASE-5206).

        Show
        Lars Hofhansl added a comment - +1 on patch. I apologize to not have caught this in 0.94.0 ( HBASE-5206 ).
        Hide
        stack added a comment -

        Patch looks like it covers both cases +1

        Show
        stack added a comment - Patch looks like it covers both cases +1
        Ted Yu made changes -
        Field Original Value New Value
        Attachment 6268-92.txt [ 12543227 ]
        Hide
        Ted Yu added a comment -

        Patch as suggested by Lars.

        Show
        Ted Yu added a comment - Patch as suggested by Lars.
        Hide
        Jean-Daniel Cryans added a comment -

        This is why I'm not a big fan of backports that are not simple-ish fixes...

        So to me the most important would be to fix the 0.92 side as usually the infrastructure in place will rely on the older version first. In our case we started the migration of our clusters to 0.94 starting with the less important ones so our tools are still relying on 0.92

        Show
        Jean-Daniel Cryans added a comment - This is why I'm not a big fan of backports that are not simple-ish fixes... So to me the most important would be to fix the 0.92 side as usually the infrastructure in place will rely on the older version first. In our case we started the migration of our clusters to 0.94 starting with the less important ones so our tools are still relying on 0.92
        Hide
        Lars Hofhansl added a comment -

        Sigh... It seems we cannot easily fix this 0.94.1, since we'd have to roll back a bigger change. Is 0.92.2 good enough, though?
        The 0.92 fix is obviously trivial just check for TableState.ENABLED or null.

        Show
        Lars Hofhansl added a comment - Sigh... It seems we cannot easily fix this 0.94.1, since we'd have to roll back a bigger change. Is 0.92.2 good enough, though? The 0.92 fix is obviously trivial just check for TableState.ENABLED or null.
        Hide
        ramkrishna.s.vasudevan added a comment -

        https://issues.apache.org/jira/browse/HBASE-5206 caused this. Infact in 0.90 HBASE-5904 has been raised to back out HBASE-5155.
        So the same problem is happening here. .
        Do we need to back out here also?

        Show
        ramkrishna.s.vasudevan added a comment - https://issues.apache.org/jira/browse/HBASE-5206 caused this. Infact in 0.90 HBASE-5904 has been raised to back out HBASE-5155 . So the same problem is happening here. . Do we need to back out here also?
        Jean-Daniel Cryans created issue -

          People

          • Assignee:
            Ted Yu
            Reporter:
            Jean-Daniel Cryans
          • Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development