Skip to content

Commit

Permalink
[fix](catalog) fix wrong check when using "use_meta_cache=true" (#36533)
Browse files Browse the repository at this point in the history
  • Loading branch information
morningman authored Jun 19, 2024
1 parent 8d5b621 commit c1f15f7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -726,9 +726,9 @@ public void registerExternalDatabase(String dbName, String catalogName, boolean
HMSExternalCatalog hmsCatalog = (HMSExternalCatalog) catalog;
long dbId;
if (hmsCatalog.getUseMetaCache().get()) {
dbId = Env.getCurrentEnv().getExternalMetaIdMgr().getDbId(catalog.getId(), dbName);
} else {
dbId = Util.genTableIdByName(dbName);
} else {
dbId = Env.getCurrentEnv().getExternalMetaIdMgr().getDbId(catalog.getId(), dbName);
}
// -1L means it will be dropped later, ignore
if (dbId == ExternalMetaIdMgr.META_ID_FOR_NOT_EXISTS) {
Expand Down

0 comments on commit c1f15f7

Please sign in to comment.