-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 2.16.0
-
Component/s: None
-
Fully Compatible
When running inside a session and a transaction, `count_documents` doesn't include any changes that are in the current transaction as the session is not passed through from `Mongo::Collection::View`'s options to the `Aggregration` options.
https://github.com/mongodb/mongo-ruby-driver/blob/master/lib/mongo/collection/view/readable.rb#L214
should add `options[:session]` to `opts[:session]` - there are probably more options it would make sense to pass through. See also RUBY-1665
- is cloned by
-
RUBY-2854 Consider passing find (collection view) session to count_documents
- Closed
- links to