lvfangmin commented on a change in pull request #922: ZOOKEEPER-3361: Add multi 
version of getChildren request
URL: https://github.com/apache/zookeeper/pull/922#discussion_r283072072
 
 

 ##########
 File path: 
zookeeper-server/src/main/java/org/apache/zookeeper/server/FinalRequestProcessor.java
 ##########
 @@ -468,6 +470,28 @@ public void processRequest(Request request) {
                 rsp = new GetChildren2Response(children, stat);
                 break;
             }
+            case OpCode.getChildrenList: {
+                lastOp = "GETC";
+                GetChildrenListRequest getChildrenListRequest = new 
GetChildrenListRequest();
+                ByteBufferInputStream.byteBuffer2Record(request.request,
+                        getChildrenListRequest);
+                List<List<String>> childrenList = new 
ArrayList<List<String>>();
+                for(String p : getChildrenListRequest.getPathList()) {
+                    path = p;
+                    DataNode n = zks.getZKDatabase().getNode(path);
+                    if (n == null) {
 
 Review comment:
   Not sure if it makes sense to return empty list if the node doesn't exist, 
so that we won't waste the cycle to fail often due to nodes being created and 
deleted often.

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to