[SERVER-33006] lte assertion in distinct_compound_index.js is in the wrong order Created: 30/Jan/18  Updated: 29/Oct/23  Resolved: 30/Jan/18

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 3.7.2

Type: Bug Priority: Major - P3
Reporter: Charlie Swanson Assignee: Charlie Swanson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Duplicate
is duplicated by SERVER-33007 lte assertion in distinct_compound_in... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Query 2018-02-12
Participants:
Linked BF Score: 0

 Description   

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));



 Comments   
Comment by Githook User [ 30/Jan/18 ]

Author:

{'email': 'charlie.swanson@mongodb.com', 'name': 'Charlie Swanson', 'username': 'cswanson310'}

Message: SERVER-33006 Fix lte assertion in distinct_compound_index.js
Branch: master
https://github.com/mongodb/mongo/commit/cb2c4112975002330cf76b3ea8404fa06800e6c5

Generated at Thu Feb 08 04:31:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.