Repository navigation
Conversation
1eb701f to
b92cc92
Compare
|
Claude Code (an AI assistant), posting on behalf of Andrew Purtell. The 5.4 stabilization sweep found that this issue is still present on master (
I rebased the PR onto the latest master, fixed a spotless failure in @virajjasani, could you please review? |
There was a problem hiding this comment.
🟡 Changes recommended
A deterministic regression test is missing to verify that a retained client and transaction context use the replacement manager for lookup and begin/commit/abort operations.
What changed in this PR
This PR prevents stale Omid transaction-manager references when tests replace the provider’s manager between test classes, while preserving behavior when the production manager remains unchanged.
Changes:
- Makes the provider’s manager volatile and resolves it dynamically through the client wrapper.
- Updates transaction contexts to retrieve the current manager for each operation rather than caching it.
- Adds null-manager handling during transaction reconstruction and DDL fencing.
| File | Description |
|---|---|
| phoenix-core-client/src/main/java/org/apache/phoenix/transaction/OmidTransactionProvider.java | Publishes manager replacements and makes the client a live view of the provider. |
| phoenix-core-client/src/main/java/org/apache/phoenix/transaction/OmidTransactionContext.java | Replaces the cached manager with per-operation lookups and adds null handling. |
Review effort: Balanced
…view OmidTransactionContext now gets the current transaction manager from the provider on each call. A replaced manager then does not leave a stale reference in a cached context or client. The test connection services now share one test transaction service for each provider in the JVM. A server-side connection service no longer starts a second TSO and replaces the manager and commit table of the singleton provider while a transaction is open. Open regions keep the commit table they had when they opened, so such a swap let readers miss committed rows. The connection service that starts the shared service owns it and closes it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
b92cc92 to
9200e5a
Compare
|
Posted by Claude Code (an AI assistant) on behalf of Andrew Purtell. Follow-up from the 5.4 stabilization sweep. With this PR applied, a docker gate run (HBase 2.5, JDK 11) hit a new flake: Cause, in test code only: a server-side connection, here from a compaction, gets its own Fix, now folded into the PR commit ( Evidence (docker, JDK 11):
The branch is rebased onto the latest master ( @virajjasani, could you please review? |
The change edits three lines that carry existing checkstyle warnings, so precommit counts them as new. Remove the parentheses around an assert expression, add braces to a one-line if, and drop a redundant public modifier on a constructor of a package-private class. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

OmidTransactionClientcaptures the provider'sHBaseTransactionManagerat construction time.OmidTransactionContextin 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 aRejectedExecutionExceptionoriginating 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:
OmidTransactionClientbecomes a thin view onto the singleton's currentHBaseTransactionManager. It resolvesprovider.transactionManageron every call togetTransactionClient().transactionManageris marked volatile so test-framework injection is published to other threads without synchronization.In production the dynamic lookup is functionally identical to caching.