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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 6.0.3, 6.2.0-rc3, 6.3.0-rc0
    • 6.0.4, 6.3.0-rc0
    • 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

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: