Feature: query-and-write readConcern parameter#615
Open
imforster wants to merge 4 commits into
Open
Conversation
|
🤖 Auto-triaged by documentdb-triage-tool. Applied: Reasoningcomponent from path globs (test-coverage); effort from diff stats (1313+0 LOC, 10 files); LLM: Adds 205 new compatibility test cases across 9 files covering the readConcern parameter surface area for multiple read/write commands, which is a substantial multi-file test coverage expansion. If a label is wrong, remove it manually and ping |
Test cases: 205 (+ 9 replica_set skipped on standalone) Docs: https://www.mongodb.com/docs/v8.2/reference/read-concern/ Adds compatibility test coverage for the readConcern cross-cutting parameter, validating its full surface area across read commands (find, aggregate, count, distinct) and write commands (insert, update, delete, findAndModify) - from level acceptance and functional equivalence to full BSON type rejection matrix, invalid level strings, null coercion, snapshot/linearizable restrictions, command option interactions, empty/non-existent collections, views, cursor continuation (getMore), and afterClusterTime validation. 205 test cases across 9 files following project test guidelines. Signed-off-by: Ian Forster <forstaia@amazon.com>
Adds test_read_concern_local.py covering the MongoDB spec properties
for readConcern level 'local':
- Local is the implicit default: verify omitting readConcern produces
identical results to explicit {"level": "local"} for all 4 read
commands (find, aggregate, count, distinct).
- Available without session/transaction: confirm all 4 commands succeed
with 'local' in a plain context with no session, no transaction, and
no replica set requirement.
- Reads local state immediately: verify freshly-inserted documents are
visible under 'local' without propagation delay.
- Reflects mutations: verify 'local' sees in-place updates and deletions
applied to the local instance right away.
18 tests total (14 parametrized + 2 standalone).
Signed-off-by: Ian Forster <forstaia@amazon.com>
Align with PR documentdb#617 which replaced topology-coupled markers with capability-based precondition markers. Signed-off-by: Ian Forster <forstaia@amazon.com>
6f26257 to
6fa1aef
Compare
…n=False NOT_A_REPLICA_SET_ERROR for snapshot outside transaction is standalone- specific. On a replica set, this produces a different error. Gate the test so it only runs where cluster_read_concern is absent. Signed-off-by: Ian Forster <forstaia@amazon.com>
866cfcd to
6ff7b8b
Compare
eerxuan
reviewed
Jun 24, 2026
eerxuan
left a comment
Collaborator
There was a problem hiding this comment.
- Cut the multi-command fan-out for the acceptance/validation axis in the cross-cutting dir. LEVEL_ACCEPTANCE_TESTS, NON_DOCUMENT_READ_CONCERN_TESTS, INVALID_LEVEL_TYPE_TESTS, INVALID_LEVEL_STRING_TESTS, null-coercion — these iterate ["find", "aggregate", "count", "distinct"] and duplicate what the per-command files already cover exhaustively. They should live per-command (and largely already do for count/distinct/aggregate).
- Keep the behavioral tests, collapsed to one representative command. The local/snapshot/linearizable semantic files are the legitimate cross-cutting content; pick one command (find is the natural representative) instead of repeating per command.
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.
#39
Test cases: 205 (+ 9 replica_set skipped on standalone)
Docs: https://www.mongodb.com/docs/v8.2/reference/read-concern/
Adds compatibility test coverage for the readConcern cross-cutting parameter, validating its full surface area across read commands (find, aggregate, count, distinct) and write commands (insert, update, delete, findAndModify) - from level acceptance and functional equivalence to full BSON type rejection matrix, invalid level strings, null coercion, snapshot/linearizable restrictions, command option interactions, empty/non-existent collections, views, cursor continuation (getMore), and afterClusterTime validation.
205 test cases across 9 files following project test guidelines.