HBASE-30265 Fix flaky TestProcDispatcher.testRetryLimitOnConnClosedEr…#8439
Open
liuxiaocs7 wants to merge 1 commit into
Open
HBASE-30265 Fix flaky TestProcDispatcher.testRetryLimitOnConnClosedEr…#8439liuxiaocs7 wants to merge 1 commit into
liuxiaocs7 wants to merge 1 commit into
Conversation
liuxiaocs7
commented
Jun 29, 2026
Comment on lines
-92
to
-95
| if (j >= 8 && j <= 13 || j >= 18 && j <= 23) { | ||
| throw ERRORS.get(ERROR_IDX.getAndIncrement() % ERRORS.size()); | ||
| // Throw a connection error each attempt until the retry limit is exhausted (-> SCP). On the | ||
| // last attempt run the real open/close first so the region still recovers. | ||
| if (attempts++ >= failFastLimit - 1) { | ||
| FutureUtils.get(getRsAdmin().executeProcedures(request)); | ||
| } | ||
| return FutureUtils.get(getRsAdmin().executeProcedures(request)); |
Member
Author
There was a problem hiding this comment.
The judgment here is actually not stable enough
There was a problem hiding this comment.
Pull request overview
This PR addresses flakiness in TestProcDispatcher.testRetryLimitOnConnClosedErrors (HBASE-30265) by making the error-injection logic in the test RS procedure dispatcher deterministic and scoped to the specific table/operations under test, rather than relying on global call counts.
Changes:
- Refactors
RSProcDispatchertest dispatcher to inject connection errors for the next N open/close-region requests targeting a specific table, and to align retries with the configured fail-fast retry limit. - Hardens the test by resetting injection state after each test, properly closing
Tableresources, and extendingwaitFortimeouts to reduce timing-related flakes. - Minor cleanup: replaces the hard-coded fail-fast config key usage in the test with a shared constant and improves logging formatting.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestProcDispatcher.java | Makes the flaky test more robust via scoped injection control, proper resource cleanup, and longer wait timeouts. |
| hbase-server/src/test/java/org/apache/hadoop/hbase/util/RSProcDispatcher.java | Reworks the test dispatcher to inject failures based on target table + request type, using the configured retry limit to reliably trigger SCP scheduling. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…rors