mgao0 commented on code in PR #2219:
URL: https://github.com/apache/helix/pull/2219#discussion_r975824989
##########
zookeeper-api/src/test/java/org/apache/helix/zookeeper/impl/client/TestRawZkClient.java:
##########
@@ -1063,23 +1063,26 @@ public void testAsyncWriteByExpectedSession() throws
Exception {
* Tests getChildren() when there are an excessive number of children and
connection loss happens,
* the operation should terminate and exit retry loop.
*/
- @Test(timeOut = 30 * 1000L)
+ @Test
public void testGetChildrenOnLargeNumChildren() throws Exception {
final String methodName = TestHelper.getTestMethodName();
System.out.println("Start test: " + methodName);
+ String[] nodePaths = new String[110001];
// Create 110K children to make packet length of children exceed 4 MB
// and cause connection loss for getChildren() operation
String path = "/" + methodName;
+ nodePaths[110000] = path;
_zkClient.createPersistent(path);
for (int i = 0; i < 110; i++) {
List<Op> ops = new ArrayList<>(1000);
for (int j = 0; j < 1000; j++) {
String childPath = path + "/" + UUID.randomUUID().toString();
+ nodePaths[1000 * i + j] = childPath;
// Create ephemeral nodes so closing zkClient deletes them for cleanup
ops.add(
- Op.create(childPath, new byte[0], ZooDefs.Ids.OPEN_ACL_UNSAFE,
CreateMode.EPHEMERAL));
+ Op.create(childPath, new byte[0], ZooDefs.Ids.OPEN_ACL_UNSAFE,
CreateMode.PERSISTENT));
}
// Reduce total creation time by batch creating znodes
_zkClient.multi(ops);
Review Comment:
Thanks for your comment!
`ops` is an iterable of `op` (which is a single operation
https://zookeeper.apache.org/doc/r3.5.5/api/org/apache/zookeeper/Op.html).
Transaction support is a zk server side feature so we already have it.
` multi() isn't supported at the moment` this means we don't have the
multi() API in Helix ZKClient.
Please let me know if it makes sense.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]