DomGarguilo commented on issue #5951:
URL: https://github.com/apache/accumulo/issues/5951#issuecomment-3377231434

   Here is a failing JUnit test case too:
   ```java
     @Test
     public void testDuplicateTimestampScanLosesKeys() throws Exception {
       ClientContext context = (ClientContext) client;
       final int numRows = 100;
       final int mutationsPerRow = 10;
       final int expectedEntries = numRows * mutationsPerRow;
       SecureRandom random = new SecureRandom();
       byte[] randomValue = new byte[8192];
   
       client.tableOperations().create(tableName);
   
       Set<String> versionIterProps =
           Set.of("table.iterator.scan.vers", "table.iterator.minc.vers", 
"table.iterator.majc.vers");
       client.tableOperations().modifyProperties(tableName,
           properties -> properties.keySet().removeAll(versionIterProps));
   
       try (BatchWriter bw = client.createBatchWriter(tableName)) {
         for (int i = 0; i < numRows; i++) {
           for (int j = 0; j < mutationsPerRow; j++) {
             Mutation m = new Mutation("row" + i);
             random.nextBytes(randomValue);
             m.put("cf" + i, "cq" + i, 100L, new Value(randomValue));
             bw.addMutation(m);
           }
         }
       }
       client.tableOperations().flush(tableName, null, null, true);
       client.tableOperations().compact(tableName, new 
CompactionConfig().setWait(true));
   
       client.tableOperations().offline(tableName, true);
       long offlineCount;
       try (OfflineScanner offlineScanner =
           new OfflineScanner(context, context.getTableId(tableName), 
Authorizations.EMPTY)) {
         offlineCount = offlineScanner.stream().count();
       }
   
       client.tableOperations().online(tableName, true);
       long onlineCount;
       try (Scanner scanner = client.createScanner(tableName, 
Authorizations.EMPTY)) {
         onlineCount = scanner.stream().count();
       }
   
       assertEquals(expectedEntries, offlineCount);
       assertEquals(offlineCount, onlineCount, "Online scan lost keys compared 
to direct RFile scan");
     }
   ```
   And this fails on the final assert with:
   ```
   org.opentest4j.AssertionFailedError: Online scan lost keys ==> 
   Expected :1000
   Actual   :888
   ```


-- 
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