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:
parent
53914b693e
commit
8f67476c53
|
@ -799,6 +799,7 @@ Release 0.90.0 - Unreleased
|
||||||
HBASE-3371 Race in TestReplication can make it fail
|
HBASE-3371 Race in TestReplication can make it fail
|
||||||
HBASE-3323 OOME in master splitting logs
|
HBASE-3323 OOME in master splitting logs
|
||||||
HBASE-3374 Our jruby jar has *GPL jars in it; fix
|
HBASE-3374 Our jruby jar has *GPL jars in it; fix
|
||||||
|
HBASE-3343 Server not shutting down after losing log lease
|
||||||
|
|
||||||
|
|
||||||
IMPROVEMENTS
|
IMPROVEMENTS
|
||||||
|
|
|
@ -427,7 +427,8 @@ public class CatalogTracker {
|
||||||
Throwable cause = e.getCause();
|
Throwable cause = e.getCause();
|
||||||
if (cause != null && cause instanceof EOFException) {
|
if (cause != null && cause instanceof EOFException) {
|
||||||
t = cause;
|
t = cause;
|
||||||
} else if (cause.getMessage().contains("Connection reset")) {
|
} else if (cause != null && cause.getMessage() != null
|
||||||
|
&& cause.getMessage().contains("Connection reset")) {
|
||||||
t = cause;
|
t = cause;
|
||||||
} else {
|
} else {
|
||||||
throw e;
|
throw e;
|
||||||
|
|
|
@ -643,7 +643,7 @@ public class HRegionServer implements HRegionInterface, HBaseRPCErrorHandler,
|
||||||
// Interrupt catalog tracker here in case any regions being opened out in
|
// Interrupt catalog tracker here in case any regions being opened out in
|
||||||
// handlers are stuck waiting on meta or root.
|
// handlers are stuck waiting on meta or root.
|
||||||
if (this.catalogTracker != null) this.catalogTracker.stop();
|
if (this.catalogTracker != null) this.catalogTracker.stop();
|
||||||
waitOnAllRegionsToClose();
|
if (this.fsOk) waitOnAllRegionsToClose();
|
||||||
|
|
||||||
// Make sure the proxy is down.
|
// Make sure the proxy is down.
|
||||||
if (this.hbaseMaster != null) {
|
if (this.hbaseMaster != null) {
|
||||||
|
|
|
@ -97,7 +97,7 @@ public class OpenRegionHandler extends EventHandler {
|
||||||
if (tickleOpening("post_region_open")) {
|
if (tickleOpening("post_region_open")) {
|
||||||
if (updateMeta(region)) failed = false;
|
if (updateMeta(region)) failed = false;
|
||||||
}
|
}
|
||||||
if (failed) {
|
if (failed || this.server.isStopped() || this.rsServices.isStopping()) {
|
||||||
cleanupFailedOpen(region);
|
cleanupFailedOpen(region);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -119,6 +119,9 @@ public class OpenRegionHandler extends EventHandler {
|
||||||
* Caller must cleanup region if this fails.
|
* Caller must cleanup region if this fails.
|
||||||
*/
|
*/
|
||||||
private boolean updateMeta(final HRegion r) {
|
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.
|
// Object we do wait/notify on. Make it boolean. If set, we're done.
|
||||||
// Else, wait.
|
// Else, wait.
|
||||||
final AtomicBoolean signaller = new AtomicBoolean(false);
|
final AtomicBoolean signaller = new AtomicBoolean(false);
|
||||||
|
@ -324,4 +327,4 @@ public class OpenRegionHandler extends EventHandler {
|
||||||
private boolean isGoodVersion() {
|
private boolean isGoodVersion() {
|
||||||
return this.version != -1;
|
return this.version != -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue