Skip to content

Conversation

@neilshweky
Copy link
Contributor

No description provided.

# merged over the existing read preference / write concern.
# Provides a new collection with either a new read preference, new read
# concern or new write concern merged over the existing read preference /
# read concern / write concern.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

As per RUBY-3084, the CHANGEABLE_OPTIONS contains both read and read_concern. The read option corresponds to the read_preference options. Now, this method has only documented the ability to change the read preference and write concern, while allowing the changing of read preference, read concern, and write concern.

There are two options here:

  • document that with also allows changing read concern, which is what's done here
  • change with to not allow the changing of read concern as per RUBY-3084.

This PR implements the former. I can also move this snippet to its own PR if that would be better.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

I made the ticket before reading this PR, I see that you've done several of the changes listed there in this PR already.

@alexbevi alexbevi self-requested a review August 5, 2022 19:16
@neilshweky
Copy link
Contributor Author

This is ready for review.

end
end

context "when creating collection with view_on and pipeline" do
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Shoutout to @alexbevi for this test

Copy link
Contributor

@alexbevi alexbevi left a comment

Choose a reason for hiding this comment

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

These changes LGTM

@neilshweky neilshweky merged commit 92027ab into mongodb:master Aug 11, 2022
neilshweky added a commit that referenced this pull request Aug 15, 2022
* RUBY-1673 Document collection options

* RUBY-1673 remove read_preference option

* RUBY-1673 amend #with docs to include read_concern

* RUBY-1673 add missing options

* RUBY-1673 verify max and size options work

* RUBY-1673 nitpick

* RUBY-1673 alphabetize the options

* RUBY-1673 fix mmap tests

* RUBY-1673 fix mmap tests
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.

4 participants