[Subtask] Define consistency guarantees for relations racing with metadata-object deletion
- Dominant language
- Java
- Stars
- 3.2k
- Forks
- 935
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 298
Description
### Describe the subtask
Generic Owner, Tag, Policy, statistic, and privilege relations reference metadata objects. Source inspection identifies target-side race windows; a controlled Owner/Catalog reproduction confirms a late assignment after target deletion. Existing #12154 GC successfully repairs that target-side orphan on H2, MySQL, and PostgreSQL. This must not be described as lacking recovery.
Determine whether these operations require synchronous endpoint integrity or intentionally permit eventual GC repair. Review supported object-type combinations, public reads, caller-visible outcomes, and the existing recovery contract. Reproduce relevant Tag/Policy/privilege paths before prescribing changes.
Deliverables:
- A documented consistency decision and tests demonstrating its guarantees and limits.
- If synchronous fencing is required, a reviewed lock order compatible with hierarchy cascades and existing Tag-to-Policy locks, followed by narrowly scoped implementation tasks.
- If GC recovery is sufficient, document and test recovery rather than adding broad locks.
Policy-Tag endpoint locking already exists; do not duplicate #12679.
### Parent issue
https://github.com/apache/gravitino/issues/10238
Contributor guide
Research direction
Review the parent issue #10238, existing GC recovery in #12154, and the Policy-Tag locking work in #12679. Reproduce the Owner/Catalog case and relevant Tag, Policy, and privilege paths across the supported object combinations, then compare public reads and caller-visible outcomes. Done means a documented consistency decision with tests showing its guarantees and limits, plus narrowly scoped implementation tasks only if GC recovery is insufficient.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, databases
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100