git commit: HBASE-11551 BucketCache.run() doesn't handle exceptions correctly (Ted Yu)
Repository: hbase Updated Branches: refs/heads/0.98 e426d43e8 - 76e89cb7f HBASE-11551 BucketCache.run() doesn't handle exceptions correctly (Ted Yu) Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/76e89cb7 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/76e89cb7 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/76e89cb7 Branch: refs/heads/0.98 Commit: 76e89cb7fface4d91b8c62192832be581bf67a3b Parents: e426d43 Author: Ted Yu te...@apache.org Authored: Wed Jul 30 19:43:38 2014 + Committer: Ted Yu te...@apache.org Committed: Wed Jul 30 19:43:38 2014 + -- .../hbase/io/hfile/bucket/BucketCache.java | 20 1 file changed, 12 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/76e89cb7/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java index 3614dc4..17d178e 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java @@ -685,16 +685,20 @@ public class BucketCache implements BlockCache, HeapSize { try { while (cacheEnabled writerEnabled) { try { -// Blocks -entries.add(inputQueue.take()); -inputQueue.drainTo(entries); -synchronized (cacheWaitSignals[threadNO]) { - cacheWaitSignals[threadNO].notifyAll(); +try { + // Blocks + entries.add(inputQueue.take()); + inputQueue.drainTo(entries); + synchronized (cacheWaitSignals[threadNO]) { +cacheWaitSignals[threadNO].notifyAll(); + } +} catch (InterruptedException ie) { + if (!cacheEnabled) break; } - } catch (InterruptedException ie) { -if (!cacheEnabled) break; +doDrain(entries); + } catch (Exception ioe) { +LOG.error(WriterThread encountered error, ioe); } - doDrain(entries); } } catch (Throwable t) { LOG.warn(Failed doing drain, t);
git commit: HBASE-11551 BucketCache.run() doesn't handle exceptions correctly
Repository: hbase Updated Branches: refs/heads/branch-1 4c3fce8e4 - afd4eb666 HBASE-11551 BucketCache.run() doesn't handle exceptions correctly Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/afd4eb66 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/afd4eb66 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/afd4eb66 Branch: refs/heads/branch-1 Commit: afd4eb666836dd012f8cd6269ca227dc838ba6db Parents: 4c3fce8 Author: stack st...@apache.org Authored: Wed Jul 23 07:34:51 2014 -0700 Committer: stack st...@apache.org Committed: Wed Jul 23 07:35:27 2014 -0700 -- .../hbase/io/hfile/bucket/BucketCache.java | 20 1 file changed, 12 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/afd4eb66/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java index e3a8118..3439cc1 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java @@ -688,16 +688,20 @@ public class BucketCache implements BlockCache, HeapSize { try { while (cacheEnabled writerEnabled) { try { -// Blocks -entries.add(inputQueue.take()); -inputQueue.drainTo(entries); -synchronized (cacheWaitSignals[threadNO]) { - cacheWaitSignals[threadNO].notifyAll(); +try { + // Blocks + entries.add(inputQueue.take()); + inputQueue.drainTo(entries); + synchronized (cacheWaitSignals[threadNO]) { +cacheWaitSignals[threadNO].notifyAll(); + } +} catch (InterruptedException ie) { + if (!cacheEnabled) break; } - } catch (InterruptedException ie) { -if (!cacheEnabled) break; +doDrain(entries); + } catch (Exception ioe) { +LOG.error(WriterThread encountered error, ioe); } - doDrain(entries); } } catch (Throwable t) { LOG.warn(Failed doing drain, t);
git commit: HBASE-11551 BucketCache.run() doesn't handle exceptions correctly (Ted Yu)
Repository: hbase Updated Branches: refs/heads/master 60f537889 - 75c94c6bb HBASE-11551 BucketCache.run() doesn't handle exceptions correctly (Ted Yu) Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/75c94c6b Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/75c94c6b Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/75c94c6b Branch: refs/heads/master Commit: 75c94c6bb50c46c62843974976b77b4b44ce23a4 Parents: 60f5378 Author: Ted Yu te...@apache.org Authored: Thu Jul 24 00:59:10 2014 + Committer: Ted Yu te...@apache.org Committed: Thu Jul 24 00:59:10 2014 + -- .../hbase/io/hfile/bucket/BucketCache.java | 22 1 file changed, 13 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/75c94c6b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java index 11979be..9a8cf5a 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java @@ -688,16 +688,20 @@ public class BucketCache implements BlockCache, HeapSize { try { while (cacheEnabled writerEnabled) { try { -// Blocks -entries.add(inputQueue.take()); -inputQueue.drainTo(entries); -synchronized (cacheWaitSignals[threadNO]) { - cacheWaitSignals[threadNO].notifyAll(); +try { + // Blocks + entries.add(inputQueue.take()); + inputQueue.drainTo(entries); + synchronized (cacheWaitSignals[threadNO]) { +cacheWaitSignals[threadNO].notifyAll(); + } +} catch (InterruptedException ie) { + if (!cacheEnabled) break; } - } catch (InterruptedException ie) { -if (!cacheEnabled) break; +doDrain(entries); + } catch (Exception ioe) { +LOG.error(WriterThread encountered error, ioe); } - doDrain(entries); } } catch (Throwable t) { LOG.warn(Failed doing drain, t); @@ -1286,4 +1290,4 @@ public class BucketCache implements BlockCache, HeapSize { public BlockCache[] getBlockCaches() { return null; } -} \ No newline at end of file +}