-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Minor - P4
-
None
-
Affects Version/s: 4.4.0-rc11
-
Component/s: None
-
Service Arch
-
ALL
-
We currently have an issue in the Ruby driver where the driver appears to always add its own $readPreference field to the query, even if the user already specified a read preference. This appears to manifest itself as two $readPreference fields being sent to the server.
The error message that the server produces in this case references "OperationSessionInfo" which as far as I can tell is not something that the driver sent to it.
irb(main):002:0> c.database.command(find: "foo", '$readPreference': {}) localhost:14420 #1:1 | admin.find | STARTED | {"find"=>"foo", "$readPreference"=>{"mode"=>"primary"}, "$db"=>"admin", "lsid"=>{"id"=><BSON::Binary:0x1020 type=uuid data=0x6e42f7d4fd24479a...>}} D, [2020-07-08T14:22:45.203680 #7382] DEBUG -- : MONGODB | [10] localhost:14420 | admin.find | FAILED | BSON field 'OperationSessionInfo.$readPreference' is a duplicate field (40413) | 0.000546408s
I expected the server error messages to only refer to fields that were provided to it as input and not to internal data structures.
- related to
-
RUBY-2312 Sending $readPreference in command helper does not work
- Backlog