You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "dlmarion (via GitHub)" <gi...@apache.org> on 2025/07/09 17:31:26 UTC

Re: [PR] Added Eventual Scan test in ComprehensiveIT [accumulo]

dlmarion commented on code in PR #4754:
URL: https://github.com/apache/accumulo/pull/4754#discussion_r2195597669


##########
test/src/main/java/org/apache/accumulo/test/ComprehensiveITBase.java:
##########
@@ -121,6 +126,56 @@ public abstract class ComprehensiveITBase extends SharedMiniClusterBase {
 
   private static final Logger log = LoggerFactory.getLogger(ComprehensiveIT_SimpleSuite.class);
 
+  @Test
+  public void testEventualScan() throws Exception {
+    Properties props = new Properties();
+    props.putAll(getClientProps());
+    props.put(ClientProperty.SCAN_SERVER_SELECTOR.getKey(),
+        ConfigurableScanServerSelector.class.getName());
+    props.put(ClientProperty.SCAN_SERVER_SELECTOR_OPTS_PREFIX.getKey() + "profiles",
+        "[{'isDefault':true,'timeToWaitForScanServers' : '10d','maxBusyTimeout':'5m','busyTimeoutMultiplier':4,'attemptPlans':[{\"servers\":\"100%\", \"busyTimeout\":\"3ms\"}]}]");
+
+    try (AccumuloClient client = Accumulo.newClient().from(props).build()) {
+      String table = getUniqueNames(1)[0];
+      client.tableOperations().create(table);
+      getCluster().getClusterControl().start(ServerType.SCAN_SERVER);
+      Wait.waitFor(
+          () -> !client.instanceOperations().getServers(ServerId.Type.SCAN_SERVER).isEmpty());
+
+      write(client, table, generateMutations(0, 100, tr -> true));
+      client.tableOperations().flush(table, null, null, true);

Review Comment:
   I think this looks good. Can you add two things before this flush call?
   
     1. Scan without setting consistencyLevel to ensure 1-100 are returned
     2. Scan with setting consistencyLevel to EVENTUAL and ensure nothing is returned.



-- 
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-unsubscribe@accumulo.apache.org

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