Purushottam Sinha created FLINK-41719:
-----------------------------------------

             Summary: 
NativeS3RecoverableFsDataOutputStreamTest.partUploadFailureStopsWritesWhileEarlierPartsAreInFlight
 is flaky
                 Key: FLINK-41719
                 URL: https://issues.apache.org/jira/browse/FLINK-41719
             Project: Flink
          Issue Type: Bug
          Components: FileSystems
    Affects Versions: 2.5.0, 2.4.0
            Reporter: Purushottam Sinha


*Problem*
The test checks that part 1 is still in flight without waiting for part 1's 
upload to start. It fails at random when the upload thread is slow to start.

*Evidence*
* [Azure build 
82234|https://dev.azure.com/apache-flink/apache-flink/_build/results?buildId=82234&view=logs&j=fc5181b0-e452-5c8f-68de-1097947f6483&t=995c650b-6573-581c-9ce6-7ad4cc038461],
 stage {{test_ci misc}}, on PR #30175, which doesn't touch S3: 
{{NativeS3RecoverableFsDataOutputStreamTest.java:345}} failed with
{noformat}
[part 1 is still in flight]
Expecting AtomicInteger(1) to have value:
  1
but did not.
{noformat}
The value changed between the check and the message.
* {{FakeNativeS3Operations.uploadPart}} increments {{inFlightUploads}} only 
once an upload thread enters it. The test waits only for 
{{isFailed(asyncStream)}} before checking the counter.
* The test was added in {{9b82e9ca9b2}} (#29890) and backported to release-2.4 
(#30103).

*Proposed fix*
* Before the assertion at line 345, wait for {{s3.inFlightUploads.get() == 1}}, 
as other tests in the class do (lines 361, 404 and 430).

*Acceptance*
* The test passes repeatedly in a loop on master and release-2.4.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to