This is an automated email from the ASF dual-hosted git repository.
Jackie-Jiang 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 a3fedd7bb8a Skip active-tasks validation in table config validate/tune
preflight (#19079)
a3fedd7bb8a is described below
commit a3fedd7bb8aeeb0fb1a2ba2ba699f8c6502b9543
Author: Shounak kulkarni <[email protected]>
AuthorDate: Fri Jul 24 22:18:00 2026 +0530
Skip active-tasks validation in table config validate/tune preflight
(#19079)
---
.../api/resources/TableConfigsRestletResource.java | 13 ++++++-------
.../controller/api/TableConfigsRestletResourceTest.java | 6 ++++--
.../apache/pinot/segment/local/utils/TableConfigUtils.java | 4 ++++
3 files changed, 14 insertions(+), 9 deletions(-)
diff --git
a/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/TableConfigsRestletResource.java
b/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/TableConfigsRestletResource.java
index 8a0f60ddf48..17e7dab0471 100644
---
a/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/TableConfigsRestletResource.java
+++
b/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/TableConfigsRestletResource.java
@@ -455,7 +455,7 @@ public class TableConfigsRestletResource {
@ManualAuthorization // performed after parsing TableConfigs
public String validateConfig(String tableConfigsStr,
@ApiParam(value = "comma separated list of validation type(s) to skip.
supported types: "
- + "(ALL|TASK|UPSERT|TENANT|MINION_INSTANCES|ACTIVE_TASKS)")
+ + "(ALL|TASK|UPSERT|TENANT|MINION_INSTANCES)")
@QueryParam("validationTypesToSkip") @Nullable String typesToSkip,
@Context HttpHeaders httpHeaders,
@Context Request request) {
Pair<TableConfigs, Map<String, Object>> tableConfigsAndUnrecognizedProps =
@@ -479,7 +479,7 @@ public class TableConfigsRestletResource {
@ManualAuthorization // performed after parsing TableConfigs
public String tuneConfig(String tableConfigsStr,
@ApiParam(value = "comma separated list of validation type(s) to skip.
supported types: "
- + "(ALL|TASK|UPSERT|TENANT|MINION_INSTANCES|ACTIVE_TASKS)")
+ + "(ALL|TASK|UPSERT|TENANT|MINION_INSTANCES)")
@QueryParam("validationTypesToSkip") @Nullable String typesToSkip,
@Context HttpHeaders httpHeaders,
@Context Request request) {
Pair<TableConfigs, Map<String, Object>> tableConfigsAndUnrecognizedProps =
@@ -515,8 +515,10 @@ public class TableConfigsRestletResource {
tableConfigs.setTableName(rawTableName);
// Cluster-aware validations are exclusive to the validate/tune pre-flight
endpoints so that users get fail-fast
- // feedback on tenant/minion/active-task issues without re-running them in
the create/update paths (which already
- // perform the equivalent checks inline or via PinotHelixResourceManager).
+ // feedback on tenant/minion issues without re-running them in the
create/update paths (which already perform the
+ // equivalent checks inline or via PinotHelixResourceManager). Active-task
validation is intentionally excluded
+ // here: it applies only on the create/update path (gated by the
ignoreActiveTasks flag) so that validate/tune of an
+ // existing table with running tasks is not blocked.
Set<TableConfigUtils.ValidationType> skipTypes =
TableConfigUtils.parseTypesToSkipString(typesToSkip);
try {
if (tableConfigs.getOffline() != null) {
@@ -553,9 +555,6 @@ public class TableConfigsRestletResource {
if (!skipTypes.contains(TableConfigUtils.ValidationType.MINION_INSTANCES))
{
_pinotHelixResourceManager.validateTableTaskMinionInstanceTagConfig(tableConfig);
}
- if (!skipTypes.contains(TableConfigUtils.ValidationType.ACTIVE_TASKS)) {
- PinotTableRestletResource.tableTasksValidation(tableConfig,
_pinotHelixTaskResourceManager);
- }
}
private void applyTuning(TableConfig tableConfig, Schema schema) {
diff --git
a/pinot-controller/src/test/java/org/apache/pinot/controller/api/TableConfigsRestletResourceTest.java
b/pinot-controller/src/test/java/org/apache/pinot/controller/api/TableConfigsRestletResourceTest.java
index dfa66708742..b7d6268ba56 100644
---
a/pinot-controller/src/test/java/org/apache/pinot/controller/api/TableConfigsRestletResourceTest.java
+++
b/pinot-controller/src/test/java/org/apache/pinot/controller/api/TableConfigsRestletResourceTest.java
@@ -797,14 +797,16 @@ public class TableConfigsRestletResourceTest extends
ControllerTest {
adminClient.getTableClient().validateTableConfigs(tableConfigs.toPrettyJsonString(),
"MINION_INSTANCES");
Assert.assertNotNull(responseWithMinionSkip);
- // Test validation with ACTIVE_TASKS skip type - should pass even with
potential task conflicts
+ // ACTIVE_TASKS is still accepted as a skip type for backward
compatibility, but the validate/tune preflight
+ // endpoints no longer run active-task validation (it applies only on the
create/update path), so passing it is a
+ // no-op here.
String responseWithTasksSkip =
adminClient.getTableClient().validateTableConfigs(tableConfigs.toPrettyJsonString(),
"ACTIVE_TASKS");
Assert.assertNotNull(responseWithTasksSkip);
// Test validation with multiple skip types
String responseWithMultipleSkips = adminClient.getTableClient()
- .validateTableConfigs(tableConfigs.toPrettyJsonString(),
"TENANT,MINION_INSTANCES,ACTIVE_TASKS");
+ .validateTableConfigs(tableConfigs.toPrettyJsonString(),
"TENANT,MINION_INSTANCES");
Assert.assertNotNull(responseWithMultipleSkips);
// Test validation with ALL skip type - should skip all validations
diff --git
a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/TableConfigUtils.java
b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/TableConfigUtils.java
index 5dd51a79e31..0c5fd6bf283 100644
---
a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/TableConfigUtils.java
+++
b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/TableConfigUtils.java
@@ -2067,6 +2067,10 @@ public final class TableConfigUtils {
}
// enum of all the skip-able validation types.
+ // ACTIVE_TASKS is retained for backward compatibility: it is still accepted
as a validationTypesToSkip value so
+ // existing clients do not break, but it is no longer consumed by any
production path. Active-task validation runs
+ // only on the create/update path (see
PinotTableRestletResource.tableTasksValidation, gated by ignoreActiveTasks),
+ // not on the validate/tune preflight endpoints, so passing ACTIVE_TASKS
there is a no-op.
public enum ValidationType {
ALL, TASK, UPSERT, TENANT, MINION_INSTANCES, ACTIVE_TASKS
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]