sfc-gh-emaynard commented on code in PR #1356: URL: https://github.com/apache/polaris/pull/1356#discussion_r2076585772
########## extension/persistence/relational-jdbc/src/main/java/org/apache/polaris/extension/persistence/relational/jdbc/JdbcMetaStoreManagerFactory.java: ########## @@ -197,21 +197,23 @@ public synchronized Supplier<BasePersistence> getOrCreateSessionSupplier( @Override public synchronized StorageCredentialCache getOrCreateStorageCredentialCache( - RealmContext realmContext) { + RealmContext realmContext, PolarisCallContext polarisCallContext) { if (!storageCredentialCacheMap.containsKey(realmContext.getRealmIdentifier())) { storageCredentialCacheMap.put( - realmContext.getRealmIdentifier(), new StorageCredentialCache()); + realmContext.getRealmIdentifier(), new StorageCredentialCache(polarisCallContext)); Review Comment: > Can we be sure that PolarisCallContext inside the StorageCredentialCache is still relevant when it is obtained from the map later No, which is exactly the problem currently. Currently we just grab something from the ThreadLocal, which is never set. ########## extension/persistence/relational-jdbc/src/main/java/org/apache/polaris/extension/persistence/relational/jdbc/JdbcMetaStoreManagerFactory.java: ########## @@ -197,21 +197,23 @@ public synchronized Supplier<BasePersistence> getOrCreateSessionSupplier( @Override public synchronized StorageCredentialCache getOrCreateStorageCredentialCache( - RealmContext realmContext) { + RealmContext realmContext, PolarisCallContext polarisCallContext) { if (!storageCredentialCacheMap.containsKey(realmContext.getRealmIdentifier())) { storageCredentialCacheMap.put( - realmContext.getRealmIdentifier(), new StorageCredentialCache()); + realmContext.getRealmIdentifier(), new StorageCredentialCache(polarisCallContext)); Review Comment: > Can we be sure that PolarisCallContext inside the StorageCredentialCache is still relevant when it is obtained from the map later No, which is exactly the problem currently. Currently we just grab something from the ThreadLocal, which is never set. -- 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: issues-unsubscr...@polaris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org