[SERVER-20351] listIndexes and listCollections on mongos fail with an invalid HostAndPort string after enabling the new mongos cursor manager Created: 10/Sep/15  Updated: 07/Oct/15  Resolved: 21/Sep/15

Status: Closed
Project: Core Server
Component/s: Querying, Sharding
Affects Version/s: None
Fix Version/s: 3.1.9

Type: Bug Priority: Major - P3
Reporter: David Storch Assignee: J Rassi
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

Change the value of the setParameter useClusterClientCursor to true. This causes the FSM workload jstests/concurrency/fsm_workloads/list_indexes.js to fail when run in a sharded configuration with replica sets as the shards.

Sprint: Quint 9 09/18/15, QuInt A (10/12/15)
Participants:

 Description   

The listIndexes and the listCollections commands both pass the connection string for the targeted shard to storePossibleCursor():

https://github.com/mongodb/mongo/blob/7f1b07c07b2cdad14a60c2251839bf701b9b3818/src/mongo/s/commands/commands_public.cpp#L1449
https://github.com/mongodb/mongo/blob/7f1b07c07b2cdad14a60c2251839bf701b9b3818/src/mongo/s/commands/commands_public.cpp#L1407

If configured to use the new mongos cursor manager, storePossibleCursor() will try to parse the connection string as a HostAndPort string. (It does this because it needs the HostAndPort associated with the remote cursor in order to issue getMore and killCursors commands to the right place.) A replica set connection string does not parse as a valid HostAndPort, causing the command to fail. Instead, listIndexes and listCollections must pass the HostAndPort string of the replica set's primary node.



 Comments   
Comment by Githook User [ 21/Sep/15 ]

Author:

{u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}

Message: SERVER-20351 Ensure storePossibleCursor() called w/ valid HostAndPort
Branch: master
https://github.com/mongodb/mongo/commit/578eba8c80615f525147d27e7f4317b000d37da7

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