924060929 commented on code in PR #68238:
URL: https://github.com/apache/doris/pull/68238#discussion_r4056577278
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/paimon/PaimonMetadataOps.java:
##########
@@ -436,14 +436,10 @@ public boolean tableExist(String dbName, String tblName) {
@Override
public boolean databaseExist(String dbName) {
try {
- return executionAuthenticator.execute(() -> {
- try {
- catalog.getDatabase(dbName);
- return true;
- } catch (DatabaseNotExistException e) {
- return false;
- }
- });
+ // CachingCatalog has no public database-cache invalidation API.
listDatabases is
+ // delegated to the underlying catalog, so existence checks after
REFRESH do not
+ // reuse a Database object cached before an external drop or
recreate.
+ return executionAuthenticator.execute(() ->
catalog.listDatabases().contains(dbName));
Review Comment:
Fixed in f750e9710db. databaseExist now recognizes only the exact virtual
system database name `sys`, and compares ordinary listDatabases results
according to catalog.caseSensitive(). Tests cover case-sensitive and
case-insensitive names plus `sys`/`SYS`.
--
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]