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

dlmarion 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 7de6d57b40 Log tablet file differences on refresh RPC call (#3879)
7de6d57b40 is described below

commit 7de6d57b40f7cd4fa4a6b22e1e322a013c30d048
Author: Dave Marion <dlmar...@apache.org>
AuthorDate: Mon Oct 23 16:57:08 2023 -0400

    Log tablet file differences on refresh RPC call (#3879)
    
    Fixes #3669
---
 .../main/java/org/apache/accumulo/tserver/tablet/Tablet.java  | 11 +++++++++++
 1 file changed, 11 insertions(+)

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 f08c5e367e..f08922fa8c 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
@@ -104,6 +104,8 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.google.common.base.Preconditions;
+import com.google.common.collect.Sets;
+import com.google.common.collect.Sets.SetView;
 
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import io.opentelemetry.api.trace.Span;
@@ -1538,6 +1540,15 @@ public class Tablet extends TabletBase {
         var prevMetadata = latestMetadata;
         latestMetadata = tabletMetadata;
 
+        if (log.isDebugEnabled() && 
!prevMetadata.getFiles().equals(latestMetadata.getFiles())) {
+          SetView<StoredTabletFile> removed =
+              Sets.difference(prevMetadata.getFiles(), 
latestMetadata.getFiles());
+          SetView<StoredTabletFile> added =
+              Sets.difference(latestMetadata.getFiles(), 
prevMetadata.getFiles());
+          log.debug("Tablet {} was refreshed. Files removed: {} Files added: 
{}", this.getExtent(),
+              removed, added);
+        }
+
         if (refreshPurpose == RefreshPurpose.MINC_COMPLETION) {
           // Atomically replace the in memory map with the new file. Before 
this synch block a scan
           // starting would see the in memory map. After this synch block it 
should see the file in

Reply via email to