Skip to content

Feature: query-and-write readConcern parameter#615

Open
imforster wants to merge 2 commits into
documentdb:mainfrom
imforster:forstaia/read_concern/query_and_write
Open

Feature: query-and-write readConcern parameter#615
imforster wants to merge 2 commits into
documentdb:mainfrom
imforster:forstaia/read_concern/query_and_write

Conversation

@imforster

@imforster imforster commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

#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.

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>
@imforster imforster requested a review from a team as a code owner June 16, 2026 22:43
@documentdb-triage-tool documentdb-triage-tool Bot added compatibility test Compatibility test related enhancement New feature or request labels Jun 16, 2026
@documentdb-triage-tool

Copy link
Copy Markdown

🤖 Auto-triaged by documentdb-triage-tool.

Applied: compatibility test, enhancement
Project fields suggested: Component test-coverage · Priority P2 · Effort L · Status Needs Review
Confidence: 0.90 (mixed)

Reasoning

component 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 @patty-chow so the rules can be tuned. The bot will not re-label items that already have component labels.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compatibility test Compatibility test related enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant