This is an automated email from the ASF dual-hosted git repository.
xiangfu0 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new f818bae6d75 Fix controller job-limit leak and multicluster test port
allocation (#19773)
f818bae6d75 is described below
commit f818bae6d75a91228eb3aac95c921bca4aeb2128
Author: Xiang Fu <[email protected]>
AuthorDate: Wed Oct 7 20:27:46 2026 -0700
Fix controller job-limit leak and multicluster test port allocation (#19773)
ControllerZkHelixUtilsTest resets ControllerJobTypes after each test, so the
expiry tests no longer leak the lowered job limits into RebalanceCheckerTest
when both classes run in one JVM. BaseMultiClusterIntegrationTest allocates
the admin, Netty and gRPC ports after the previously selected port, so two
probes can no longer pick the same free port. GroupByTrimmingTest reports
the
query execution statistics when the trimming assertion fails.
---
.../controller/helix/core/util/ControllerZkHelixUtilsTest.java | 6 ++++++
.../pinot/integration/tests/custom/GroupByTrimmingTest.java | 2 +-
.../tests/multicluster/BaseMultiClusterIntegrationTest.java | 8 +++++---
3 files changed, 12 insertions(+), 4 deletions(-)
diff --git
a/pinot-controller/src/test/java/org/apache/pinot/controller/helix/core/util/ControllerZkHelixUtilsTest.java
b/pinot-controller/src/test/java/org/apache/pinot/controller/helix/core/util/ControllerZkHelixUtilsTest.java
index 79f38e19385..954ff416695 100644
---
a/pinot-controller/src/test/java/org/apache/pinot/controller/helix/core/util/ControllerZkHelixUtilsTest.java
+++
b/pinot-controller/src/test/java/org/apache/pinot/controller/helix/core/util/ControllerZkHelixUtilsTest.java
@@ -27,6 +27,7 @@ import
org.apache.pinot.controller.helix.core.controllerjob.ControllerJobTypes;
import org.apache.pinot.controller.helix.core.rebalance.RebalanceJobConstants;
import org.apache.pinot.spi.utils.CommonConstants;
import org.apache.pinot.spi.utils.JsonUtils;
+import org.testng.annotations.AfterMethod;
import org.testng.annotations.Test;
import static org.mockito.Mockito.mock;
@@ -36,6 +37,11 @@ import static org.testng.Assert.assertEquals;
public class ControllerZkHelixUtilsTest {
+ @AfterMethod(alwaysRun = true)
+ public void resetControllerJobTypes() {
+ ControllerJobTypes.init(new ControllerConf());
+ }
+
@Test
public void testControllerJobZkMetadataExpiryWithInProgressJobs()
throws Exception {
diff --git
a/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/custom/GroupByTrimmingTest.java
b/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/custom/GroupByTrimmingTest.java
index a7dd429bfdc..e836c6f86bd 100644
---
a/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/custom/GroupByTrimmingTest.java
+++
b/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/custom/GroupByTrimmingTest.java
@@ -275,7 +275,7 @@ public class GroupByTrimmingTest extends
CustomDataQueryClusterIntegrationTest {
+ "98,\t998,\t4\n"
+ "97,\t997,\t4\n"
+ "96,\t996,\t4\n"
- + "95,\t995,\t4");
+ + "95,\t995,\t4", result.getExecutionStats().toString());
assertEquals(toExplainStr(postQuery(options + "SET
explainAskingServers=true; EXPLAIN PLAN FOR " + query), true),
"Execution Plan\n"
diff --git
a/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/multicluster/BaseMultiClusterIntegrationTest.java
b/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/multicluster/BaseMultiClusterIntegrationTest.java
index 5d51a6f8983..24e31197d84 100644
---
a/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/multicluster/BaseMultiClusterIntegrationTest.java
+++
b/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/multicluster/BaseMultiClusterIntegrationTest.java
@@ -257,9 +257,11 @@ public abstract class BaseMultiClusterIntegrationTest
extends ClusterTest {
serverConfig.setProperty(Server.CONFIG_OF_INSTANCE_SEGMENT_TAR_DIR,
cluster._tempDir + "/segmentTar");
serverConfig.setProperty(Server.CONFIG_OF_SEGMENT_FORMAT_VERSION, "v3");
serverConfig.setProperty(Server.CONFIG_OF_SHUTDOWN_ENABLE_QUERY_CHECK,
false);
- serverConfig.setProperty(Server.CONFIG_OF_ADMIN_API_PORT,
findAvailablePort(cluster._serverPort));
- serverConfig.setProperty(Helix.KEY_OF_SERVER_NETTY_PORT,
findAvailablePort(cluster._serverPort + 1));
- serverConfig.setProperty(Server.CONFIG_OF_GRPC_PORT,
findAvailablePort(cluster._serverPort + 2));
+ int adminPort = findAvailablePort(cluster._serverPort);
+ int nettyPort = findAvailablePort(adminPort + 1);
+ serverConfig.setProperty(Server.CONFIG_OF_ADMIN_API_PORT, adminPort);
+ serverConfig.setProperty(Helix.KEY_OF_SERVER_NETTY_PORT, nettyPort);
+ serverConfig.setProperty(Server.CONFIG_OF_GRPC_PORT,
findAvailablePort(nettyPort + 1));
serverConfig.setProperty(Server.CONFIG_OF_ENABLE_THREAD_CPU_TIME_MEASUREMENT,
true);
serverConfig.setProperty(CommonConstants.CONFIG_OF_TIMEZONE, "UTC");
serverConfig.setProperty(Helix.CONFIG_OF_MULTI_STAGE_ENGINE_ENABLED, true);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]