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

lte assertion in distinct_compound_index.js is in the wrong order

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.7.2
    • Affects Version/s: None
    • Component/s: Querying
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Query 2018-02-12
    • 0

      When we introduced the 2-shards sharded collections passthrough, this assertion was typed in the wrong order:

         // If the collection is sharded, we expect at most 2 distinct values per shard. If the
         // collection is not sharded, we expect 2 returned.
         assert.lte(2 * FixtureHelpers.numberOfShardsForCollection(coll),
                    explain_distinct_with_query.executionStats.nReturned);
      

      That should be flipped:

         // If the collection is sharded, we expect at most 2 distinct values per shard. If the
         // collection is not sharded, we expect 2 returned.
         assert.lte(explain_distinct_with_query.executionStats.nReturned,
                    2 * FixtureHelpers.numberOfShardsForCollection(coll));
      

            Assignee:
            charlie.swanson@mongodb.com Charlie Swanson
            Reporter:
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: