kevinrr888 opened a new issue, #5679:
URL: https://github.com/apache/accumulo/issues/5679

   **Is your feature request related to a problem? Please describe.**
   The test was originally written as shown in additional context but was 
deleted. This test needs to test compactions on all the system tables, but the 
approach below is either flawed or is demonstrating a bug with the Manager.
   
   **Describe the solution you'd like**
   Need to determine if the issue is with the test itself or the Manager. If 
the issue is with the test itself, need to fix the test below or rewrite the 
test while still testing basic functionality of compactions on all system 
tables. If the issue is with the Manager, need to resolve the issue and 
hopefully can use the same test below.
   
   **Describe alternatives you've considered**
   N/A
   
   **Additional context**
   See https://github.com/apache/accumulo/pull/5474#discussion_r2042452359 
which details the issue seen in the below test.
   
   ```
     @Test
     public void test_compact() throws Exception {
       // compact for user tables is tested in various ITs. One example is 
CompactionIT. Ensure
       // test exists
       assertDoesNotThrow(() -> Class.forName(CompactionIT.class.getName()));
       // disable the GC to prevent automatic compactions on METADATA and ROOT 
tables
       
getCluster().getClusterControl().stopAllServers(ServerType.GARBAGE_COLLECTOR);
       try {
         // test basic functionality for system tables
         userTable = getUniqueNames(1)[0];
         ops.create(userTable);
   
         // create some RFiles for the METADATA and ROOT tables by creating 
some data in the user
         // table, flushing that table, then the METADATA table, then the ROOT 
table
         for (int i = 0; i < 3; i++) {
           try (var bw = client.createBatchWriter(userTable)) {
             var mut = new Mutation("r" + i);
             mut.put("cf", "cq", "v");
             bw.addMutation(mut);
           }
           ops.flush(userTable, null, null, true);
           ops.flush(SystemTables.METADATA.tableName(), null, null, true);
           ops.flush(SystemTables.ROOT.tableName(), null, null, true);
         }
   
         for (var sysTable : SystemTables.tableNames()) {
           // create some RFiles for FATE and SCAN_REF tables
           if (sysTable == SystemTables.SCAN_REF) {
             createScanRefTableRow();
             ops.flush(SystemTables.SCAN_REF.tableName(), null, null, true);
           } else if (sysTable == SystemTables.FATE) {
             createFateTableRow(userTable);
             ops.flush(SystemTables.FATE.tableName(), null, null, true);
           }
   
           Set<StoredTabletFile> stfsBeforeCompact = 
getStoredTabFiles(sysTable);
   
           log.info("Compacting " + sysTable);
           ops.compact(sysTable.tableName(), null, null, true, true);
           log.info("Finished compacting " + sysTable);
   
           // RFiles resulting from a compaction begin with 'A'. Wait until we 
see an RFile beginning
           // with 'A' that was not present before the compaction.
           Wait.waitFor(() -> {
             var stfsAfterCompact = getStoredTabFiles(sysTable);
             String regex = "^A.*\\.rf$";
             var A_stfsBeforeCompaction = stfsBeforeCompact.stream()
                 .filter(stf -> 
stf.getFileName().matches(regex)).collect(Collectors.toSet());
             var A_stfsAfterCompaction = stfsAfterCompact.stream()
                 .filter(stf -> 
stf.getFileName().matches(regex)).collect(Collectors.toSet());
             return !Sets.difference(A_stfsAfterCompaction, 
A_stfsBeforeCompaction).isEmpty();
           });
         }
       } finally {
         
getCluster().getClusterControl().startAllServers(ServerType.GARBAGE_COLLECTOR);
       }
     }
   ```
   


-- 
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: notifications-unsubscr...@accumulo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to