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

kturner pushed a commit to branch 1.10
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/1.10 by this push:
     new d6daafd894 Do not calculate split point in Tablet.needsSplit() (#3221)
d6daafd894 is described below

commit d6daafd89477af3823b955627ff7727ed67a0fb0
Author: FineAndDandy <cwilliams.w...@gmail.com>
AuthorDate: Fri Mar 24 18:14:22 2023 -0400

    Do not calculate split point in Tablet.needsSplit() (#3221)
---
 .../java/org/apache/accumulo/tserver/tablet/Tablet.java   | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git 
a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java 
b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
index 30bac63c27..6c452c4d64 100644
--- 
a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
+++ 
b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
@@ -1614,16 +1614,25 @@ public class Tablet implements TabletCommitter {
   private long timeOfLastImportWhenBigFreakinRowWasSeen = 0;
   private final long splitCreationTime;
 
-  private SplitRowSpec findSplitRow(Collection<FileRef> files) {
+  private boolean isSplitPossible() {
 
     // never split the root tablet
     // check if we already decided that we can never split
     // check to see if we're big enough to split
 
     long splitThreshold = 
tableConfiguration.getMemoryInBytes(Property.TABLE_SPLIT_THRESHOLD);
-    long maxEndRow = 
tableConfiguration.getMemoryInBytes(Property.TABLE_MAX_END_ROW_SIZE);
 
     if (extent.isRootTablet() || estimateTabletSize() <= splitThreshold) {
+      return false;
+    }
+
+    return true;
+  }
+
+  private SplitRowSpec findSplitRow(Collection<FileRef> files) {
+    long maxEndRow = 
tableConfiguration.getMemoryInBytes(Property.TABLE_MAX_END_ROW_SIZE);
+
+    if (!isSplitPossible()) {
       return null;
     }
 
@@ -1814,7 +1823,7 @@ public class Tablet implements TabletCommitter {
   public synchronized boolean needsSplit() {
     if (isClosing() || isClosed())
       return false;
-    return findSplitRow(getDatafileManager().getFiles()) != null;
+    return isSplitPossible();
   }
 
   // BEGIN PRIVATE METHODS RELATED TO MAJOR COMPACTION

Reply via email to