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

ClusterFind::runQuery cant not detect if a collection became unsharded

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.1.9
    • Affects Version/s: None
    • Component/s: Querying, Sharding
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Hide

      Set readMode=commands and resmoke jstests/sharding/zero_shard_version.js

      another way to reproduce is to run in mongo shell

      var st = new ShardingTest({ shards: 2, mongos: 4 });
      st.stopBalancer();
      
      var testDB_s0 = st.s.getDB('test');
      testDB_s0.adminCommand({ enableSharding: 'test' });
      testDB_s0.adminCommand({ movePrimary: 'test', to: 'shard0001' });
      testDB_s0.adminCommand({ shardCollection: 'test.user', key: { x: 1 }});
      
      var testDB_s1 = st.s1.getDB('test');
      testDB_s1.user.insert({ x: 1 });
      testDB_s1.adminCommand({ moveChunk: 'test.user', find: { x: 0 }, to: 'shard0000' });
      
      testDB_s0.user.findOne({ x: 1 });
      
      
      testDB_s1.user.drop();
      testDB_s1.user.insert({ x: 10 });
      
      testDB_s0.user.findOne({ x: 10 });
      

      The last statement will produce an assert

      Show
      Set readMode=commands and resmoke jstests/sharding/zero_shard_version.js another way to reproduce is to run in mongo shell var st = new ShardingTest({ shards: 2, mongos: 4 }); st.stopBalancer(); var testDB_s0 = st.s.getDB( 'test' ); testDB_s0.adminCommand({ enableSharding: 'test' }); testDB_s0.adminCommand({ movePrimary: 'test' , to: 'shard0001' }); testDB_s0.adminCommand({ shardCollection: 'test.user' , key: { x: 1 }}); var testDB_s1 = st.s1.getDB( 'test' ); testDB_s1.user.insert({ x: 1 }); testDB_s1.adminCommand({ moveChunk: 'test.user' , find: { x: 0 }, to: 'shard0000' }); testDB_s0.user.findOne({ x: 1 }); testDB_s1.user.drop(); testDB_s1.user.insert({ x: 10 }); testDB_s0.user.findOne({ x: 10 }); The last statement will produce an assert

      ClusterFind::runQuery cant not detect if a collection became unsharded and throws a 10181 assert

            Assignee:
            misha.tyulenev@mongodb.com Misha Tyulenev (Inactive)
            Reporter:
            misha.tyulenev@mongodb.com Misha Tyulenev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: