924060929 opened a new pull request, #68238:
URL: https://github.com/apache/doris/pull/68238

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Problem Summary:
   
   When Doris shares a Paimon catalog with another engine, the other engine can 
drop a table while both the Paimon SDK `CachingCatalog` and Doris FE still 
retain that table's metadata. A subsequent `CREATE TABLE` in Doris then fails 
with `Table already exists`, even though the remote catalog no longer contains 
the table.
   
   This PR keeps the existing branch-4.1 catalog architecture and fixes only 
the affected DDL path. Before checking whether a Paimon table can be created, 
Doris now invalidates the target Paimon SDK cache entry. Once the fresh remote 
check confirms the table is absent, Doris also invalidates the corresponding FE 
table object and reloads the table-name cache before applying the existing 
case-insensitive conflict check.
   
   The new unit test uses two catalogs backed by the same filesystem warehouse: 
Doris loads the table into both cache layers, a second uncached catalog drops 
it, and Doris successfully recreates it.
   
   ### Release note
   
   Fix `CREATE TABLE` returning `Table already exists` after another engine 
deletes the same Paimon table from a shared catalog.
   
   ### Check List (For Author)
   
   - Test: Unit Test
       - `PaimonMetadataOpsTest`: 19 tests passed
       - Focused external-drop-and-recreate test passed again after rebasing 
onto the latest `branch-4.1`
       - FE Checkstyle passed with 0 violations
   - Behavior changed: Yes. Paimon `CREATE TABLE` refreshes the target table's 
SDK and FE metadata caches before checking existence.
   - Does this need documentation: No
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to