-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.4.9, 2.6.4
-
Component/s: Sharding
-
None
-
Fully Compatible
-
ALL
Start a sharded cluster of two-member replica sets and kill a primary, so one of the shards has only a secondary. Run 'dbstats' on a database, mongos responds:
{ "raw" : { "shard0/localhost:4000,localhost:4001" : { } }, "ok" : 0, "errmsg" : "{ shard0/localhost:4000,localhost:4001: \"result without error message returned : {}\" }" }
This seems like an unclear error message, and the "raw" error document is empty, which is unlike most other error structures from mongos.
Tested with 2.4.9 and 2.6.4. Same behavior if all members of the shard are down, not just the primary.
Drivers may need to be updated now if they don't expect an empty error document in "raw" (see PYTHON-766, PyMongo throws an exception trying to parse this error), and they may need validation that they can parse the corrected error message if mongos is updated to return a different error in this scenario.
- is related to
-
PYTHON-2381 Remove handling of "raw" field in command errors
- Backlog
- related to
-
PYTHON-766 KeyError parsing error response from mongos
- Closed
-
DRIVERS-187 Handle empty "raw" errors from mongos
- Closed