Skip to content

Fix flaky ParallelScanIntegrationTest by adding pagination to scan requests - #7363

Merged
S-Saranya1 merged 1 commit into
masterfrom
somepal/fix-flaky-parallel-scan-test
Sep 9, 2026
Merged

S-Saranya1 merged 1 commit into
masterfrom
somepal/fix-flaky-parallel-scan-test

Conversation

@S-Saranya1

@S-Saranya1 S-Saranya1 commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Motivation and Context

ParallelScanIntegrationTest.testParallelScan flakes in preview builds with small count mismatches (off by 1–5 items) at the assertion comparing single-segment scan results against 10-segment parallel scan results. 16 failures in the last 14 days. The root cause is that neither scan paginates - DynamoDB scan returns at most 1MB per call, and on the shared CI table with accumulated data, responses get truncated at different boundaries for the single-segment and multi-segment scans, producing different filtered counts.

Modifications

Replaced single-call dynamo.scan() with dynamo.scanPaginator() for both the single-segment scan and each of the 10 parallel segment scans, so all pages are read automatically before comparing counts. Also extracted the shared scan filter to reduce duplication.

Testing

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed
  • I have added a changelog entry. Adding a new entry must be accomplished by running the scripts/new-change script and following the instructions. Commit the new file created by the script in .changes/next-release with your changes.
  • My change is to implement 1.11 parity feature and I have updated LaunchChangelog

License

  • I confirm that this pull request can be released under the Apache 2 license

@S-Saranya1
S-Saranya1 requested a review from a team as a code owner September 9, 2026 17:26
@S-Saranya1
S-Saranya1 force-pushed the somepal/fix-flaky-parallel-scan-test branch from 57bea4c to 2683b4a Compare September 9, 2026 17:29
@S-Saranya1
S-Saranya1 requested a review from dagnir September 9, 2026 17:47
@S-Saranya1
S-Saranya1 added this pull request to the merge queue Sep 9, 2026
Merged via the queue into master with commit 0400a3b Sep 9, 2026
14 of 15 checks passed
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

This pull request has been closed and the conversation has been locked. Comments on closed PRs are hard for our team to see. If you need more assistance, please open a new issue that references this one.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Sep 9, 2026
@S-Saranya1
S-Saranya1 deleted the somepal/fix-flaky-parallel-scan-test branch September 10, 2026 16:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants