[SERVER-54629] Remove skip indexConsistencyCheck in collation_targeting_inherited.js Created: 19/Feb/21  Updated: 29/Oct/23  Resolved: 19/Mar/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 4.9.0
Fix Version/s: 4.9.0

Type: Task Priority: Major - P3
Reporter: Jordi Serra Torrens Assignee: Jordi Serra Torrens
Resolution: Fixed Votes: 0
Labels: sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-54132 Review usages of config.collections '... Closed
related to SERVER-52545 Specify input/output to listIndexes c... Closed
Backwards Compatibility: Fully Compatible
Participants:

 Description   

On SERVER-54132 we realized that the indexConsistencyCheck was not being run because of this check for {dropped: false}, as we no longer have the 'dropped' field in config.collections.

As this was fixed, collation_targeting_inherited.js was failing because of inconsistent index. The problem seems to be that the shards report the index spec elements in different order:
 

[js_test:collation_targeting_inherited] Error: assert failed : found inconsistent indexes for test.case_insensitive: {
[js_test:collation_targeting_inherited] 	"collation_targeting_inherited-rs1" : [
[js_test:collation_targeting_inherited] 		{
[js_test:collation_targeting_inherited] 			"spec" : {
[js_test:collation_targeting_inherited] 				"v" : 2,
[js_test:collation_targeting_inherited] 				"key" : {
[js_test:collation_targeting_inherited] 					"geo" : "2dsphere"
[js_test:collation_targeting_inherited] 				},
[js_test:collation_targeting_inherited] 				"name" : "geo_2dsphere",
[js_test:collation_targeting_inherited] 				"collation" : {
[js_test:collation_targeting_inherited] 					"locale" : "en_US",
[js_test:collation_targeting_inherited] 					"caseLevel" : false,
[js_test:collation_targeting_inherited] 					"caseFirst" : "off",
[js_test:collation_targeting_inherited] 					"strength" : 2,
[js_test:collation_targeting_inherited] 					"numericOrdering" : false,
[js_test:collation_targeting_inherited] 					"alternate" : "non-ignorable",
[js_test:collation_targeting_inherited] 					"maxVariable" : "punct",
[js_test:collation_targeting_inherited] 					"normalization" : false,
[js_test:collation_targeting_inherited] 					"backwards" : false,
[js_test:collation_targeting_inherited] 					"version" : "57.1"
[js_test:collation_targeting_inherited] 				},
[js_test:collation_targeting_inherited] 				"2dsphereIndexVersion" : 3
[js_test:collation_targeting_inherited] 			}
[js_test:collation_targeting_inherited] 		}
[js_test:collation_targeting_inherited] 	],
[js_test:collation_targeting_inherited] 	"collation_targeting_inherited-rs2" : [
[js_test:collation_targeting_inherited] 		{
[js_test:collation_targeting_inherited] 			"spec" : {
[js_test:collation_targeting_inherited] 				"v" : 2,
[js_test:collation_targeting_inherited] 				"key" : {
[js_test:collation_targeting_inherited] 					"geo" : "2dsphere"
[js_test:collation_targeting_inherited] 				},
[js_test:collation_targeting_inherited] 				"name" : "geo_2dsphere",
[js_test:collation_targeting_inherited] 				"2dsphereIndexVersion" : 3,
[js_test:collation_targeting_inherited] 				"collation" : {
[js_test:collation_targeting_inherited] 					"locale" : "en_US",
[js_test:collation_targeting_inherited] 					"caseLevel" : false,
[js_test:collation_targeting_inherited] 					"caseFirst" : "off",
[js_test:collation_targeting_inherited] 					"strength" : 2,
[js_test:collation_targeting_inherited] 					"numericOrdering" : false,
[js_test:collation_targeting_inherited] 					"alternate" : "non-ignorable",
[js_test:collation_targeting_inherited] 					"maxVariable" : "punct",
[js_test:collation_targeting_inherited] 					"normalization" : false,
[js_test:collation_targeting_inherited] 					"backwards" : false,
[js_test:collation_targeting_inherited] 					"version" : "57.1"
[js_test:collation_targeting_inherited] 				}
[js_test:collation_targeting_inherited] 			}
[js_test:collation_targeting_inherited] 		}
[js_test:collation_targeting_inherited] 	],
[js_test:collation_targeting_inherited] 	"collation_targeting_inherited-rs0" : [
[js_test:collation_targeting_inherited] 		{
[js_test:collation_targeting_inherited] 			"spec" : {
[js_test:collation_targeting_inherited] 				"v" : 2,
[js_test:collation_targeting_inherited] 				"key" : {
[js_test:collation_targeting_inherited] 					"geo" : "2dsphere"
[js_test:collation_targeting_inherited] 				},
[js_test:collation_targeting_inherited] 				"name" : "geo_2dsphere",
[js_test:collation_targeting_inherited] 				"2dsphereIndexVersion" : 3,
[js_test:collation_targeting_inherited] 				"collation" : {
[js_test:collation_targeting_inherited] 					"locale" : "en_US",
[js_test:collation_targeting_inherited] 					"caseLevel" : false,
[js_test:collation_targeting_inherited] 					"caseFirst" : "off",
[js_test:collation_targeting_inherited] 					"strength" : 2,
[js_test:collation_targeting_inherited] 					"numericOrdering" : false,
[js_test:collation_targeting_inherited] 					"alternate" : "non-ignorable",
[js_test:collation_targeting_inherited] 					"maxVariable" : "punct",
[js_test:collation_targeting_inherited] 					"normalization" : false,
[js_test:collation_targeting_inherited] 					"backwards" : false,
[js_test:collation_targeting_inherited] 					"version" : "57.1"
[js_test:collation_targeting_inherited] 				}
[js_test:collation_targeting_inherited] 			}
[js_test:collation_targeting_inherited] 		}
[js_test:collation_targeting_inherited] 	]
[js_test:collation_targeting_inherited] } :
[js_test:collation_targeting_inherited] doassert@src/mongo/shell/assert.js:20:14
[js_test:collation_targeting_inherited] assert@src/mongo/shell/assert.js:151:9
[js_test:collation_targeting_inherited] ShardingTest.prototype.checkIndexesConsistentAcrossCluster@jstests/libs/override_methods/check_indexes_consistent_across_cluster.js:81:13
[js_test:collation_targeting_inherited] ShardingTest/this.stop@src/mongo/shell/shardingtest.js:425:9
[js_test:collation_targeting_inherited] @jstests/sharding/query/collation_targeting_inherited.js:516:1
[js_test:collation_targeting_inherited] @jstests/sharding/query/collation_targeting_inherited.js:2:2
[js_test:collation_targeting_inherited] failed to load: jstests/sharding/query/collation_targeting_inherited.js
[js_test:collation_targeting_inherited] exiting with code -3

Check whether this is expected. If so, change the 
ShardedIndexUtil.findInconsistentIndexesAcrossShards to compare the index specs without taking into account the element order.
 



 Comments   
Comment by Githook User [ 19/Mar/21 ]

Author:

{'name': 'Jordi Serra Torrens', 'email': 'jordi.serra-torrens@mongodb.com', 'username': 'jordist'}

Message: SERVER-54629: Remove skip indexConsistencyCheck in collation_targeting_inherited.js
Branch: master
https://github.com/mongodb/mongo/commit/7d02a73b2cbecf175a27b6221e3bbef6b2db861d

Comment by Jordi Serra Torrens [ 18/Mar/21 ]

The root of the failures in collation_targeting_inherited.js (which we only noticed after SERVER-54132 allowed the checks to be ran again) is SERVER-52545. In that ticket, some comparisons of index spec bsons are made to ignore the fields order. In this ticket we will change this comparison to ignore the order as well and reenable the test in collation_targeting_inherited.js

Generated at Thu Feb 08 05:34:03 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.