mjwall commented on a change in pull request #2293:
URL: https://github.com/apache/accumulo/pull/2293#discussion_r722713610



##########
File path: 
server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectionAlgorithm.java
##########
@@ -217,11 +222,30 @@ private void confirmDeletes(GarbageCollectionEnvironment 
gce,
         throw new RuntimeException(
             "Scanner over metadata table returned unexpected column : " + 
entry.getKey());
     }
+    Set<String> tableIdsAfter = gce.getTableIDs();
+    ensureAllTablesChecked(tableIdsBefore, tableIdsSeen, tableIdsAfter);
 
     confirmDeletesFromReplication(gce.getReplicationNeededIterator(),
         candidateMap.entrySet().iterator());
   }
 
+  @VisibleForTesting
+  protected void ensureAllTablesChecked(Set<String> tableIdsBefore, 
Set<String> tableIdsSeen,
+      Set<String> tableIdsAfter) {
+
+    // if a table was added or deleted during this run, it is acceptable to not
+    // have seen those tables ids when scanning the metadata table. So get the 
intersection
+    Set<String> tableIdsMustHaveSeen = new HashSet<>(tableIdsBefore);
+    tableIdsMustHaveSeen.retainAll(tableIdsAfter);

Review comment:
       > The following is a suggestion based on discussion we had at the top 
level of the PR. This may be another useful sanity check, but I have not fully 
convinced myself it will not cause troublesome false positives.
   
   Adding this check but it breaks existing test lol.  Will fix those




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to