lte assertion in distinct_compound_index.js is in the wrong order

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • None
    • ALL
    • Query 2018-02-12
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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
            Reporter:
            Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: