kevinrr888 commented on code in PR #5028:
URL: https://github.com/apache/accumulo/pull/5028#discussion_r1852516801
##########
test/src/main/java/org/apache/accumulo/test/fate/FateOpsCommandsIT.java:
##########
@@ -796,4 +870,20 @@ private boolean wordIsTStatus(String word) {
}
return true;
}
+
+ /**
+ * Stop the MANAGER. For some of our tests, we want to be able to seed
transactions with our own
+ * test repos. We want our fate to reserve these transactions (and not the
real fates running in
+ * the Manager as that will lead to exceptions since the real fates wouldn't
be able to handle our
+ * test repos). So, we essentially have the fates created here acting as the
real fates: they have
+ * the same threads running that the real fates would, use a fate store with
a ZK lock, use the
+ * same locations to store fate data that the Manager does, and are running
in a separate process
+ * from the Admin process. Note that we cannot simply use different
locations for our fate data
+ * from Manager to keep our test env separate from Manager. Admin uses the
real fate data
+ * locations, so our test must also use the real locations.
+ */
+ protected void stopManager() throws InterruptedException, IOException {
+ getCluster().getClusterControl().stopAllServers(ServerType.MANAGER);
+ Thread.sleep(20_000);
Review Comment:
This sleep originated from when this class was initially created. Looking
back at our slack messages, found that the purpose of this sleep was to make
sure the Manager lock was no longer held after shutdown (shutdown the Manager,
wait 20 seconds (2x the Property.INSTANCE_ZK_TIMEOUT value we set)). This made
sure when we checked if the Manager lock was held before calling some of our
`admin fate` utils which required the Manager to be down, it would not
unexpectedly fail. But we no longer do that check here, so I think you're right
and this isn't needed anymore. I forgot the reasoning for this sleep and just
assumed it was needed to ensure the Manager was fully shutdown.
--
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]