Skip to content

PHOENIX-7830 De-flake MutableIndexFailureIT#2447

Open
apurtell wants to merge 1 commit intoapache:masterfrom
apurtell:PHOENIX-7830
Open

PHOENIX-7830 De-flake MutableIndexFailureIT#2447
apurtell wants to merge 1 commit intoapache:masterfrom
apurtell:PHOENIX-7830

Conversation

@apurtell
Copy link
Copy Markdown
Contributor

@apurtell apurtell commented May 1, 2026

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-thread visibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant