lasdf1234 opened a new pull request, #15145: URL: https://github.com/apache/gravitino/pull/15145
**Cherry-pick Information:** - Original commit: e259a94d8824755cad3bf839b47a1c8a25d7556a - Target branch: `branch-2.0` - Status: ✅ Clean cherry-pick (no conflicts) - Replaces closed #15128 ### What changes were proposed in this pull request? Cherry-pick of #15100 onto `branch-2.0`. - Replace dual count/size rewrite-manifests trigger with `manifest_count_threshold` (default 100), aligned with Iceberg `commit.manifest.min-count-to-merge`. - Resolve `spec-id` at job runtime and reuse the S0-resolved value in execute (same Spark run); remove schedule-time spec pinning. - Record `custom-manifest-spec-id` / `custom-manifest-partition-spec` only for partitioned specs. - Split compaction vs rewrite-manifests `shouldMaintain` facades; share QL via `TriggerExprEvaluator` under handler. ### Why are the changes needed? Previous 500 / (100 + avg < 8 MiB) rule is not Iceberg's rewrite trigger. TMS also needs stable same-run spec selection and clear trigger APIs for compaction vs manifests. Fixes #15099 ### Does this PR introduce _any_ user-facing change? Yes. Removes `manifest_count_critical` / `manifest_count_warning` / `avg_manifest_size_threshold_bytes`; adds `manifest_count_threshold` (default 100). Avg manifest size remains observability-only. Partitioned tables may also surface the two partition-spec metric keys. ### How was this patch tested? Same as #15100: - `:api:test`, `:common:test` (rewrite-manifests content/DTO) - `:maintenance:optimizer-api:test` (compaction + manifest trigger evaluators) - `:maintenance:jobs:test` (trigger gate + rewrite manifests job / Spark) - `:docs:build` after OpenAPI 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]
