hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Liu Shaohui (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-7600) Investigate TestAdmin.testCreateBadTables
Date Sat, 12 Oct 2013 09:25:42 GMT

    [ https://issues.apache.org/jira/browse/HBASE-7600?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13793308#comment-13793308
] 

Liu Shaohui commented on HBASE-7600:
------------------------------------

reproduce this issue in our ci env.  The key problem that two create table threads may both
success in hmaster.

parallel create table threads are serialized in ZKTable:checkAndSetEnablingTable, but the
ZKTable:checkAndSetEnablingTable only check the enabling status, not check other states.
if: 
t1: If two threads start to create same name table
t2: two master threads start to create CreateTableHandler objects
t3: two master threads pass the MetaReader.tableExists check in creation of CreateTableHandler
t4: thread 1 pass this.assignmentManager.getZKTable().checkAndSetEnablingTable, for  there
is no table status in master, and set table status to enabling
t5: other thread process the CreateTableHandler created by thread 1, and finish create table,
and set table status to enabled.
t6: thread 2 pass this.assignmentManager.getZKTable().checkAndSetEnablingTable for the table
status is enabled. 
t7:  other thread process the CreateTableHandler created by thread 2, and start create table.

Two threads both create table success in master.
 

> 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)

Mime
View raw message