[
https://issues.apache.org/jira/browse/HBASE-13606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14522921#comment-14522921
]
Matteo Bertozzi commented on HBASE-13606:
-----------------------------------------
easy way to reproduce the problem is adding a sleep in the OpenRegionHandler
and run: mvn clean test
-Dtest=TestCreateTableProcedure#testSimpleCreateWithSplits
{code}
---
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/handler/OpenRegionHandler.java
+++
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/handler/OpenRegionHandler.java
@@ -98,6 +98,8 @@ public class OpenRegionHandler extends EventHandler {
return;
}
+ try { Thread.sleep(10000); } catch (InterruptedException e) {}
+
// Open region. After a successful open, failures in subsequent
// processing needs to do a close as part of cleanup.
region = openRegion();
{code}
> AssignmentManager.assign() is not sync in both path
> ---------------------------------------------------
>
> Key: HBASE-13606
> URL: https://issues.apache.org/jira/browse/HBASE-13606
> Project: HBase
> Issue Type: Bug
> Components: Region Assignment
> Affects Versions: 2.0.0, 1.1.0, 1.2.0
> Reporter: Matteo Bertozzi
> Assignee: Matteo Bertozzi
> Fix For: 2.0.0, 1.1.0, 1.2.0
>
>
> from the comment and the expected behavior AssignmentManager.assign() should
> be sync
> {code}
> /** Assigns specified regions round robin, if any.
> * This is a synchronous call and will return once every region has been
> public void assign(List<HRegionInfo> regions)
> {code}
> but the code has two path. 1 sync and the async
> {code}
> if (servers == 1 || (regions < bulkAssignThresholdRegions
> && servers < bulkAssignThresholdServers)) {
> for (HRegionInfo region: plan.getValue()) {
> ...
> invokeAssign(region); // <-- this is async threadPool.submit(assign)
> ...
> }
> } else {
> BulkAssigner ba = new GeneralBulkAssigner(...);
> ba.bulkAssign(); // <-- this is sync, calls BulkAssign.waitUntilDone()
> }
> {code}
> https://builds.apache.org/job/HBase-1.1/452/ TestCreateTableProcedure is
> flaky because of this async behavior
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)