Fix flaky DynamoDB enhanced client integration tests - #7344
Open
S-Saranya1 wants to merge 1 commit into
Open
Conversation
S-Saranya1
force-pushed
the
somepal/fix-flaky-search-vectors-tests
branch
from
September 4, 2026 20:54
afe9181 to
8af8a33
Compare
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.
Motivation and Context
Several DynamoDB enhanced client integration tests flake in preview builds due to eventual consistency:
SearchVectorsIntegrationTestBase(SearchHappyPathTests): Fails withNo result with sort key: dot-unbounded-itembecause POST_MUTATION_SEARCH_RETRY_ATTEMPTS (8 retries, ~4.5s) was insufficient for vector index propagation under CI load.SearchVectorsIntegrationTestBase(WritePathTests):writePath_updateNonVectorFieldsOnlyfails at ~0.026s because searchVectorsUntilContains checks item presence but not content, returning immediately with stale data after an update.QueryGSICompositeKeysIntegrationTest(Static, Immutable, Bean schemas): Various queryGsi* tests fail because waitForGsiConsistency() used a fixed 3-second Thread.sleep, which is insufficient for GSI propagation under CI load. 43 failure runs in the last 30 days.Modifications
POST_MUTATION_SEARCH_RETRY_ATTEMPTSand consolidated intoDEFAULT_SEARCH_RETRY_ATTEMPTS (15), since post-mutation searches need the same consistency window.writePath_updateNonVectorFieldsOnlyto wait for the updated description to propagate, not just item presence.Thread.sleep(3000)inwaitForGsiConsistency()with a poll-and-retry loop that scans gsi1 until all records are visible, with exponential backoff (500ms-2s, up to 20 attempts).Testing
Screenshots (if appropriate)
Types of changes
Checklist
mvn installsucceedsscripts/new-changescript and following the instructions. Commit the new file created by the script in.changes/next-releasewith your changes.License