You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2020/12/15 14:36:16 UTC

[GitHub] [zookeeper] eolivelli commented on a change in pull request #1559: ZOOKEEPER-4026: Complete support for Stat objects (and create2) in multi requests

eolivelli commented on a change in pull request #1559:
URL: https://github.com/apache/zookeeper/pull/1559#discussion_r543399622



##########
File path: zookeeper-server/src/main/java/org/apache/zookeeper/MultiOperationRecord.java
##########
@@ -126,7 +127,10 @@ public void deserialize(InputArchive archive, String tag) throws IOException {
                 case ZooDefs.OpCode.createContainer:
                     CreateRequest cr = new CreateRequest();
                     cr.deserialize(archive, tag);
-                    add(Op.create(cr.getPath(), cr.getData(), cr.getAcl(), cr.getFlags()));
+                    EnumSet<Op.CreateFlags> createFlags = h.getType() == ZooDefs.OpCode.create2
+                        ? EnumSet.of(Op.CreateFlags.WANT_STAT)

Review comment:
       Can we have a constant even for this case? We are going to reduce memory allocations 




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