yuqi1129 opened a new pull request, #12160:
URL: https://github.com/apache/gravitino/pull/12160

   ### What changes were proposed in this pull request?\n\nAdd a garbage 
collection pass to soft-delete metadata object relation rows whose referenced 
entity no longer has a live record.\n\nThe cleanup:\n\n- covers owner, tag, 
policy, statistic, and role securable-object relations;\n- iterates over 
supported metadata object types;\n- processes orphaned object IDs in bounded 
batches;\n- runs on the existing relational garbage collector schedule;\n- 
remains idempotent.\n\n### Why are the changes needed?\n\nMetadata object 
relation tables reference entities using plain object ID and type columns 
without foreign keys. If an entity row is lost outside the normal transactional 
deletion path, its relation rows remain orphaned indefinitely.\n\nThis change 
provides background cleanup for those orphaned rows while leaving relations 
belonging to live entities untouched.\n\nFix: #12154\n\n### Does this PR 
introduce _any_ user-facing change?\n\nNo. This change only adds background 
cleanup for orp
 haned relational-store data.\n\n### How was this patch tested?\n\nAdded tests 
covering:\n\n- cleanup of orphaned owner, tag, policy, statistic, and 
securable-object relations;\n- preservation of relations referencing live 
entities;\n- idempotent repeated cleanup;\n- repeated batch execution by the 
relational garbage collector.\n\nRan:\n\n


-- 
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]

Reply via email to