[SERVER-23427] Add test to ensure that read-only operations against the config db continue to work if the config server primary is unreachable from mongos Created: 30/Mar/16  Updated: 25/Jan/17  Resolved: 11/Apr/16

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 3.2.4
Fix Version/s: 3.3.5

Type: Bug 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

Attachments: File primary_shard_server_blackholed_from_mongos.js    
Issue Links:
Related
related to SERVER-7423 Support commands for read preference Closed
is related to SERVER-22043 count helper doesn't apply read prefe... Closed
is related to SERVER-23625 Some read-only operations (eg count,a... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 13 (04/22/16)
Participants:

 Description   

Original Title and description: Some read-only operations (eg count,aggregate) fail against the config database when the config server primary is unreachable
If you have a sharded cluster where the mongos cannot reach the config server primary, and you try to run count on any collection in the config server, it fails saying it cannot find the primary, even if you set the read preference to 'secondary'. This seems to only affect 3.2, this seems to have been fixed somehow in master



 Comments   
Comment by Githook User [ 11/Apr/16 ]

Author:

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

Message: SERVER-23427 Skip primary_config_server_blackholed_from_mongos.js test in config stepdown suite
Branch: master
https://github.com/mongodb/mongo/commit/a2192342c342638c3ba173ea4cbb05ffbf1d322c

Comment by Githook User [ 11/Apr/16 ]

Author:

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

Message: SERVER-23427 Add jstest of read-only commands run against config db when config server primary is unreachable by mongos
Branch: master
https://github.com/mongodb/mongo/commit/b8497be45d68fbf643a42d7197eb3abdba4ffc14

Comment by Spencer Brody (Inactive) [ 08/Apr/16 ]

The reason count doesn't work in 3.2 when the primary config is unreachable is due to SERVER-22043 - the shell helper isn't passing the read preference properly.

I will leave this ticket open just for the addition of the new jstest I wrote to prevent regressions here.

Comment by Spencer Brody (Inactive) [ 30/Mar/16 ]

Attaching jstest that reproduces this issue in 3.2

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