Splits can fail if the split point was once a chunk boundary

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.5.4
    • Affects Version/s: 2.5.3
    • Component/s: Sharding
    • None
    • Fully Compatible
    • ALL
    • Hide
      var st = new ShardingTest({ shards: 2, mongos: 2 });
      st.stopBalancer();
      
      var configDB = st.s.getDB('config');
      configDB.adminCommand({ enableSharding: 'test' });
      configDB.adminCommand({ shardCollection: 'test.user', key: { x: 1 }});
      configDB.adminCommand({ split: 'test.user', middle: { x: 0 }});
      
      var configDB2 = st.s1.getDB('config');
      configDB2.adminCommand({ mergeChunks: 'test.user', bounds: [{ x: MinKey }, { x: MaxKey }]});
      
      // This test will pass if flushRouterConfig is called here.
      var res = configDB.adminCommand({ split: 'test.user', middle: { x: 0 }});
      assert(res.ok, 'command failed: ' + tojson(res));
      
      st.stop();
      
      Show
      var st = new ShardingTest({ shards: 2, mongos: 2 }); st.stopBalancer(); var configDB = st.s.getDB( 'config' ); configDB.adminCommand({ enableSharding: 'test' }); configDB.adminCommand({ shardCollection: 'test.user' , key: { x: 1 }}); configDB.adminCommand({ split: 'test.user' , middle: { x: 0 }}); var configDB2 = st.s1.getDB( 'config' ); configDB2.adminCommand({ mergeChunks: 'test.user' , bounds: [{ x: MinKey }, { x: MaxKey }]}); // This test will pass if flushRouterConfig is called here. var res = configDB.adminCommand({ split: 'test.user' , middle: { x: 0 }}); assert (res.ok, 'command failed: ' + tojson(res)); st.stop();
    • None
    • None
    • None
    • None
    • None
    • None
    • None

          Assignee:
          Randolph Tan
          Reporter:
          Randolph Tan
          Votes:
          0 Vote for this issue
          Watchers:
          1 Start watching this issue

            Created:
            Updated:
            Resolved: