yuqi1129 opened a new pull request, #14508: URL: https://github.com/apache/gravitino/pull/14508
### What changes were proposed in this pull request? For an external table with no registration, skip the discarded source read during preflight. Import its schema first, then read and register the table while holding that table's WRITE lock, allowing sibling tables to proceed. Preserve the managed-table path and convert a missing schema to the table entry point's NoSuchTableException with its cause. ### Why are the changes needed? Cold native table loads read source metadata twice and hold a schema-wide import lock across a slow connector call. Fixes #14499 ### Does this PR introduce _any_ user-facing change? Cold unregistered external tables need one source table read and do not block sibling table operations during that read. Same-table operations and ancestor drop/rename remain excluded by the local tree lock; the existing entity-store/HA conflict handling is unchanged. Accepted costs and limits: warm external loads gain one registration lookup (two in total), and managed loads gain a preflight registration lookup. This can add store/cache latency. A missing-table request can import its existing schema before confirming the table is absent. Initial schema import still has its own catalog lock, and repairing an already-stale registration may still read the source twice. This does not add a cross-node/source atomic snapshot guarantee. ### How was this patch tested? - Complete core unit and H2 lanes passed; all 48 TableOperationDispatcher tests passed again after the final test refinements. - Added real dispatcher tests for missing-schema signals, managed bypass, one cold source read, warm identity/lookup counts, independent sibling writes and slow cold/warm sibling loads. - A same-table READ-lock regression now reaches the import WRITE phase. Mutating only that WRITE to READ makes the test fail because the operation no longer waits; the restored dispatcher suite passes. - Spotless, RAT and fresh-context review passed. No live external catalog or new multi-node harness was run. -- 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]
