You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/04/15 00:24:29 UTC

[GitHub] [pinot] jackjlli commented on a diff in pull request #8506: Upgrade helix to 0.9.10

jackjlli commented on code in PR #8506:
URL: https://github.com/apache/pinot/pull/8506#discussion_r850920845


##########
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/HelixZNodeSizeLimitTest.java:
##########
@@ -0,0 +1,91 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.pinot.integration.tests;
+
+import com.google.common.collect.ImmutableMap;
+import java.util.Map;
+import org.apache.helix.SystemPropertyKeys;
+import org.apache.pinot.common.utils.helix.HelixHelper;
+import org.apache.pinot.util.TestUtils;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+
+/**
+ * This test is created to show the bug in Helix 0.9.8 that if a ZooKeeper IdealState is larger than 1MB after
+ * compression, it cannot be updated anymore. Somehow this test can also make sure in future we will support
+ * large IdealStates
+ */
+public class HelixZNodeSizeLimitTest extends BaseClusterIntegrationTest {
+  @BeforeClass
+  public void setUp()
+      throws Exception {
+    // This line of code has to be executed before the org.apache.helix.manager.zk.zookeeper.ZkClient.WRITE_SIZE_LIMIT
+    // is initialized. The code is in
+    // https://github.com/apache/helix/blob/helix-0.9.9/helix-core/src/main/java/org/
+    // apache/helix/manager/zk/zookeeper/ZkClient.java#L89
+    // Not sure how this works but this below line executes before ZkClient.WRITE_SIZE_LIMIT is created
+    System.setProperty(SystemPropertyKeys.JUTE_MAXBUFFER, "4000000");
+    TestUtils.ensureDirectoriesExistAndEmpty(_tempDir);
+
+    // Start Zookeeper
+    startZk();
+    startController();
+    startBroker();
+    startServer();
+    addSchema(createSchema());
+    addTableConfig(createOfflineTableConfig());
+  }
+
+  @AfterClass(alwaysRun = true)
+  public void tearDown()
+      throws Exception {
+    stopServer();
+    stopBroker();
+    stopController();
+    stopZk();
+  }
+
+  @Test
+  public void testUpdateIdealState() {
+    // In Helix 0.9.8, we get error logs like below:
+    // 13:03:51.576 ERROR [ZkBaseDataAccessor] [main] Exception while setting path:
+    // /HelixZNodeSizeLimitTest/IDEALSTATES/mytable_OFFLINE
+    //  org.apache.helix.HelixException: Data size larger than 1M
+    //  at org.apache.helix.manager.zk.zookeeper.ZkClient.checkDataSizeLimit(ZkClient.java:1513) ~[helix-core-0.9.8
+    //  .jar:0.9.8]
+    //  at org.apache.helix.manager.zk.zookeeper.ZkClient.writeDataReturnStat(ZkClient.java:1406) ~[helix-core-0.9.8
+    //  .jar:0.9.8]
+    String tableNameWithType = getTableName() + "_OFFLINE";
+    System.setProperty(SystemPropertyKeys.ZK_SERIALIZER_ZNRECORD_WRITE_SIZE_LIMIT_BYTES, "4000000");
+    // The updated IdealState after compression is roughly 2MB
+    HelixHelper.updateIdealState(_helixManager, tableNameWithType, idealState -> {

Review Comment:
   Thanks for making the changes here! I've verified that the new code is also included in Helix 1.0+ release. Once Helix 1.0+ is merged (which will happen pretty soon), I don't think we need this PR any more. Why is it so urgent to merge? If it's not so urgent, I'd suggest waiting for the Helix 1.0+. Otherwise, it will still need some time and effort to validate this 0.9.10 release.



-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org