singhpk234 commented on PR #4054:
URL: https://github.com/apache/polaris/pull/4054#issuecomment-4225552404
Interesting find by CI :
InMemoryBufferEventListener.flush() runs on a background Mutiny worker
thread (no HTTP request scope). It calls
metaStoreManagerFactory.getOrCreateSession(realmContext), which in your
refactored code reads from realmConfig - a @RequestScoped CDI bean. That throws
ContextNotActiveException, silently dropping all events (the @Fallback
just logs the error).
The old code avoided this because it cached session suppliers during
bootstrap (within request scope) and never re-read realmConfig on subsequent
calls. The
refactor removed that caching, exposing the request-scope dependency on
every call.
I, Replaced @Inject RealmConfig realmConfig (request-scoped) with @Inject
RealmConfigurationSource realmConfigurationSource (application-scoped).
In getOrCreateSession, we construct a RealmConfigImpl inline using the
realmConfigurationSource + the realmContext parameter that's already passed in.
This
matches the pattern used by the other MetaStoreManagerFactory
implementations (Local, NoSQL), which don't inject RealmConfig as a field at
all.
--
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]