-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: 6.0.6
-
Component/s: None
-
Cluster Scalability
-
ALL
-
3
Results are not being returned as expected when issuing what should be a targeted query against a zone-sharded cluster when one zone is down. Steps to reproduce (you can find the exact commands that I used here on github):
- Launch a 2-shard cluster ("0-deployCluster.mlaunch.sh")
- Tag each shard with a zone (US and WORLD). ("1-addShardstoZone.sh").
- Define the zone ranges such that a 'metadata.site' value of 'site1' is mapped to the US zone and a 'metadata.site' value of 'site2' is mapped to the WORLD zone. ("2-defineZoneRanges.sh")
- Shard a collection using a compound shard key: {'metadata.site':1, 'metadata.sensorID': 1}. ("3-shardCollection.sh")
- Insert test data. 2 records will suffice: one containing 'metadata.site'='site1' and another container 'metadata.site'='site2'. ("4-insertData.sh")
- Run the test scenario defined in "testSiteFailure.txt". Kill shard02 (corresponding to site2/WORLD), connect to the mongos, and run some queries. Note that a query on {"metadata.site":"site1"} should be a targeted query, and should succeed, but it does not. No results are returned.
Working with ratika.gandhi@mongodb.com to understand why results are not being returned when using the prefix of a compound shard key. Our documentation says this should work.
I tested this using Mongo 6.0.6