You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Provide an API to detect and remove orphaned entity_relationship rows (dangling Data Product edges) #33742
Orphaned entity_relationship rows (see linked bug: ghost Data Products) are undetectable and unremovable through the API. Today the only remediation is DELETE FROM entity_relationship WHERE fromId = '<uuid>' AND fromEntity = 'dataProduct'; run directly against the database -- version-coupled to the schema and unsafe as a routine operation against a production catalog.
Describe the solution you'd like
A supported, API-driven way to detect and reap orphaned relationships without direct DB access:
an integrity/consistency report that lists relationships whose endpoints no longer resolve, and
an admin endpoint or maintenance job to remove them.
Describe alternatives you've considered
Direct SQL DELETE against entity_relationship -- what we do now; rejected as a standing operation because it is schema/version-coupled and bypasses OM's own bookkeeping.
Search reindex -- does not apply; reindex rebuilds the ES projection from the store and does not prune orphaned relational rows (please confirm).
Client-side always-hardDelete=true&recursive=true -- does not help: we confirmed in a lab that the orphan is race-born and hard/recursive is clean only absent the race, so the delete mode is orthogonal. It also gives operators no way to clean up rows that already leaked.
Additional context
Ideally the primary fix is the correctness bug (no orphaned rows in the first place); this enhancement is the fallback for rows that leak via races or partial failures. Link the orphan bug issue here once opened. Related concurrency defect already filed: #33607 (AB-BA lock-order deadlock between two hard-delete paths) -- different mechanism, same entity_relationship neighborhood.
Activity