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

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


The following commit(s) were added to refs/heads/elasticity by this push:
     new 0b68dc7725 fixes bug in tablet refresh (#3864)
0b68dc7725 is described below

commit 0b68dc7725b4dae221c66652feab21944d88c2cf
Author: Keith Turner <ktur...@apache.org>
AuthorDate: Wed Oct 18 13:58:19 2023 -0400

    fixes bug in tablet refresh (#3864)
    
    The tablet refresh code was comparing a tablet metdata object to itself.
    The intention was to compare the tablet metadata to the previous version
    of the tablet metadata.
---
 .../src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java       | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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 789649758c..5bdba6c364 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
@@ -1467,6 +1467,7 @@ public class Tablet extends TabletBase {
       TabletMetadata tabletMetadata = 
getContext().getAmple().readTablet(getExtent());
 
       synchronized (this) {
+        var prevMetadata = latestMetadata;
         latestMetadata = tabletMetadata;
 
         if (refreshPurpose == RefreshPurpose.MINC_COMPLETION) {
@@ -1484,7 +1485,7 @@ public class Tablet extends TabletBase {
 
           // important to call this after updating latestMetadata and 
tabletMemory
           computeNumEntries();
-        } else if 
(!latestMetadata.getFilesMap().equals(tabletMetadata.getFilesMap())) {
+        } else if 
(!prevMetadata.getFilesMap().equals(latestMetadata.getFilesMap())) {
 
           // the files changed, incrementing this will cause scans to switch 
data sources
           dataSourceDeletions.incrementAndGet();

Reply via email to