github-actions[bot] commented on code in PR #63068:
URL: https://github.com/apache/doris/pull/63068#discussion_r3321903355


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/IcebergExternalCatalog.java:
##########
@@ -133,6 +136,36 @@ protected void initLocalObjectsImpl() {
         metadataOps = ops;
     }
 
+    @Override
+    protected List<String> listDatabaseNames() {
+        if (isIcebergRestUserSessionPropertyEnabled()) {

Review Comment:
   This session-aware database listing is also used while `ExternalCatalog` 
builds its shared database `metaCache`: `makeSureInitialized()` -> 
`buildMetaCache()` -> `getFilteredDatabaseNames()` -> `listDatabaseNames()`. 
Because this override reads `currentSessionContext()`, whichever delegated user 
first initializes or refreshes the catalog can populate the global database 
cache with only that user's namespaces. Later users still resolve databases 
through `ExternalCatalog.getDbNullable()` from that shared cache, so they can 
miss databases they are authorized for, or see database existence from another 
user's authorization. This is a separate cache level from the table-name cache 
already discussed; for Iceberg REST user-session, database-name/object lookup 
also needs to bypass/isolate the shared catalog database cache, or catalog 
initialization should always use `SessionContext.empty()` and request-time 
database lookup should be session-aware.



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