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

Add a case to accept to hide an index if it is not compatible with shard key

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.0.4, 6.3.0-rc0
    • Affects Version/s: 6.0.3, 6.2.0-rc3, 6.3.0-rc0
    • Component/s: None
    • Fully Compatible
    • ALL
    • v6.2, v6.0
    • Hide

      Set up a sharded cluster with primary nodes at v5.0 a secondary nodes at 6.0.
       

      const mongos = st.s; const ns = "test.foo";
      const db = mongos.getDB("test"); 
      const coll = db.getCollection("foo");   
      
      st.adminCommand({enablesharding:db.getName(), primaryShard:st.shard1.shardName}); 
      st.adminCommand({shardcollection:ns, key: {skey:1}}); 
      
      assert.commandWorked(coll.dropIndexes()); 
      assert.commandWorked(coll.createIndex({"a":1})); 
      assert.commandWorked(coll.hideIndex("a_1"));
      Show
      Set up a sharded cluster with primary nodes at v5.0 a secondary nodes at 6.0.   const mongos = st.s; const ns = "test.foo" ; const db = mongos.getDB( "test" ); const coll = db.getCollection( "foo" );   st.adminCommand({enablesharding:db.getName(), primaryShard:st.shard1.shardName}); st.adminCommand({shardcollection:ns, key: {skey:1}}); assert .commandWorked(coll.dropIndexes()); assert .commandWorked(coll.createIndex({ "a" :1})); assert .commandWorked(coll.hideIndex( "a_1" ));
    • Sharding EMEA 2022-11-28, Sharding EMEA 2022-12-12, Sharding EMEA 2022-12-26
    • 135

      Add a case to accept to hide an index if it is not compatible with shard key although we don't have a shard key index.

            Assignee:
            pol.pinol@mongodb.com Pol Pinol
            Reporter:
            pol.pinol@mongodb.com Pol Pinol
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: