LuciferYang opened a new pull request, #10259: URL: https://github.com/apache/paimon/pull/10259
### Purpose `CachingCatalog.dropDatabase` with cascade invalidated only the table cache entries it found through `tableCache.asMap().keySet()`, and never touched the partition cache. It also missed tables whose table cache entry had already expired while their partition cache entry was still live. With the partition cache enabled, a same-name table recreated within the cache TTL was served the dropped database's partitions, since the partition cache is keyed only by `Identifier`. This enumerates the database's tables with `listTables` before the drop and routes each through `invalidateTable`, which clears the table cache, the partition cache, and the branch entries. Enumeration happens before `super.dropDatabase` because the tables are gone from the wrapped catalog afterwards. Cascade `dropDatabase` now invalidates caches the same way a direct `dropTable` does. This closes #10257. ### Tests Adds `CachingCatalogTest.testDropDatabaseCascadeInvalidatesPartitionCache`: it caches a partition for `db.tbl`, drops the database with cascade, and asserts the next `listPartitions` reloads from the wrapped catalog instead of returning the stale entry. The test does not pre-populate the table cache, so it also pins the case where the old table-cache key-set enumeration would have missed the entry. ### API and Format No. ### 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]
