[jira] [Commented] (HBASE-7600) Investigate TestAdmin.testCreateBadTables

2013-10-22 Thread stack (JIRA)

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

stack commented on HBASE-7600:
--

Go for it.  +1

 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
Assignee: Liu Shaohui
 Fix For: 0.94.13

 Attachments: 7600-v2.txt, 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)


[jira] [Commented] (HBASE-7600) Investigate TestAdmin.testCreateBadTables

2013-10-12 Thread Liu Shaohui (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-7600?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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)


[jira] [Commented] (HBASE-7600) Investigate TestAdmin.testCreateBadTables

2013-10-12 Thread Liu Shaohui (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-7600?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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)


[jira] [Commented] (HBASE-7600) Investigate TestAdmin.testCreateBadTables

2013-01-16 Thread Lars Hofhansl (JIRA)

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

Lars Hofhansl commented on HBASE-7600:
--

Ran it for a while in a loop locally. Cannot reproduce it.

 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

 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira