[SERVER-13413] Profiling fails to save insert op in sharded cluster Created: 31/Mar/14  Updated: 11/Jul/16  Resolved: 31/Mar/14

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 2.6.0-rc3

Type: Bug Priority: Major - P3
Reporter: Daniel Pasette (Inactive) Assignee: Greg Studer
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-13414 profiling can throw stale config afte... Closed
Operating System: ALL
Participants:

 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());  



 Comments   
Comment by Githook User [ 31/Mar/14 ]

Author:

{u'username': u'gregstuder', u'name': u'Greg Studer', u'email': u'greg@10gen.com'}

Message: SERVER-13413 profiling should not do version checks against op namespace
(cherry picked from commit 7ccb298ff2790f4d4b5e844e4124f9051a4ec437)
Branch: v2.6
https://github.com/mongodb/mongo/commit/2927031d377002fd483ada3d63c2a58a3fa8b0b7

Comment by Githook User [ 31/Mar/14 ]

Author:

{u'username': u'gregstuder', u'name': u'Greg Studer', u'email': u'greg@10gen.com'}

Message: SERVER-13413 profiling should not do version checks against op namespace
Branch: master
https://github.com/mongodb/mongo/commit/7ccb298ff2790f4d4b5e844e4124f9051a4ec437

Comment by Greg Studer [ 31/Mar/14 ]

Issue probably affects other than -rc2

Generated at Thu Feb 08 03:31:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.