dlmarion commented on a change in pull request #2169:
URL: https://github.com/apache/accumulo/pull/2169#discussion_r657113415
##########
File path:
server/manager/src/main/java/org/apache/accumulo/manager/tableOps/compact/cancel/CancelCompactions.java
##########
@@ -54,6 +54,19 @@ public long isReady(long tid, Manager env) throws Exception {
@Override
public Repo<Manager> call(long tid, Manager environment) throws Exception {
+
+ mutateZooKeeper(tid, tableId, environment);
+ return new FinishCancelCompaction(namespaceId, tableId);
+ }
+
+ @Override
+ public void undo(long tid, Manager env) {
+ Utils.unreserveTable(env, tableId, tid, false);
+ Utils.unreserveNamespace(env, namespaceId, tid, false);
+ }
Review comment:
I don't know that you can undo some of these operations. In this case,
CancelCompaction mutates the value of a znode, which is being watched by
processes performing compactions. Once it's mutated, and the processes notice,
there is no going back. I'm not sure what would happen if you set the znode
value back to its original value.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]