lasdf1234 opened a new issue, #13488: URL: https://github.com/apache/gravitino/issues/13488
### Describe the feature Add a Table Maintenance Service (TMS) as an **in-process main-server plugin** (port **8090**, `gravitino.server.rest.extensionPackages`), colocated with Iceberg REST in the same JVM. **Dual trigger (option B):** - **Commit path:** IRC post-commit events via `EventListenerPlugin` drive **compaction only**. - **Scheduler path:** every node runs `MaintenanceScheduler` (`selectDueWork` + per-row CAS); **all four** policy types run on `next_due_at` / crontab schedule. **Coordination:** shared `table_maintenance_state` with `heartbeat_at` reclaim (same pattern as `iceberg_cleanup_job`); no maintenance leader. Above-table attachments use periodic discovery (INSERT/UPDATE/DELETE state rows), separate from `selectDueWork`. ### Motivation Optimizer execution already exists under `maintenance/optimizer`, but there is no server-side path that reacts to Iceberg commits or schedules maintenance inside Gravitino. Operators must drive work from local CLI or external clocks. This feature records the agreed design before implementation: dual trigger, EventListener-based IRC hooks, per-policy claim + heartbeat, discovery for above-table scope, and reuse of the existing job framework. Related discussion: #11851 (separate long-running Optimizer Service). This design does **not** introduce that standalone service. ### Describe the solution Documented in `design-docs/table-maintenance-service-design.md` (PR #13386): - In-process plugin + colocated IRC - `EventListenerPlugin` for commit + table lifecycle hooks - `MaintenanceScheduler` with due-row claim (`heartbeat_at`) - Four built-in policy types; nearest-wins; Track A soft order; orphan as Track B - Config: enablement keys, eventListener class FQCNs, per-type `minIntervalMs` ### Additional context Design-doc-only until implementation PRs land. -- 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]
