[
https://issues.apache.org/jira/browse/PHOENIX-7817?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Viraj Jasani updated PHOENIX-7817:
----------------------------------
Fix Version/s: 5.3.2
(was: 5.3.1)
> OMID transaction singleton view to survive cluster cycles
> ---------------------------------------------------------
>
> Key: PHOENIX-7817
> URL: https://issues.apache.org/jira/browse/PHOENIX-7817
> Project: Phoenix
> Issue Type: Sub-task
> Components: omid, test
> Reporter: Andrew Kyle Purtell
> Assignee: Andrew Kyle Purtell
> Priority: Major
> Fix For: 5.4.0, 5.3.2
>
>
> {{OmidTransactionClient}} captures the provider's {{HBaseTransactionManager}}
> at construction time. {{OmidTransactionContext}} in turn caches that same
> reference in a private field. When a prior test class shuts down OMID's TSO
> together with its mini-cluster, the next test class reuses the stale wrapper
> and is dispatched to the dead executor. The symptom is a
> {{RejectedExecutionException}} originating from the OMID {{TSOClient}}
> state-machine executor.
>
> In production the singleton's manager is set exactly once and never replaced,
> but the test framework exercises the swap path between classes within a
> single Surefire/Failsafe fork.
>
> Fix:
>
> {{OmidTransactionProvider.OmidTransactionClient}} becomes a thin view onto
> the singleton's current {{{}HBaseTransactionManager{}}}. It resolves
> {{provider.transactionManager}} on every call to
> {{{}getTransactionClient(){}}}. {{transactionManager}} is marked volatile so
> test-framework injection is published to other threads without
> synchronization.
> In production the dynamic lookup is functionally identical to caching.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)