HBASE-3343 Server not shutting down after losing log lease

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1051380 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2010-12-21 05:32:22 +00:00
parent 53914b693e
commit 8f67476c53
4 changed files with 9 additions and 4 deletions

View File

@ -799,6 +799,7 @@ Release 0.90.0 - Unreleased
HBASE-3371 Race in TestReplication can make it fail
HBASE-3323 OOME in master splitting logs
HBASE-3374 Our jruby jar has *GPL jars in it; fix
HBASE-3343 Server not shutting down after losing log lease
IMPROVEMENTS

View File

@ -427,7 +427,8 @@ public class CatalogTracker {
Throwable cause = e.getCause();
if (cause != null && cause instanceof EOFException) {
t = cause;
} else if (cause.getMessage().contains("Connection reset")) {
} else if (cause != null && cause.getMessage() != null
&& cause.getMessage().contains("Connection reset")) {
t = cause;
} else {
throw e;

View File

@ -643,7 +643,7 @@ public class HRegionServer implements HRegionInterface, HBaseRPCErrorHandler,
// Interrupt catalog tracker here in case any regions being opened out in
// handlers are stuck waiting on meta or root.
if (this.catalogTracker != null) this.catalogTracker.stop();
waitOnAllRegionsToClose();
if (this.fsOk) waitOnAllRegionsToClose();
// Make sure the proxy is down.
if (this.hbaseMaster != null) {

View File

@ -97,7 +97,7 @@ public class OpenRegionHandler extends EventHandler {
if (tickleOpening("post_region_open")) {
if (updateMeta(region)) failed = false;
}
if (failed) {
if (failed || this.server.isStopped() || this.rsServices.isStopping()) {
cleanupFailedOpen(region);
return;
}
@ -119,6 +119,9 @@ public class OpenRegionHandler extends EventHandler {
* Caller must cleanup region if this fails.
*/
private boolean updateMeta(final HRegion r) {
if (this.server.isStopped() || this.rsServices.isStopping()) {
return false;
}
// Object we do wait/notify on. Make it boolean. If set, we're done.
// Else, wait.
final AtomicBoolean signaller = new AtomicBoolean(false);