You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "ArbaazKhan1 (via GitHub)" <gi...@apache.org> on 2024/09/04 15:12:14 UTC
Re: [PR] Added Eventual Scan test in ComprehensiveIT [accumulo]
ArbaazKhan1 commented on code in PR #4754:
URL: https://github.com/apache/accumulo/pull/4754#discussion_r1743983207
##########
test/src/main/java/org/apache/accumulo/test/ComprehensiveIT.java:
##########
@@ -133,6 +151,58 @@ public static void teardown() {
SharedMiniClusterBase.stopMiniCluster();
}
+ @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);
+
+ // Start Scan Server
+ getCluster().getClusterControl().start(ServerType.SCAN_SERVER);
+
+ // generate 100 rows of data
+ write(client, table, generateMutations(0, 100, tr -> true));
+
+ // need flush table so that eventual scan can see it.
+ getCluster().getClusterControl().stop(ServerType.SCAN_SERVER);
Review Comment:
I took a look at setting `Property.SSERV_CACHED_TABLET_METADATA_EXPIRATION` to a larger value but even if increase the time and remove the start/stop scan server the tests fail. The most consistent way to ensure that data is present on scan servers is by either using `Thread.sleep` for a long enough time or starting/stops servers, and the discussion was that start/stop gives us the most reliable consistency.
--
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