[SERVER-19459] Audit all callers of all catalog manager methods to make sure they are handling network errors Created: 16/Jul/15  Updated: 25/Jan/17  Resolved: 28/Aug/15

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

Type: Task Priority: Major - P3
Reporter: Spencer Brody (Inactive) Assignee: Spencer Brody (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Sharding 8 08/28/15
Participants:

 Description   

With the legacy catalog manager network errors become exceptions. In the replset catalog manager, network errors get reported as non-ok Statuses. We need to audit all callers of all catalog manager methods to make sure that they aren't relying on an exception to be thrown to catch network exceptions.



 Comments   
Comment by Githook User [ 28/Aug/15 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-19459 Check return Status in a few missing places when calling CatalogManager methods
Branch: master
https://github.com/mongodb/mongo/commit/a57501786b231510e9a4087873a96fc3cf50628e

Comment by Githook User [ 28/Jul/15 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-19414 SERVER-19459 Make ParallelSortClusteredCursor::startInit check for network errors
Branch: master
https://github.com/mongodb/mongo/commit/88411cd56b1c0cb5b196afc2d564936e78dbc942

Comment by Githook User [ 22/Jul/15 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-19414 SERVER-19459 Make ParallelSortClusteredCursor::startInit check for network errors
Branch: master
https://github.com/mongodb/mongo/commit/88411cd56b1c0cb5b196afc2d564936e78dbc942

Comment by Spencer Brody (Inactive) [ 16/Jul/15 ]

Here is an example of a caller not handling this correctly: https://github.com/mongodb/mongo/blob/ea73cdf50ede2622c9e005eb6e51cdc6ccb60650/src/mongo/client/parallel.cpp#L655

auto status = grid.catalogCache()->getDatabase(nss.db().toString());
if (status.isOK()) {
        config = status.getValue();
       config->getChunkManagerOrPrimary(nss.ns(), manager, primary);
}

This code is assuming that the only bad status that getDatabase can return is DatabaseNotFound, which is an acceptable failure to ignore. But in the replset catalog manager it could also return HostUnreachable and in that case it is not okay to ignore that error.

Generated at Thu Feb 08 03:51:02 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.