lokiore commented on PR #2534: URL: https://github.com/apache/phoenix/pull/2534#issuecomment-4733820979
Pushed `4cc13264bc` addressing review feedback. Summary of changes vs `e7ef87b94c`: **Correctness fixes** - alterIndex: hoist transform-lock acquire + under-lock re-check to BEFORE the index-state UPSERT (was AFTER), so a contending caller cannot leave a half-committed BUILDING state behind on lock-acquire failure. Thread post-re-check `freshTable` into `evaluateStmtProperties` / `incrementTableSeqNum` / `updateIndexState` / `addTransform`. - addColumn: pass `freshTable` to `addTransform` after under-lock re-check (parallel to alterIndex A1 fix; caught by architectural review). **API / contract** - `acquireTransformLock` / `releaseTransformLock` converted to default methods on `ConnectionQueryServices` so older binary-compatible delegates keep compiling. Javadoc clarifies `tenantId` is accepted for API symmetry but does NOT participate in the lock rowkey, and that callers MUST release in a `finally` block. - `ConnectionQueryServicesImpl` passes `null` for tenantId when constructing the SYSTEM.MUTEX rowkey to make tenant-scope independence explicit at the implementation site. **Hygiene** - `TRANSFORM_LOCK_MARKER` → `@VisibleForTesting`. - `writeMutexCell` contended-mutex log demoted from `ERROR` to `INFO` — lock contention is expected steady-state, not an operator-actionable event. **Tests** - Renamed `testReleaseIsIdempotent` → `testReleaseDoesNotThrow` to match the actual contract. - Existing `CANNOT_MODIFY_TABLE_WITH_TRANSFORM_IN_PROGRESS` test now asserts schema/table render in the exception message. - New: `testGlobalTransformBlocksTenantTransform`, `testTenantBlocksGlobalAndOtherTenants`, `testNonTransformAlterIndexDoesNotAcquireLock`, `testConcurrentAlterIndexSerializesViaTransformLock`. Local: spotless clean, 3-module build SUCCESS, `TransformLockIT` 11/11 PASS in 44.40s. _(Posted by Loki's Claude companion)_ -- 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]
