damccorm opened a new pull request, #41785:
URL: https://github.com/apache/beam/pull/41785

   Note: this PR was auto-generated by tooling. Before moving it out of draft, 
the author has done a full review of the PR, specifically evaluating it on the 
following criteria:
   
   - The PR is an appropriate fix for the issue (e.g. we're not changing a test 
to avoid a bug)
   - The PR is a simple fix to the issue (e.g. we're not adding infra when we 
could just modify a test)
   - The PR is not covering for other problems (e.g. if we're bumping timeouts, 
it is not because we're covering for a performance problem)
     
   Full details of the methodology of generation and review can be found here - 
https://docs.google.com/document/d/14lj7ECVov4T4EdwmIzNlWrRGE3lLDMOwX5xUMGzaLoc/edit?usp=sharing
   
   If you have concerns with the PR or with the underlying methodology used to 
generate this, please comment below - they will be addressed by the author not 
the tooling :)
   
   ## Summary
   
   Fixes intermittent mid-bundle flush flakes in 
`KinesisIOWriteTest.testWriteAggregatedWithMaxBytes` (and its sibling 
`testWriteAggregatedWithMaxBytesAndBatchMaxBytes` / 
`testWriteAggregatedWithMaxBytesAndBatchMaxRecords` tests), as seen in 
https://github.com/apache/beam/actions/runs/46097273851.
   
   ## Root Cause
   
   Those three size-based aggregation tests configured 
`RecordAggregation.maxBufferedTime(standardSeconds(5))` with the default 
`maxBufferedTimeJitter = 0.7` (`KinesisIO.java:632`), giving an effective 
wall-clock flush deadline of only 1.5–5.0s. Under cold JVM startup, GC pause, 
or `maxParallelForks=4` CPU contention, 
`AggregatedWriter.checkAggregationTimeouts()` fired mid-bundle after row 139, 
splitting the expected single `putRecords` call into two.
   
   ## Changes
   
   - `KinesisIOWriteTest.java`: Use 
`.maxBufferedTime(standardMinutes(5)).maxBufferedTimeJitter(0)` in 
`testWriteAggregatedWithMaxBytes`, 
`testWriteAggregatedWithMaxBytesAndBatchMaxBytes`, and 
`testWriteAggregatedWithMaxBytesAndBatchMaxRecords`.
   
   ### Verification
   - Triggered `beam_PreCommit_Java_Amazon-Web-Services2_IO_Direct.yml` 
workflow run on branch: 
[`46460822006`](https://github.com/apache/beam/actions/runs/46460822006)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to