EdColeman commented on a change in pull request #1890:
URL: https://github.com/apache/accumulo/pull/1890#discussion_r566945281
##########
File path:
server/base/src/main/java/org/apache/accumulo/server/zookeeper/TransactionWatcher.java
##########
@@ -104,13 +104,15 @@ public static void cleanup(ServerContext context, String
type, long tid)
final ZooReader reader = context.getZooReaderWriter();
final Set<Long> result = new HashSet<>();
final String parent = context.getZooKeeperRoot() + "/" + type;
- reader.sync(parent);
- List<String> children = reader.getChildren(parent);
- for (String child : children) {
- if (child.endsWith("-running")) {
- continue;
+ if (reader.exists(parent)) {
Review comment:
Because this is a runnable - we may not want (or be able to throw an
exception) - so at a minimum we should be able to reset the interrupt status
with something like:
Also, not sure what info is valuable in the debug statement, listing the
tids might make sense - unless its a big list... Without understanding the
context I cannot say at this point....
` } catch (KeeperException e) {
// we'll just clean it up again later
log.debug("Error reading bulk import live transactions {}", tids, e);
} catch(InterruptedException e) {
// propagate the interrupt status.
Thread.currentThread().interrupt();
log.debug("Interrupted while reading bulk import live transactions
{}", tids, e);
}
`
This comes from [Dealing with
InterruptedException](https://www.ibm.com/developerworks/library/j-jtp05236/index.html)
----------------------------------------------------------------
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]