You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by ra...@apache.org on 2016/09/13 13:33:25 UTC
phoenix git commit: PHOENIX-3170 Remove the futuretask from the list
if StaleRegionBoundaryCacheException is thrown while initializing the
scanners(Rajeshbabu)-actual patch
Repository: phoenix
Updated Branches:
refs/heads/4.8-HBase-1.1 ad05d43d5 -> f0de6d533
PHOENIX-3170 Remove the futuretask from the list if StaleRegionBoundaryCacheException is thrown while initializing the scanners(Rajeshbabu)-actual patch
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/f0de6d53
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/f0de6d53
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/f0de6d53
Branch: refs/heads/4.8-HBase-1.1
Commit: f0de6d533c2ca42799dab2ac2a288965bcd36130
Parents: ad05d43
Author: Rajeshbabu Chintaguntla <ra...@apache.org>
Authored: Tue Sep 13 19:10:04 2016 +0530
Committer: Rajeshbabu Chintaguntla <ra...@apache.org>
Committed: Tue Sep 13 19:10:04 2016 +0530
----------------------------------------------------------------------
.../java/org/apache/phoenix/iterate/BaseResultIterators.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/f0de6d53/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java b/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
index 8b9adfd..2685b93 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
@@ -31,6 +31,7 @@ import java.io.EOFException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
@@ -751,7 +752,9 @@ public abstract class BaseResultIterators extends ExplainTable implements Result
boolean clearedCache = false;
for (List<Pair<Scan,Future<PeekingResultIterator>>> future : reverseIfNecessary(futures,isReverse)) {
List<PeekingResultIterator> concatIterators = Lists.newArrayListWithExpectedSize(future.size());
- for (Pair<Scan,Future<PeekingResultIterator>> scanPair : reverseIfNecessary(future,isReverse)) {
+ Iterator<Pair<Scan, Future<PeekingResultIterator>>> scanPairItr = reverseIfNecessary(future,isReverse).iterator();
+ while (scanPairItr.hasNext()) {
+ Pair<Scan,Future<PeekingResultIterator>> scanPair = scanPairItr.next();
try {
long timeOutForScan = maxQueryEndTime - System.currentTimeMillis();
if (timeOutForScan < 0) {
@@ -773,6 +776,7 @@ public abstract class BaseResultIterators extends ExplainTable implements Result
try { // Rethrow as SQLException
throw ServerUtil.parseServerException(e);
} catch (StaleRegionBoundaryCacheException e2) {
+ scanPairItr.remove();
// Catch only to try to recover from region boundary cache being out of date
if (!clearedCache) { // Clear cache once so that we rejigger job based on new boundaries
services.clearTableRegionCache(physicalTableName);