kezhuw commented on code in PR #1978:
URL: https://github.com/apache/zookeeper/pull/1978#discussion_r1110555092
##########
zookeeper-server/src/main/java/org/apache/zookeeper/Op.java:
##########
@@ -152,6 +152,45 @@ public static Op create(String path, byte[] data,
List<ACL> acl, CreateMode crea
return new Create(path, data, acl, createMode);
}
+ /**
+ * Constructs a create operation which uses given op code if no one is
inferred from create mode.
+ *
+ * @param path
+ * the path for the node
+ * @param data
+ * the initial data for the node
+ * @param options
+ * options for creating znode
+ * @param defaultOpCode
+ * op code to be used if no one is inferred from create mode
+ */
+ static Op create(String path, byte[] data, CreateOptions options, int
defaultOpCode) {
+ if (options.getCreateMode().isTTL()) {
Review Comment:
Amend `CreateTTLTest.testMulti` for this.
--
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]