keith-turner commented on code in PR #5939:
URL: https://github.com/apache/accumulo/pull/5939#discussion_r2388808344
##########
core/src/main/java/org/apache/accumulo/core/fate/zookeeper/ZooReservation.java:
##########
@@ -76,7 +77,9 @@ public static void release(ZooReaderWriter zk, String path,
FateId fateId)
+ " with data mismatch " + fateId + " " + zooDataStr);
}
- zk.recursiveDelete(path, NodeMissingPolicy.SKIP);
+ // Only delete the node if the version is the same. It should be the same
as this holds the
+ // reservation, so for it to change at this point would probably indicate
a bug.
+ zk.deleteStrict(path, stat.getVersion());
Review Comment:
Seems like its best to let all of those exceptions leave the method as they
are all unexpected. The code do not create children under the node AFAICT, so
theNotEmpty exception is unexpected. The BadVersion and NoNode exceptions
indicate that another threads is unexpectedly modifying this node, which is not
expected since we hold the reservation.
Did not make this change in 2.1 because not sure this change will cause
problems, like maybe we will see these exceptions and have to investigate the
cause.
--
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]