heads up for readers: a lot of discussion on this topic happened in GH
review comments.

As for me, the approach proposed in PR #1783 looks good in the short term.

I'm exploring options for improving CDI in general, and specifically as it
relates to the realm context. If that works out, I suppose the config API
can be simplified.

Cheers,
Dmitri.

On Tue, Jun 3, 2025 at 1:51 AM yun zou <yunzou.colost...@gmail.com> wrote:

> Hi Team,
>
> In order to get rid of the usage of CallContext.getCurrentContext() call in
> the getConfiguration implementation of DefaultConfigurationStore, we did
> one attempt leverage CDI to inject request scoped RealmContext into the
> application scoped DefaultConfigurationStore.
> Commit:
>
> https://github.com/apache/polaris/commit/d753a95e4ae1724e87db8a0a3a925094f354ee67
>
> However, it fails the background task (TaskExecutor) because the
> getConfiguration is called outside the active request scope in the
> background task, and the request scoped bean is not propagated properly to
> the background task thread. While we are still investigating how to
> propagate the request scoped bean properly, we pass the RealmContext to the
> call of getConfiguration. However, this requires us to pass the
> RealmContext as part of the loadTasks interface for
> PolarisMetaStoreManager.
>
> The PR here https://github.com/apache/polaris/pull/1783 adds the
> RealmContext as part of the loadTasks call, please help take a look and
> provide your valuable feedback.
>
> Best Regards,
> Yun
>

Reply via email to