accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject [1/2] accumulo git commit: ACCUMULO-3835 leave the locator cache alone if the BatchReader has been closed
Date Tue, 26 May 2015 17:05:22 GMT
Repository: accumulo
Updated Branches:
  refs/heads/master f453ecaa1 -> 56e211ae6


ACCUMULO-3835 leave the locator cache alone if the BatchReader has been closed


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/1c33be2c
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/1c33be2c
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/1c33be2c

Branch: refs/heads/master
Commit: 1c33be2cd8ad764eacd40af343879689971ea64f
Parents: 43c3831
Author: Eric C. Newton <eric.newton@gmail.com>
Authored: Tue May 26 13:05:11 2015 -0400
Committer: Eric C. Newton <eric.newton@gmail.com>
Committed: Tue May 26 13:05:11 2015 -0400

----------------------------------------------------------------------
 .../client/impl/TabletServerBatchReaderIterator.java    | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/1c33be2c/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderIterator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderIterator.java
b/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderIterator.java
index 2a0e1d8..053f2b3 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderIterator.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderIterator.java
@@ -355,12 +355,14 @@ public class TabletServerBatchReaderIterator implements Iterator<Entry<Key,Value
         }
 
       } catch (IOException e) {
-        synchronized (failures) {
-          failures.putAll(tsFailures);
-          failures.putAll(unscanned);
-        }
+        if (!TabletServerBatchReaderIterator.this.queryThreadPool.isShutdown()) {
+          synchronized (failures) {
+            failures.putAll(tsFailures);
+            failures.putAll(unscanned);
+          }
 
-        locator.invalidateCache(context.getInstance(), tsLocation);
+          locator.invalidateCache(context.getInstance(), tsLocation);
+        }
         log.debug(e.getMessage(), e);
       } catch (AccumuloSecurityException e) {
         e.setTableInfo(getTableInfo());


Mime
View raw message