[SERVER-29333] Replace incorrect use of getStatusFromCommandResult in ShardServerCatalogCacheLoader Created: 23/May/17  Updated: 30/Oct/23  Resolved: 02/Jun/17

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 3.5.9

Type: Bug Priority: Major - P3
Reporter: Dianna Hohensee (Inactive) Assignee: Dianna Hohensee (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Gantt Dependency
has to be done after SERVER-29334 Cannot write shard chunks documents w... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2017-05-29, Sharding 2017-06-19
Participants:
Linked BF Score: 0

 Description   

The shard chunk loader is using getStatusFromCommandResult to parse command responses. However, getStatusFromCommandResult does not parse writeErrors and should not be used to parse write command response. The code should be moved off of getStatusFromCommandResult and instead use the BatchedCommandResponse::toStatus() function.

Additionally, add a note to the getStatusFromCommandResult function comment that it cannot be used for write command responses.



 Comments   
Comment by Githook User [ 02/Jun/17 ]

Author:

{u'username': u'DiannaHohensee', u'name': u'Dianna Hohensee', u'email': u'dianna.hohensee@10gen.com'}

Message: SERVER-29333 replace incorrect use of getStatusFromCommandResult in ShardServerCatalogCacheLoader
Branch: master
https://github.com/mongodb/mongo/commit/daa13acf5dad73e3c8c698fa2a948edbd960e117

Comment by Dianna Hohensee (Inactive) [ 25/May/17 ]

This should be committed after SERVER-29334, which resolves a bug. Otherwise, this fix will surface an error and log excessively as a thread keeps retrying endlessly.

Generated at Thu Feb 08 04:20:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.