HBASE-1042 OOME but we don't abort

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@722690 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2008-12-03 00:03:13 +00:00
parent ab7a3d33f2
commit d479c750de
4 changed files with 10 additions and 6 deletions

View File

@ -88,6 +88,7 @@ Release 0.19.0 - Unreleased
HBASE-1036 HBASE-1028 broke Thrift HBASE-1036 HBASE-1028 broke Thrift
HBASE-1037 Some test cases failing on Windows/Cygwin but not UNIX/Linux HBASE-1037 Some test cases failing on Windows/Cygwin but not UNIX/Linux
HBASE-1041 Migration throwing NPE HBASE-1041 Migration throwing NPE
HBASE-1042 OOME but we don't abort
IMPROVEMENTS IMPROVEMENTS
HBASE-901 Add a limit to key length, check key and value length on client side HBASE-901 Add a limit to key length, check key and value length on client side

View File

@ -77,12 +77,13 @@ public class Leases extends Thread {
Lease lease = null; Lease lease = null;
try { try {
lease = leaseQueue.poll(leaseCheckFrequency, TimeUnit.MILLISECONDS); lease = leaseQueue.poll(leaseCheckFrequency, TimeUnit.MILLISECONDS);
} catch (InterruptedException e) { } catch (InterruptedException e) {
continue; continue;
} catch (ConcurrentModificationException e) { } catch (ConcurrentModificationException e) {
continue; continue;
} catch (Throwable e) {
LOG.fatal("Unexpected exception killed leases thread", e);
break;
} }
if (lease == null) { if (lease == null) {
continue; continue;

View File

@ -758,4 +758,4 @@ class ServerManager implements HConstants {
public boolean isDead(String serverName) { public boolean isDead(String serverName) {
return deadServers.contains(serverName); return deadServers.contains(serverName);
} }
} }

View File

@ -608,8 +608,9 @@ public class HRegionServer implements HConstants, HRegionInterface, Runnable {
private boolean checkOOME(final Throwable e) { private boolean checkOOME(final Throwable e) {
boolean aborting = false; boolean aborting = false;
if (e instanceof OutOfMemoryError || if (e instanceof OutOfMemoryError ||
(e.getCause()!= null && e.getCause() instanceof OutOfMemoryError)) { (e.getCause()!= null && e.getCause() instanceof OutOfMemoryError) ||
LOG.fatal("OOME, aborting.", e); e.getMessage().contains("java.lang.OutOfMemoryError")) {
LOG.fatal("OutOfMemoryError, aborting.", e);
abort(); abort();
aborting = true; aborting = true;
} }
@ -1871,7 +1872,8 @@ public class HRegionServer implements HConstants, HRegionInterface, Runnable {
*/ */
protected void checkOpen() throws IOException { protected void checkOpen() throws IOException {
if (this.stopRequested.get() || this.abortRequested) { if (this.stopRequested.get() || this.abortRequested) {
throw new IOException("Server not running"); throw new IOException("Server not running" +
(this.abortRequested? ", aborting": ""));
} }
if (!fsOk) { if (!fsOk) {
throw new IOException("File system not available"); throw new IOException("File system not available");