adutra commented on code in PR #889: URL: https://github.com/apache/polaris/pull/889#discussion_r1931917661
########## polaris-core/src/main/java/org/apache/polaris/core/persistence/LocalPolarisMetaStoreManagerFactory.java: ########## @@ -96,37 +97,40 @@ private void initializeForRealm( } @Override - public synchronized Map<String, PrincipalSecretsResult> bootstrapRealms( - List<String> realms, PolarisCredentialsBootstrap credentialsBootstrap) { - Map<String, PrincipalSecretsResult> results = new HashMap<>(); - - for (String realm : realms) { - RealmId realmId = RealmId.newRealmId(realm); - if (!metaStoreManagerMap.containsKey(realmId.id())) { - initializeForRealm(realmId, credentialsBootstrap); + public synchronized Map<RealmId, PrincipalSecretsResult> bootstrapRealms( + List<RealmId> realms, PolarisCredentialsBootstrap credentialsBootstrap) { + Map<RealmId, PrincipalSecretsResult> results = new HashMap<>(); + + for (RealmId realm : realms) { + if (!metaStoreManagerMap.containsKey(realm.id())) { + initializeForRealm(realm, credentialsBootstrap); PrincipalSecretsResult secretsResult = bootstrapServiceAndCreatePolarisPrincipalForRealm( - realmId, metaStoreManagerMap.get(realmId.id())); - results.put(realmId.id(), secretsResult); + realm, metaStoreManagerMap.get(realm.id())); + results.put(ImmutableRealmId.copyOf(realm), secretsResult); Review Comment: Unfortunately the `bootstrapRealms` method can be called both from a bootstrap command (in which case `RealmId` is not a CDI proxy) and from "regular" server code (in which case it is a proxy). (The "regular" path only happens with the in-memory metastore though.) -- 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