Repository navigation
Fix flaky strict mode collection size tests - #8922
Merged
Merged
Conversation
These tests rely on the collection size stats cache being refreshed to detect that a size limit has been exceeded. Without wait=true, upsert operations are written to WAL and acknowledged immediately without being applied to segments. When the cache refreshes, it reads segment data which may not yet reflect the pending WAL operations, causing the size check to see stale values and not reject the request. Adding wait=true ensures operations are applied to segments before the response returns, so the cache refresh sees the correct sizes. Co-authored-by: Cursor <[email protected]>
agourlay
approved these changes
May 6, 2026
timvisee
pushed a commit
that referenced
this pull request
May 8, 2026
These tests rely on the collection size stats cache being refreshed to detect that a size limit has been exceeded. Without wait=true, upsert operations are written to WAL and acknowledged immediately without being applied to segments. When the cache refreshes, it reads segment data which may not yet reflect the pending WAL operations, causing the size check to see stale values and not reject the request. Adding wait=true ensures operations are applied to segments before the response returns, so the cache refresh sees the correct sizes. Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: Cursor <[email protected]>
1 task
This was referenced Jun 8, 2026
Closed
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.
Summary
test_strict_mode_max_collection_size_upsert_batchand similar tests by addingwait=trueto upsert operationsRoot Cause
These tests validate that strict mode's collection size limits are enforced. They work by:
Without
wait=true, upsert operations are written to WAL and acknowledged immediately, but not yet applied to segments. When the size stats cache refreshes, it reads the current segment state — which may not reflect pending WAL operations. Under CI load, the async write worker may lag, causing all 32 retry iterations to see stale (below-limit) sizes and the test fails.Fix
Add
query_params={'wait': 'true'}to the upsert helper functions in all 4 affected tests:test_strict_mode_max_collection_size_upserttest_strict_mode_max_collection_size_upsert_batchtest_strict_mode_max_collection_payload_size_upsert_batchtest_strict_mode_max_collection_point_count_upsert_batchThis ensures operations are applied to segments before the response returns, so the cache refresh sees correct sizes.
Test plan
Made with Cursor