You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by st...@apache.org on 2021/01/08 17:25:40 UTC

[phoenix] branch master updated: PHOENIX-6305 Throttling decision does not take offheap memstore size into account

This is an automated email from the ASF dual-hosted git repository.

stoty pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/master by this push:
     new edbd6e8  PHOENIX-6305 Throttling decision does not take offheap memstore size into account
edbd6e8 is described below

commit edbd6e8a78c098c3a6df73496272d2dd4858feec
Author: Istvan Toth <st...@apache.org>
AuthorDate: Thu Jan 7 12:56:07 2021 +0100

    PHOENIX-6305 Throttling decision does not take offheap memstore size into account
    
    Co-authored-by: Ankit Singhal <an...@gmail.com>
---
 .../apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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 9bca44e..d96dfe3 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
@@ -260,7 +260,9 @@ public class UngroupedAggregateRegionObserver extends BaseScannerRegionObserver
        Mutation[] mutationArray = new Mutation[mutations.size()];
       // 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; blockingMemstoreSize > 0 && region.getMemStoreHeapSize() > blockingMemstoreSize && i < 30; i++) {
+      for (int i = 0; blockingMemstoreSize > 0
+              && region.getMemStoreHeapSize() + region.getMemStoreOffHeapSize() > blockingMemstoreSize
+              && i < 30; i++) {
           try {
               checkForRegionClosingOrSplitting();
               Thread.sleep(100);