Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-54629

Remove skip indexConsistencyCheck in collation_targeting_inherited.js

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 4.9.0
    • 4.9.0
    • Sharding
    • Fully Compatible

    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.
       

      Attachments

        Issue Links

          Activity

            People

              jordi.serra-torrens@mongodb.com Jordi Serra Torrens
              jordi.serra-torrens@mongodb.com Jordi Serra Torrens
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: