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