HBASE-4695 WAL logs get deleted before region server can fully flush

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1196220 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2011-11-01 19:12:11 +00:00
parent e34c773792
commit d5364c2bfd
2 changed files with 8 additions and 3 deletions

View File

@ -433,6 +433,8 @@ Release 0.92.0 - Unreleased
slowing down the shutdown by 0.5s slowing down the shutdown by 0.5s
HBASE-4552 multi-CF bulk load is not atomic across column families (Jonathan Hsieh) HBASE-4552 multi-CF bulk load is not atomic across column families (Jonathan Hsieh)
HBASE-4710 UnknownProtocolException should abort client retries HBASE-4710 UnknownProtocolException should abort client retries
HBASE-4695 WAL logs get deleted before region server can fully flush
(gaojinchao)
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

@ -725,12 +725,10 @@ public class HRegionServer implements HRegionInterface, HBaseRPCErrorHandler,
} else if (abortRequested) { } else if (abortRequested) {
if (this.fsOk) { if (this.fsOk) {
closeAllRegions(abortRequested); // Don't leave any open file handles closeAllRegions(abortRequested); // Don't leave any open file handles
closeWAL(false);
} }
LOG.info("aborting server " + this.serverNameFromMasterPOV); LOG.info("aborting server " + this.serverNameFromMasterPOV);
} else { } else {
closeAllRegions(abortRequested); closeAllRegions(abortRequested);
closeWAL(true);
closeAllScanners(); closeAllScanners();
LOG.info("stopping server " + this.serverNameFromMasterPOV); LOG.info("stopping server " + this.serverNameFromMasterPOV);
} }
@ -743,6 +741,11 @@ public class HRegionServer implements HRegionInterface, HBaseRPCErrorHandler,
"; all regions closed."); "; all regions closed.");
} }
//fsOk flag may be changed when closing regions throws exception.
if (!this.killed && this.fsOk) {
closeWAL(abortRequested ? false : true);
}
// Make sure the proxy is down. // Make sure the proxy is down.
if (this.hbaseMaster != null) { if (this.hbaseMaster != null) {
HBaseRPC.stopProxy(this.hbaseMaster); HBaseRPC.stopProxy(this.hbaseMaster);