Skip to content

Commit 4b6041e

Browse files
committed
Remove PolarisCallContext from BasePersistence et al
Following up on #2251, this change removes the `PolarisCallContext` parameter from the interfaces `BasePersistence`, `IntegrationPersistence` and `PolicyMappingPersistence`. None of the implementations used the parameter for anything else than getting a `PolarisDiagnostics` instance, which is implicitly available in the containing type.
1 parent af69d9f commit 4b6041e

File tree

25 files changed

+557
-1068
lines changed

25 files changed

+557
-1068
lines changed

persistence/eclipselink/src/main/java/org/apache/polaris/extension/persistence/impl/eclipselink/EclipseLinkPolarisMetaStoreManagerFactory.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ protected TransactionalPersistence createMetaStoreSession(
6666
@Nullable RootCredentialsSet rootCredentialsSet,
6767
@Nonnull PolarisDiagnostics diagnostics) {
6868
return new PolarisEclipseLinkMetaStoreSessionImpl(
69+
diagnostics,
6970
store,
7071
storageIntegrationProvider,
7172
realmContext,

persistence/eclipselink/src/main/java/org/apache/polaris/extension/persistence/impl/eclipselink/PolarisEclipseLinkMetaStoreSessionImpl.java

Lines changed: 68 additions & 115 deletions
Large diffs are not rendered by default.

persistence/eclipselink/src/test/java/org/apache/polaris/extension/persistence/impl/eclipselink/PolarisEclipseLinkMetaStoreManagerTest.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ protected PolarisTestMetaStoreManager createPolarisTestMetaStoreManager() {
8888
RealmContext realmContext = () -> "realm";
8989
PolarisEclipseLinkMetaStoreSessionImpl session =
9090
new PolarisEclipseLinkMetaStoreSessionImpl(
91-
store, Mockito.mock(), realmContext, null, "polaris", RANDOM_SECRETS);
91+
diagServices, store, Mockito.mock(), realmContext, null, "polaris", RANDOM_SECRETS);
9292
return new PolarisTestMetaStoreManager(
9393
new TransactionalMetaStoreManagerImpl(),
9494
new PolarisCallContext(
@@ -110,7 +110,13 @@ void testCreateStoreSession(String confFile, boolean success) {
110110
try {
111111
var session =
112112
new PolarisEclipseLinkMetaStoreSessionImpl(
113-
store, Mockito.mock(), () -> "realm", confFile, "polaris", RANDOM_SECRETS);
113+
diagServices,
114+
store,
115+
Mockito.mock(),
116+
() -> "realm",
117+
confFile,
118+
"polaris",
119+
RANDOM_SECRETS);
114120
assertNotNull(session);
115121
assertTrue(success);
116122
} catch (Exception e) {

0 commit comments

Comments
 (0)