[SERVER-83977] Core list_catalog.js should take into account the createIndex might not hit every shard Created: 07/Dec/23  Updated: 22/Dec/23  Resolved: 22/Dec/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 7.3.0-rc0
Fix Version/s: 7.3.0-rc0

Type: Bug Priority: Major - P3
Reporter: Enrico Golfieri Assignee: Marcos José Grillo Ramirez
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-83211 Enable counting index tests on sharde... Backlog
Assigned Teams:
Catalog and Routing
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: CAR Team 2023-12-25
Participants:
Linked BF Score: 147

 Description   

The test  perform:

  • createCollection(nss)
  • createIndex(nss)

After a first check, the collection runs $listCatalog Collectionless (against the adminDb) and later ensures that every entry (local catalog of shard X) has a fixed expected number of indexes.

This test always works on any suite because:

  • in case of replica-set we have one entry per nss
  • in case of {create...} on a sharded cluster we have 1 chunk per nss (collection always on the primary)
  • in case on "sharded_jscore_passthough" we shard using hashed shard keys, having one chunk per shard

Until now the createIndex always targetted either the primary or every shard, ensuring to have the expected number of indexes on every non-empty entry

After the introduction of the "unsplittable_collections_on_any_shard_jscore_passthrough" we now create a the collection on a random shard using the createUnsplittableCollection test command. In case the collection is not created on primary we have a situation where:

  • the primary shard only has {_id } index
  • the second shard has { _id } + the created indexes

This leads the test to fail since the number of expected indexes on the first shard does not match. 
The goal of this ticket is to:

  • evaluate whether to ban the test from the suite (not advised)
  • rewrite the checkEntries function to ensure exactly 1 entry has the number of expected indexes


 Comments   
Comment by Githook User [ 22/Dec/23 ]

Author:

{'name': 'Marcos Grillo', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}

Message: SERVER-83977 Make list_catalog.js to properly check catalog metadata with unsplittable collections that are not in the primary shard (#17733)

GitOrigin-RevId: 278271d7e4b5bd41b43e93080a29ae503c37086d
Branch: master
https://github.com/mongodb/mongo/commit/45dc4e71e968e346bd6383247d03f5e2ccf851e6

Generated at Thu Feb 08 06:53:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.