[CDRIVER-3528] An ismaster reply containing "msg" is considered a mongos regardless of the value Created: 09/Feb/20  Updated: 28/Oct/23  Resolved: 12/Feb/20

Status: Closed
Project: C Driver
Component/s: libmongoc
Affects Version/s: None
Fix Version/s: 1.17.0-beta, 1.17.0

Type: Bug Priority: Minor - P4
Reporter: Kevin Albertson Assignee: Kevin Albertson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

A slight deviation from the SDAM spec, but in parsing an ismaster reply, libmongoc always considers the existence of the field "msg" to indicate the server is a mongos.

But the SDAM spec is explicit in that the value should be "isdbgrid".

I don't believe there is any current bug that could surface from this, as I'm not aware of servers ever reporting "msg" with another value. But it could foreseeably change (e.g. as suggested in SERVER-3353).
 



 Comments   
Comment by Githook User [ 12/Feb/20 ]

Author:

{'username': 'kevinAlbs', 'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com'}

Message: CDRIVER-3528 check value of msg in ismaster reply

SDAM mandates that a server is considered mongos if msg is set in the
ismaster reply and set to the value 'isdbgrid'. libmongoc was
only checking for the existence of 'msg'.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/f519c751667c045e32bb845f3974e757cf76dba7

Generated at Wed Feb 07 21:18:19 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.