File tree Expand file tree Collapse file tree 5 files changed +13
-13
lines changed
persistence/relational-jdbc/src/main/java/org/apache/polaris/persistence/relational/jdbc
polaris-core/src/main/java/org/apache/polaris/core/persistence
main/java/org/apache/polaris/service/config
testFixtures/java/org/apache/polaris/service Expand file tree Collapse file tree 5 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -220,11 +220,13 @@ protected synchronized BasePersistence createPersistenceSession(RealmContext rea
220220 }
221221
222222 @ Override
223- public synchronized EntityCache getOrCreateEntityCache (
224- RealmContext realmContext , RealmConfig realmConfig ) {
223+ public synchronized EntityCache getOrCreateEntityCache (RealmContext realmContext ) {
225224 return entityCacheMap .computeIfAbsent (
226225 realmContext .getRealmIdentifier (),
227- realmId -> new InMemoryEntityCache (diagnostics , realmConfig ));
226+ realmId -> {
227+ RealmConfig realmConfig = new RealmConfigImpl (configurationStore , realmContext );
228+ return new InMemoryEntityCache (diagnostics , realmConfig );
229+ });
228230 }
229231
230232 /**
Original file line number Diff line number Diff line change @@ -164,11 +164,13 @@ protected synchronized TransactionalPersistence createPersistenceSession(
164164 }
165165
166166 @ Override
167- public synchronized EntityCache getOrCreateEntityCache (
168- RealmContext realmContext , RealmConfig realmConfig ) {
167+ public synchronized EntityCache getOrCreateEntityCache (RealmContext realmContext ) {
169168 return entityCacheMap .computeIfAbsent (
170169 realmContext .getRealmIdentifier (),
171- realmId -> new InMemoryEntityCache (diagnostics , realmConfig ));
170+ realmId -> {
171+ RealmConfig realmConfig = new RealmConfigImpl (configurationStore , realmContext );
172+ return new InMemoryEntityCache (diagnostics , realmConfig );
173+ });
172174 }
173175
174176 /**
Original file line number Diff line number Diff line change 1919package org .apache .polaris .core .persistence ;
2020
2121import java .util .Map ;
22- import org .apache .polaris .core .config .RealmConfig ;
2322import org .apache .polaris .core .context .RealmContext ;
2423import org .apache .polaris .core .persistence .bootstrap .BootstrapOptions ;
2524import org .apache .polaris .core .persistence .bootstrap .RootCredentialsSet ;
@@ -32,7 +31,7 @@ public interface MetaStoreManagerFactory {
3231
3332 PolarisMetaStoreManager createMetaStoreManager (RealmContext realmContext );
3433
35- EntityCache getOrCreateEntityCache (RealmContext realmContext , RealmConfig realmConfig );
34+ EntityCache getOrCreateEntityCache (RealmContext realmContext );
3635
3736 Map <String , PrincipalSecretsResult > bootstrapRealms (
3837 Iterable <String > realms , RootCredentialsSet rootCredentialsSet );
Original file line number Diff line number Diff line change @@ -146,11 +146,9 @@ public PolarisAuthorizer polarisAuthorizer(RealmConfig realmConfig) {
146146 public ResolverFactory resolverFactory (
147147 PolarisDiagnostics diagnostics ,
148148 RealmContext realmContext ,
149- RealmConfig realmConfig ,
150149 MetaStoreManagerFactory metaStoreManagerFactory ,
151150 PolarisMetaStoreManager polarisMetaStoreManager ) {
152- EntityCache entityCache =
153- metaStoreManagerFactory .getOrCreateEntityCache (realmContext , realmConfig );
151+ EntityCache entityCache = metaStoreManagerFactory .getOrCreateEntityCache (realmContext );
154152 return (securityContext , referenceCatalogName ) ->
155153 new Resolver (
156154 diagnostics ,
Original file line number Diff line number Diff line change @@ -205,8 +205,7 @@ public TestServices build() {
205205 PolarisMetaStoreManager metaStoreManager =
206206 metaStoreManagerFactory .createMetaStoreManager (realmContext );
207207
208- EntityCache entityCache =
209- metaStoreManagerFactory .getOrCreateEntityCache (realmContext , realmConfig );
208+ EntityCache entityCache = metaStoreManagerFactory .getOrCreateEntityCache (realmContext );
210209 ResolverFactory resolverFactory =
211210 (securityContext , referenceCatalogName ) ->
212211 new Resolver (
You can’t perform that action at this time.
0 commit comments