Repository: phoenix Updated Branches: refs/heads/4.8-HBase-1.1 3e8593b61 -> ad05d43d5
PHOENIX-3170 Remove the futuretask from the list if StaleRegionBoundaryCacheException is thrown while initializing the scanners(Rajeshbabu)-fixing wrong commit changes. Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/ad05d43d Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/ad05d43d Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/ad05d43d Branch: refs/heads/4.8-HBase-1.1 Commit: ad05d43d5645357da45424c8917e1a11825e8191 Parents: 3e8593b Author: Rajeshbabu Chintaguntla <rajeshb...@apache.org> Authored: Tue Sep 13 19:02:55 2016 +0530 Committer: Rajeshbabu Chintaguntla <rajeshb...@apache.org> Committed: Tue Sep 13 19:02:55 2016 +0530 ---------------------------------------------------------------------- .../UngroupedAggregateRegionObserver.java | 40 +------------------- 1 file changed, 1 insertion(+), 39 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/ad05d43d/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java index 0fa35bd..a7c6fde 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java @@ -202,40 +202,7 @@ public class UngroupedAggregateRegionObserver extends BaseScannerRegionObserver } // TODO: should we use the one that is all or none? logger.debug("Committing bactch of " + mutations.size() + " mutations for " + region.getRegionInfo().getTable().getNameAsString()); - try { - region.batchMutate(mutations.toArray(mutationArray), HConstants.NO_NONCE, HConstants.NO_NONCE); - } catch (RegionTooBusyException rtbe) { - // When memstore size reaches blockingMemstoreSize we are waiting 3 seconds for the - // flush happen which decrease the memstore size and then writes allowed on the region. - for (int i = 0; region.getMemstoreSize() > blockingMemstoreSize && i < 30; i++) { - try { - checkForRegionClosing(); - Thread.sleep(100); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new IOException(e); - } - } - if (region.getMemstoreSize() > blockingMemstoreSize) { - throw rtbe; - } - region.batchMutate(mutationArray, HConstants.NO_NONCE, HConstants.NO_NONCE); - } - } - - /** - * There is a chance that region might be closing while running balancer/move/merge. In this - * case if the memstore size reaches blockingMemstoreSize better to fail query because there is - * a high chance that flush might not proceed and memstore won't be freed up. - * @throws IOException - */ - private void checkForRegionClosing() throws IOException { - synchronized (lock) { - if(isRegionClosing) { - lock.notifyAll(); - throw new IOException("Region is getting closed. Not allowing to write to avoid possible deadlock."); - } - } + region.batchMutate(mutations.toArray(mutationArray), HConstants.NO_NONCE, HConstants.NO_NONCE); } /** @@ -381,15 +348,10 @@ public class UngroupedAggregateRegionObserver extends BaseScannerRegionObserver } /** -<<<<<<< HEAD - * Upper bound of memstore size allowed for region. Updates will be blocked until the flush - * happen if the memstore reaches this threshold. -======= * Slow down the writes if the memstore size more than * (hbase.hregion.memstore.block.multiplier - 1) times hbase.hregion.memstore.flush.size * bytes. This avoids flush storm to hdfs for cases like index building where reads and * write happen to all the table regions in the server. ->>>>>>> 2fdf91227f9a6521c3ab26f2f25837e8bf3025c9 */ final long blockingMemStoreSize = flushSize * ( conf.getLong(HConstants.HREGION_MEMSTORE_BLOCK_MULTIPLIER,