Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Remove CallContext and its ThreadLocal usage #589

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

adutra
Copy link
Contributor

@adutra adutra commented Dec 24, 2024

⚠️ Not ready for review yet!

Requires #469 and #604.

Fixes #463.

Removing CallContext is done in 2 steps:

  1. Removal of PolarisCallContext: this component is an aggregation of 3 application-scoped beans, and one request-scoped bean (the meta store session). It is "easy" to replace it by the components that are actually needed, however since it's used nearly everywhere, the blast radius is quite big. Application scoped beans are generally replaced with constructor injection, and request-scoped ones are passed through additional method arguments (except when the component is also request-scoped, in which case constructor injection is used).
  2. Removal of CallContext proper. This is easier after step 1. The only issue is to revisit how PolarisCatalogHandlerWrapper closes the base catalog. The doCatalogOperation trick wasn't being done at the right level imho and could leave some catalogs unclosed in case of runtime errors.

@adutra adutra force-pushed the remove-call-context branch from ea2175d to 08a09f6 Compare December 26, 2024 17:04
@adutra adutra changed the title Remove CallContext and its ThreadLocal usage [WIP] Remove CallContext and its ThreadLocal usage Dec 26, 2024
@adutra adutra force-pushed the remove-call-context branch 15 times, most recently from 5905ba1 to 439b0bf Compare January 8, 2025 16:39
@adutra adutra force-pushed the remove-call-context branch from 439b0bf to facd3fd Compare January 8, 2025 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove and ban usage of [Inheritable]ThreadLocal
1 participant