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

Profiling fails to save insert op in sharded cluster

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.6.0-rc3
    • Component/s: Sharding
    • Labels:
      None
    • Operating System:
      ALL

      Description

      Test below enables profiler on the shard and inserts 20,000 docs. Starts logging the following message on every insert after ~20,000 docs:

       m30999| 2014-03-31T06:55:55.948-0400 [conn2] ChunkManager: time to load chunks for test.foo: 0ms sequenceNumber: 4 version: 1|4||533949b659411fe095434ebe based on: 1|2||533949b659411fe095434ebe
       m30999| 2014-03-31T06:55:55.948-0400 [conn2] autosplitted test.foo shard: ns: test.foo, shard: shard0000:localhost:30000, lastmod: 1|2||000000000000000000000000, min: { x: 1.0 }, max: { x: MaxKey } on: { x: 11466.0 } (splitThreshold 471859) (migrate suggested)
       m30000| 2014-03-31T06:55:56.333-0400 [conn9] warning: Caught Assertion while trying to profile insert against test.foo: 13388 [test.foo] shard version not ok in Client::Context: this shard contains versioned chunks for test.foo, but no version set in request ( ns : test.foo, received : 0|0||000000000000000000000000, wanted : 1|4||533949b659411fe095434ebe, send )

      var st = new ShardingTest({shards: 1, mongos: 1});                                                                                                                                                   
      var db = st.getDB("test");                                                                           
      st.adminCommand({enablesharding: "test"});                                                           
      st.adminCommand({shardcollection : "test.foo", key: {x: 1}});                                        
                                                                                                           
      st.d0.getDB('test').setProfilingLevel(2);                                                            
                                                                                                           
      // Start a parallel shell to insert new documents on the primary.                                    
      inserter = startParallelShell('for( i = 1; i < 25000; ++i ) { db.foo.save( { x:i } );}');            
      inserter();                                                                                          
                                                                                                           
      printjson(st.printShardingStatus());                                                                 
      printjson(st.s0.getDB('test').getCollection('foo').stats());  

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              greg_10gen Greg Studer
              Reporter:
              pasette Daniel Pasette
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: