lasdf1234 opened a new pull request, #15100:
URL: https://github.com/apache/gravitino/pull/15100

   ### What changes were proposed in this pull request?
   
   - Replace flat TMS maintenance jobConf with a unified `tasks[]` payload 
(per-task `params` / `rules`); cron and commit submit via `jobConfForSpec`.
   - Snapshot-expiry batch: one `submitAndBind` / one Spark job over all 
claimed tables (per-task expire args preserved).
   - Apply soft-slot `action_id` on the schedule spec before jobConf; assert 
`tasks[]` size matches claims.
   - Replace dual count/size manifest-rewrite trigger with 
`manifest_count_threshold` (default 100), matching Iceberg 
`commit.manifest.min-count-to-merge`; update API/DTO/OpenAPI/docs/Python client.
   - Add `MaintenanceActionManager#canStart(tableId, policyId)` that checks 
soft-slot availability only (no `minIntervalMs` cooldown); keep the existing 
four-argument overload for cooldown-aware paths.
   
   ### Why are the changes needed?
   
   Flat first-wins merging loses distinct procedure params for chained/batched 
jobs, and expire batch incorrectly fans out one Spark job per table. The 
previous manifest rewrite thresholds are not Iceberg's rewrite trigger. Callers 
also need a soft-slot availability check that does not apply cooldown.
   
   Fixes #15099
   
   ### Does this PR introduce _any_ user-facing change?
   
   - Yes: `builtin-iceberg-maintenance-task` jobConf now requires `tasks` JSON 
(automated TMS paths updated).
   - Yes: policy fields `manifest_count_critical`, `manifest_count_warning`, 
and `avg_manifest_size_threshold_bytes` are removed; replaced by 
`manifest_count_threshold` (default 100).
   
   ### How was this patch tested?
   
   - Focused unit tests under `:maintenance:jobs`, `:plugins:maintenance`, 
`:api`, `:common`, `:maintenance:optimizer` (tasks/spec/gate/manifest rewrite / 
`TestMaintenanceActionManager` coverage)
   - `./gradlew :docs:build` after OpenAPI policy changes
   
   Made with [Cursor](https://cursor.com)


-- 
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]

Reply via email to