[FLUSS-3716] Tolerate removed tablet servers in wait helpers#3739
Draft
wolfkill wants to merge 1 commit into
Draft
[FLUSS-3716] Tolerate removed tablet servers in wait helpers#3739wolfkill wants to merge 1 commit into
wolfkill wants to merge 1 commit into
Conversation
2 tasks
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.
What changed
FlussClusterExtensionnow treats tablet servers that are still referenced byLeaderAndIsrbut have already been removed from the local test cluster as a retryable wait condition instead of throwing aNullPointerException.This covers the remaining wait-helper call sites from FLUSS-3716:
waitUntilTableReady(...)viawaitReplicaInAssignmentReady(...)waitUntilTablePartitionReady(...)viawaitReplicaInAssignmentReady(...)waitUntilAllReplicaReady(...)Why
During tablet-server shutdown or failover, ZooKeeper metadata can temporarily still reference the removed server while the in-process
FlussClusterExtensionmap has already dropped it.CommonTestUtils.retry(...)retriesAssertionError, but the old directgetTabletServerById(...).getReplicaManager()call produced an immediate NPE, turning a transient state into a flaky test failure.Validation
JAVA_HOME=/Users/cc/Library/Java/JavaVirtualMachines/corretto-18.0.2/Contents/Home mvn -pl fluss-server -am -Dtest=FlussClusterExtensionTest#testWaitUntilAllReplicaReadyRetriesWhenIsrContainsRemovedTabletServer -DfailIfNoTests=false testNullPointerExceptionfromFlussClusterExtension.waitUntilAllReplicaReady(...)JAVA_HOME=/Users/cc/Library/Java/JavaVirtualMachines/corretto-18.0.2/Contents/Home mvn -pl fluss-server -am -Dtest=FlussClusterExtensionTest,StopReplicaITCase,TabletServerShutdownITCase -DfailIfNoTests=false testTests run: 10, Failures: 0, Errors: 0, Skipped: 0JAVA_HOME=/Users/cc/Library/Java/JavaVirtualMachines/corretto-18.0.2/Contents/Home mvn -pl fluss-server -am -DfailIfNoTests=false testfluss-server:Tests run: 1135, Failures: 0, Errors: 0, Skipped: 0BUILD SUCCESSgit diff --check