You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2019/12/03 21:00:00 UTC

[GitHub] [accumulo] EdColeman commented on a change in pull request #1443: Fixes #1220 - Removes ZooKeeper watches on table configs when table is deleted.

EdColeman commented on a change in pull request #1443: Fixes #1220  -  Removes ZooKeeper watches on table configs when table is deleted.
URL: https://github.com/apache/accumulo/pull/1443#discussion_r353418519
 
 

 ##########
 File path: core/src/main/java/org/apache/accumulo/fate/zookeeper/ZooCache.java
 ##########
 @@ -155,8 +167,22 @@ public void process(WatchedEvent event) {
       }
 
       switch (event.getType()) {
-        case NodeDataChanged:
         case NodeChildrenChanged:
+          if (event.getPath().endsWith("conf")) {
+            Matcher confDirMatcher = TABLE_CONFIG_DIR_PATTERN.matcher(event.getPath());
+            if (confDirMatcher.matches()) {
+              try {
+                clear(event.getPath());
+                getZooKeeper().exists(event.getPath(), watcher);
 
 Review comment:
   According to the zookeeper documentation, it will set a data watch.  A quick look through the code it looks like the data is for the `...\conf\` node is initialized with `new byte[0]` and I don't see it set to anything else.  Is there somewhere that I'm missing that sets / uses the data directly on the `...\conf` node?  Or, is the `...\conf` node a parent node for the rest of the configuration?  If the `...\conf` node exists solely so that child nodes can be created / contained, what value is there in setting a data watch for a change? 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services