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

   ### What changes were proposed in this pull request?
   
   - Add one schema-scoped transaction entry point that acquires the parent 
schema lock and runs child writes in the same transaction.
   - Migrate table, view, fileset, function, model, model-version, and topic 
insert/update paths to that entry point.
   - Replace six complete child metadata loads in the non-cascade schema 
emptiness check with one lightweight existence query that stops after the first 
active child.
   - Preserve missing-schema errors when the fence rejects view or fileset 
updates.
   - Cover all six direct child types through real service create/update paths 
and the existence query.
   
   This is a follow-up stacked on #12456. Until #12456 merges, GitHub also 
shows its commits in this draft; the #12576 follow-up itself is commit 
10a17fe39e and changes 871 lines.
   
   ### Why are the changes needed?
   
   The previous implementation held the schema delete fence correctly, but 
every schema-scoped service had to assemble the lock and transaction manually. 
That made future omissions easy. Non-cascade deletion also materialized 
complete child objects and version information when it only needed a yes/no 
answer, extending the time spent under the schema delete lock.
   
   Fix: #12576
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   - Full TestSchemaMetaService on H2.
   - Full table, view, fileset, function, model, model-version, and topic 
service suites on H2.
   - Schema child create/update fencing, all six existence-query branches, and 
table/function/model-version race tests on H2, MySQL, and PostgreSQL.
   - ./gradlew :core:spotlessApply and git diff --check.


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