lasdf1234 opened a new pull request, #14357: URL: https://github.com/apache/gravitino/pull/14357
### What changes were proposed in this pull request? Change TMS metrics linkage so S0 and S1 can share the same Iceberg snapshot: - Rename `table_snapshot_metrics.id` → `metrics_id` - Drop unique `(table_id, policy_id, snapshot_id)`; keep a non-unique index - Replace action `before_snapshot_id` / `after_snapshot_id` with `before_metrics_id` / `after_metrics_id` - Put action `created_at` as the second-to-last column (`..., created_at, finished_at`) - Insert metrics first (return `metrics_id`), then point the action row at that id - Finish closes the soft slot only; Iceberg snapshot stays on the metrics row - Drift / continue decisions remain in the Spark job ### Why are the changes needed? `table_snapshot_metrics` was keyed by `(table_id, policy_id, snapshot_id)`. When before and after samples share one Iceberg snapshot, the second metrics write was treated as a no-op and S1 metrics were lost. ### Does this PR introduce _any_ user-facing change? - Finish request no longer accepts `afterSnapshotId` (snapshot lives on the metrics row). - Schema column renames for TMS tables (not yet released on Apache main). ### How was this patch tested? - `TestTableSnapshotMetricsMetaService` - `TestTableMaintenanceActionMetaService` - `TestTableMaintenanceInJobSampler` - `TestTableMaintenanceActionOperations` - `TestMaintenanceActionHttpClient` 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]
