ACCUMULO-3835 leave the locator cache alone if the BatchReader has been closed
Conflicts: core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderIterator.java Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/1338d037 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/1338d037 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/1338d037 Branch: refs/heads/1.7 Commit: 1338d0379db1ce9d3595052c3408b4f4a22f9591 Parents: 2a2bfbb Author: Eric C. Newton <eric.new...@gmail.com> Authored: Tue May 26 13:05:11 2015 -0400 Committer: Josh Elser <els...@apache.org> Committed: Wed Dec 30 19:58:26 2015 -0500 ---------------------------------------------------------------------- .../client/impl/TabletServerBatchReaderIterator.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/1338d037/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 814e9ce..64ccac1 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 @@ -383,12 +383,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(tsLocation); + locator.invalidateCache(tsLocation); + } log.debug(e.getMessage(), e); } catch (AccumuloSecurityException e) { e.setTableInfo(getTableInfo());