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

   ### What changes were proposed in this pull request?
   
   At policy-expand enqueue time, coalesce unpicked same-catalog 
`expire_snapshots` cron rows (`table:` / `batch:`) in `scheduled_cron_tasks`:
   
   - Same catalog only (avoid multi-catalog credentials in one Spark session)
   - Snapshot-expiry only; policy id need not match
   - Absorb a peer only when it is not already at capacity and the combined 
size would not exceed capacity (all-or-nothing)
   - Never cancel/merge picked rows
   - Cron pick still only submits Spark (no execute-time merge)
   
   ### Why are the changes needed?
   
   Snapshot expiry can enqueue many single-table or incomplete batch cron rows. 
Coalescing at expand (db-scheduler `reschedule` / `cancel`) packs work under 
batch capacity without execute-time work-stealing.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No API or config key changes. Behavior: more snapshot-expiry tables may 
share one cron-job row when coalesce rules match.
   
   ### How was this patch tested?
   
   - `./gradlew :plugins:maintenance:test --tests 
'org.apache.gravitino.maintenance.scheduler.job.cron.TestCronJobScheduler' 
--tests 
'org.apache.gravitino.maintenance.scheduler.policy.expand.TestPolicyExpandSnapshotEnqueue'
 --tests 
'org.apache.gravitino.maintenance.scheduler.policy.expand.TestPolicyExpandPipeline'
 -PskipITs -PskipDockerTests=true`
   
   
   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