fluss icon indicating copy to clipboard operation
fluss copied to clipboard

[test] Unstable test RemoteLogITCase.testFollowerFetchAlreadyMoveToRemoteLog

Open dstolis opened this issue 1 month ago • 0 comments

Search before asking

  • [x] I searched existing issues by test name and class and found no matching test-failure report. #1110 covers a different test in the same class (remoteLogMiscTest).

Fluss version

Development (1.1-SNAPSHOT).

Description

RemoteLogITCase.testFollowerFetchAlreadyMoveToRemoteLog fails intermittently for the second parameter set (withWriterId=true, remoteDirName=dir2). Reproduced locally on main by running the whole class (mvn test -pl fluss-server -Dtest=RemoteLogITCase): it failed in 2 of 5 runs. When only testFollowerFetchAlreadyMoveToRemoteLog runs, it passes.

[ERROR] org.apache.fluss.server.log.remote.RemoteLogITCase.testFollowerFetchAlreadyMoveToRemoteLog(boolean, String)[2]  Time elapsed: 67.479 s  <<< FAILURE!
java.lang.AssertionError: 

Expecting Optional to contain a value but it was empty.
	at org.apache.fluss.server.testutils.FlussClusterExtension.lambda$waitUntilAllReplicaReady$14(FlussClusterExtension.java:703)
	at org.apache.fluss.testutils.common.CommonTestUtils.retry(CommonTestUtils.java:142)
	at org.apache.fluss.server.testutils.FlussClusterExtension.waitUntilAllReplicaReady(FlussClusterExtension.java:686)
	at org.apache.fluss.server.log.remote.RemoteLogITCase.testFollowerFetchAlreadyMoveToRemoteLog(RemoteLogITCase.java:237)

The failure is at the initial waitUntilAllReplicaReady(tb) of parameter set [2], right after it creates its table and before it stops any TabletServer.

Investigation

Parameter set [1] stops a follower TabletServer and restarts it. The coordinator log of a failing run shows TabletServer 0 treated as offline:

2744  WARN CoordinatorChannelManager - Can't not send StopReplicaRequest to the tablet server 0 as the server is offline.
3715  WARN CoordinatorChannelManager - Can't not send NotifyRemoteLogOffsetsRequest to the tablet server 0 as the server is offline.
72727 WARN CoordinatorRequestBatch - Failed to send stop replica request to tablet server 0.

The last line comes after the 67 s wait of parameter set [2]. A possible lead: the coordinator may not register the restarted TabletServer again in time, so the new table's replica on it never becomes ready. That still needs to be confirmed.

dstolis avatar Oct 20 '26 09:10 dstolis