apurtell opened a new pull request, #2447:
URL: https://github.com/apache/phoenix/pull/2447

   `MutableIndexFailureIT` has two independent bugs that cause flaky and 
cascading test failures. First, the outer class declares its own static 
volatile `FAIL_WRITE` field that shadows `FailingRegionObserver.FAIL_WRITE`, so 
the finally block in `testIndexWriteFailure` resets the dead outer field and 
leaves `FailingRegionObserver.FAIL_WRITE` stuck at true when the test fails 
mid-way, breaking subsequent tests in the same fork. Second, 
`FailingRegionObserver.TOGGLE_FAIL_WRITE_FOR_RETRY` is not declared volatile 
even though it is written by app threads in `addRowsInTableDuringRetry` and 
read by region server handler threads in `preBatchMutate`, so the RS thread can 
observe a stale false, miss the retry toggle, and surface a `CommitException` 
that fails the assertion. The fix removes the shadowed outer `FAIL_WRITE` 
field, retargets the finally block to reset `FailingRegionObserver.FAIL_WRITE`, 
and marks `FailingRegionObserver.TOGGLE_FAIL_WRITE_FOR_RETRY` volatile to 
guarantee cross-thre
 ad visibility.


-- 
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]

Reply via email to