Hi Michael, Could you share some more details about non-CDI environments? What would be the basic approach to creating services and related objects in runtime?
I imagine it eventually comes down to creating java objects. What CDI can do automatically, can be done without CDI too. Why would passing CallContext to constructor parameters be significantly harder than passing it to method parameters? In my mind, using constructors (by extension class fields) for setting contextual information is actually easier than passing it around in every method call. Regarding avoiding CDI in core classes, IIRC it was about CDI annotations (my recollection may be skewed, though). This PR does not introduce CDI annotations into core. The core classes are still quite usable in non-CDI environments, so I guess this cycles back to the convenience point (above). Re: PolarisMetaStoreManager being stateless, I do not see any material change in that regard. In fact, I think this PR makes it more stateless by reducing the lifespan of PolarisMetaStoreManager instances. Thanks, Dmitri. On Wed, Oct 8, 2025 at 5:54 PM Michael Collado <[email protected]> wrote: > I thought we generally agreed to avoid CDI in the core classes. This > refactoring makes using the metastore API substantially harder to use in > non-CDI environments. It was an intentional design choice to make the > PolarisMetaStoreManager itself stateless and carry all of the required > state in the PolarisCallContext. > > Mike > > On Tue, Oct 7, 2025 at 6:31 AM Dmitri Bourlatchkov <[email protected]> > wrote: > > > Thanks for this refactoring proposal, Christopher! > > > > I think it makes the code align better with CDI concepts and should make > it > > easier to evolve the codebase. I fully support moving in this direction. > > > > As for downstream projects, as far as I can tell, it should still be > > possible to inject custom request-scoped data. If other community members > > have concerns with this, we can certainly discuss and I'm sure we can > find > > solutions. > > > > Cheers, > > Dmitri. > > > > On Mon, Oct 6, 2025 at 11:41 AM Christopher Lambert <[email protected] > > > > wrote: > > > > > Hello everyone, > > > > > > I have put up a PR that reworks "PolarisMetaStoreManager" to be > > > request-scoped: > > > > > > https://github.com/apache/polaris/pull/2555 > > > > > > From my perspective this cleans up / improves the design around > > > persistence access in the code base without sacrificing any > flexibility. > > > > > > I have created a document to explain the reasoning and for discussion > > here: > > > > > > > > > > > > https://docs.google.com/document/d/1T6nxpEKpHWvcqu2qTEaS516lmtJNfeXiHm96vNNZCvo/edit?usp=sharing > > > > > > Looking forward to your feedback and review. > > > > > > Thank you, Christopher > > > > > > > > >
