Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GODRIVER-2649 Remove RW Concern Logic from RunCommand #1450

Merged
merged 4 commits into from
Nov 2, 2023

Conversation

prestonvasquez
Copy link
Collaborator

@prestonvasquez prestonvasquez commented Nov 1, 2023

GODRIVER-2649

Summary

Remove unused readConcern setter for commands at the mongo and x/opereration levels. Per the specifications:

RunCommand MUST NOT support read concern and write concern options. Drivers MUST NOT attempt to check the command document for the presence of a readConcern and writeConcern field.

If the user-provided command document already includes readConcern or writeConcern fields, the values MUST be left as-is.

Background & Motivation

This ticket originally proposed to "pass readConcern to the underlying [command] operation". However, this is prohibited in the DBX specifications.

This change is not backwards breaking since we do not honor the passed Database.readConcern as-is. This change should be part of the next minor release.

@prestonvasquez prestonvasquez requested a review from a team as a code owner November 1, 2023 21:31
@prestonvasquez prestonvasquez requested review from blink1073 and removed request for a team November 1, 2023 21:31
@prestonvasquez prestonvasquez changed the base branch from v1 to master November 1, 2023 21:31
Copy link
Contributor

API Change Report

./x/mongo/driver/operation

incompatible changes

(*Command).ReadConcern: removed

Copy link
Member

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@prestonvasquez prestonvasquez merged commit d52c9e1 into mongodb:v1 Nov 2, 2023
37 checks passed
@prestonvasquez prestonvasquez deleted the GODRIVER-2649 branch November 2, 2023 20:28
blink1073 pushed a commit to blink1073/mongo-go-driver that referenced this pull request Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants