Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-25311

mongos count command should use CountRequest

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying, Sharding
    • Labels:
    • Query

      The mongod implementation of the count command parses the request using a utility called CountRequest (see https://github.com/mongodb/mongo/blob/r3.3.10/src/mongo/db/commands/count_cmd.cpp#L141). The mongos implementation, however, has old parsing code which was never ported to use CountRequest:

      https://github.com/mongodb/mongo/blob/r3.3.10/src/mongo/s/commands/cluster_count_cmd.cpp#L110-L128

      This is bad because it means there is more code to maintain and makes it more likely that the two implementations will get out of sync. Therefore, the mongos implementation should be updated to also use CountRequest.

            Assignee:
            backlog-server-query Backlog - Query Team (Inactive)
            Reporter:
            david.storch@mongodb.com David Storch
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: