[ https://issues.apache.org/jira/browse/HBASE-7600?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13793313#comment-13793313 ]
Liu Shaohui commented on HBASE-7600: ------------------------------------ [~lhofhansl] The patch does not solve all the problems. Same problem when: there are two create table threads and one disable table thread. t1: thread 1/2 start to create table t2: thread 1/2 pass the MetaReader.tableExists t3: thread 1 pass checkAndSetEnablingTable, set table to enabling, and other thread finish to create table, set table status to enabled t4: thread 3 start to disable table, and set table status to disabling t5: thread 2 pass checkAndSetEnablingTable, for table status is disabling See: two threads create table success. if we add disabling and disabled check in checkAndSetEnablingTable, this will bing create success -> disable success -> delete table success -> create may fail problem. The reason is that delete-table is async and will return true if there is no table region in meta. But at this moment, delete-table handler may have no finished, the table status in hmaster may be disabled, which cause the later create table failed. > Investigate TestAdmin.testCreateBadTables > ----------------------------------------- > > Key: HBASE-7600 > URL: https://issues.apache.org/jira/browse/HBASE-7600 > Project: HBase > Issue Type: Bug > Affects Versions: 0.94.4 > Reporter: Lars Hofhansl > Attachments: HBASE-7600-0.94-v1.patch > > > See in a 0.94 test run. > Looks like in some cases it is possible to create two tables with the same > name, which is worrisome. > {code} > java.lang.AssertionError: expected:<1> but was:<2> > at org.junit.Assert.fail(Assert.java:93) > at org.junit.Assert.failNotEquals(Assert.java:647) > at org.junit.Assert.assertEquals(Assert.java:128) > at org.junit.Assert.assertEquals(Assert.java:472) > at org.junit.Assert.assertEquals(Assert.java:456) > at > org.apache.hadoop.hbase.client.TestAdmin.testCreateBadTables(TestAdmin.java:1091) > {code} -- This message was sent by Atlassian JIRA (v6.1#6144)