mongos count command should use CountRequest

XMLWordPrintableJSON

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

      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 - Query Team (Inactive)
            Reporter:
            David Storch
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: