HBASE-4452 Possibility of RS opening a region though tickleOpening fails due to

znode version mismatch (Ramkrishna)


git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1174447 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Zhihong Yu 2011-09-22 23:08:17 +00:00
parent a6249ee3b4
commit 1bd5e4032c
2 changed files with 7 additions and 3 deletions

View File

@ -291,6 +291,8 @@ Release 0.91.0 - Unreleased
HBASE-3421 Very wide rows -- 30M plus -- cause us OOME (Nate Putnam) HBASE-3421 Very wide rows -- 30M plus -- cause us OOME (Nate Putnam)
HBASE-4153 Handle RegionAlreadyInTransitionException in AssignmentManager HBASE-4153 Handle RegionAlreadyInTransitionException in AssignmentManager
(Ramkrishna) (Ramkrishna)
HBASE-4452 Possibility of RS opening a region though tickleOpening fails due to
znode version mismatch (Ramkrishna)
TESTS TESTS
HBASE-4450 test for number of blocks read: to serve as baseline for expected HBASE-4450 test for number of blocks read: to serve as baseline for expected

View File

@ -169,13 +169,14 @@ public class OpenRegionHandler extends EventHandler {
// regions-in-transition timeout period. // regions-in-transition timeout period.
long period = Math.max(1, assignmentTimeout/ 3); long period = Math.max(1, assignmentTimeout/ 3);
long lastUpdate = now; long lastUpdate = now;
boolean tickleOpening = true;
while (!signaller.get() && t.isAlive() && !this.server.isStopped() && while (!signaller.get() && t.isAlive() && !this.server.isStopped() &&
!this.rsServices.isStopping() && (endTime > now)) { !this.rsServices.isStopping() && (endTime > now)) {
long elapsed = now - lastUpdate; long elapsed = now - lastUpdate;
if (elapsed > period) { if (elapsed > period) {
// Only tickle OPENING if postOpenDeployTasks is taking some time. // Only tickle OPENING if postOpenDeployTasks is taking some time.
lastUpdate = now; lastUpdate = now;
tickleOpening("post_open_deploy"); tickleOpening = tickleOpening("post_open_deploy");
} }
synchronized (signaller) { synchronized (signaller) {
try { try {
@ -204,8 +205,9 @@ public class OpenRegionHandler extends EventHandler {
} }
// Was there an exception opening the region? This should trigger on // Was there an exception opening the region? This should trigger on
// InterruptedException too. If so, we failed. // InterruptedException too. If so, we failed. Even if tickle opening fails
return !Thread.interrupted() && t.getException() == null; // then it is a failure.
return ((!Thread.interrupted() && t.getException() == null) && tickleOpening);
} }
/** /**