[SERVER-44631] DBClient_Connection should retain error code information Created: 14/Nov/19  Updated: 29/Oct/23  Resolved: 26/Nov/19

Status: Closed
Project: Core Server
Component/s: Internal Client
Affects Version/s: None
Fix Version/s: 4.3.3

Type: Improvement Priority: Major - P3
Reporter: Matthew Russotto Assignee: Matthew Russotto
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Repl 2019-12-02
Participants:

 Description   

Currently DBClientConnection will sometimes return an internal code for network errors, which means its user cannot tell these are network errors which could be retried. We should change this so DBClientConnection and related classes pass any network errors up as network errors.

Examples:

https://github.com/mongodb/mongo/blob/master/src/mongo/client/dbclient_connection.cpp#L540

https://github.com/mongodb/mongo/blob/master/src/mongo/client/dbclient_connection.cpp#L625

https://github.com/mongodb/mongo/blob/master/src/mongo/client/dbclient_cursor.cpp#L276

https://github.com/mongodb/mongo/blob/master/src/mongo/client/dbclient_base.cpp#L591 (this is probably not a network error but we should still propagate the error code)

https://github.com/mongodb/mongo/blob/master/src/mongo/client/dbclient_base.cpp#L651

https://github.com/mongodb/mongo/blob/master/src/mongo/client/dbclient_base.cpp#L772

Some of these will require changing lower level classes to preserve error information.



 Comments   
Comment by Githook User [ 26/Nov/19 ]

Author:

{'name': 'Matthew Russotto', 'username': 'mtrussotto', 'email': 'matthew.russotto@mongodb.com'}

Message: SERVER-44631 DBClient_Connection should retain error code information
Branch: master
https://github.com/mongodb/mongo/commit/3c77881955004780a8dd424434575f9dc0a5632d

Generated at Thu Feb 08 05:06:31 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.