listIndexes and listCollections on mongos fail with an invalid HostAndPort string after enabling the new mongos cursor manager

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 3.1.9
    • Affects Version/s: None
    • Component/s: Querying, Sharding
    • None
    • Fully Compatible
    • ALL
    • Hide

      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.

      Show
      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.
    • Quint 9 09/18/15, QuInt A (10/12/15)
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            J Rassi (Inactive)
            Reporter:
            David Storch
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: