dennishuo commented on code in PR #2229:
URL: https://github.com/apache/polaris/pull/2229#discussion_r2278089134
##########
polaris-core/src/main/java/org/apache/polaris/core/persistence/BaseMetaStoreManager.java:
##########
@@ -53,6 +56,16 @@ public static PolarisStorageConfigurationInfo
extractStorageConfiguration(
return PolarisStorageConfigurationInfo.deserialize(storageConfigInfoStr);
}
+ private final Supplier<MS> metaStoreSupplier;
+
+ public BaseMetaStoreManager(Supplier<MS> metaStoreSupplier) {
+ this.metaStoreSupplier = Suppliers.memoize(metaStoreSupplier::get);
Review Comment:
FYI A lot of the machinery behind the MetaStoreManager/BasePersistence
interactions/factories exists precisely to enforce the contract that
BasePersistence instances are bound to a PolarisCallContext lifetime and are
RequestScoped.
If the request scoping wasn't necessary, indeed none of the indirection
would be necessary. Similarly, machinery for making MetaStoreManager
realm-scoped goes beyond vanilla `@ApplicationScoped` annotations in order to
define/enforce realm-scoping.
--
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]