Skip to content

Skip active-tasks validation in table config validate/tune preflight#19079

Open
shounakmk219 wants to merge 1 commit into
apache:masterfrom
shounakmk219:skip-active-tasks-validation-in-preflight
Open

Skip active-tasks validation in table config validate/tune preflight#19079
shounakmk219 wants to merge 1 commit into
apache:masterfrom
shounakmk219:skip-active-tasks-validation-in-preflight

Conversation

@shounakmk219

Copy link
Copy Markdown
Collaborator

Summary

The table config validate/tune preflight endpoints (validateClusterAwareConfig in TableConfigsRestletResource) previously ran active-tasks validation (PinotTableRestletResource.tableTasksValidation). This blocked the basic validate/tune APIs for a table that already exists and has tasks running — even though those endpoints are read-only pre-flight checks.

Active-tasks validation is a runtime-conflict guard that only matters when a table is being created, updated, or deleted. This PR removes it from the read-only preflight path so validate/tune are no longer blocked by in-flight tasks.

Changes

  • Remove the ACTIVE_TASKS branch from validateClusterAwareConfig (the validate/tune preflight path).
  • Drop ACTIVE_TASKS from the validate/tune @ApiParam documentation.
  • Retain ValidationType.ACTIVE_TASKS as an accepted-but-no-op validationTypesToSkip value for backward compatibility (documented on the enum), so existing clients passing it do not break.
  • Update the now-vacuous ACTIVE_TASKS assertions in TableConfigsRestletResourceTest.

Where active-tasks validation still runs

The check is not lost — it is still enforced on the mutating paths:

  • Create/update: tableTasksValidation, gated by the ignoreActiveTasks query param (TableConfigsRestletResource, PinotDdlRestletResource, PinotTableRestletResource).
  • Delete: tableTasksCleanup.

Backward compatibility

Behavior relaxation on the public /tableConfigs/validate and /tableConfigs/tune endpoints: configs for an existing table with running tasks that previously failed preflight now pass. The ACTIVE_TASKS skip type is still accepted (no-op) so no client request breaks.

Testing

  • spotless, checkstyle, license, and -Xlint compiler checks pass on the touched modules (pinot-controller, pinot-segment-local).
  • Updated the preflight skip-type test to reflect the new behavior.

Note: a dedicated regression test asserting the split (validate/tune accepts an active-task conflict while create rejects it unless ignoreActiveTasks) would require seeding a live minion task and is better suited to an integration test — happy to follow up if reviewers prefer.

The validate/tune preflight endpoints (validateClusterAwareConfig) previously
ran active-tasks validation, which blocked the basic validate/tune APIs for a
table that already exists and has tasks running. Active-tasks validation is a
runtime-conflict guard that only matters when a table is being created,
updated, or deleted, so it is now excluded from the read-only preflight path.

- Remove the ACTIVE_TASKS branch from validateClusterAwareConfig.
- Drop ACTIVE_TASKS from the validate/tune @ApiParam docs.
- Retain ACTIVE_TASKS as an accepted-but-no-op validationTypesToSkip value for
  backward compatibility (documented on the enum).
- Active-tasks validation is still enforced on create/update (tableTasksValidation,
  gated by ignoreActiveTasks) and delete (tableTasksCleanup).
- Update the now-vacuous ACTIVE_TASKS assertions in the preflight test.
@codecov-commenter

codecov-commenter commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.43%. Comparing base (dded09d) to head (a558e28).

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #19079      +/-   ##
============================================
- Coverage     65.45%   65.43%   -0.03%     
  Complexity     1421     1421              
============================================
  Files          3425     3425              
  Lines        216303   216301       -2     
  Branches      34266    34265       -1     
============================================
- Hits         141590   141545      -45     
- Misses        63317    63361      +44     
+ Partials      11396    11395       -1     
Flag Coverage Δ
custom-integration1 100.00% <ø> (ø)
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 0.00% <ø> (ø)
java-25 65.43% <ø> (-0.03%) ⬇️
temurin 65.43% <ø> (-0.03%) ⬇️
unittests 65.43% <ø> (-0.03%) ⬇️
unittests1 56.83% <ø> (+0.01%) ⬆️
unittests2 37.84% <ø> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants