[SERVER-21034] Sharding should log ignored deletions at higher log level Created: 20/Oct/15  Updated: 25/Jan/17  Resolved: 30/Oct/15

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 3.2.0-rc2

Type: Bug Priority: Trivial - P5
Reporter: Kaloian Manassiev Assignee: Randolph Tan
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding C (11/20/15)
Participants:

 Description   

This code in the migration destination manager would delete migrated deletion operations if they do not belong to the chunk which is currently being migrated. This happens in order to avoid propagating deletions to chunks which are still in the process of being cleaned up from the last move chunk round.

We shouldn't be logging these at a default log level.



 Comments   
Comment by Githook User [ 30/Oct/15 ]

Author:

{u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}

Message: SERVER-21034 Remove log of xfer deletes on data that the shard does not own
Branch: master
https://github.com/mongodb/mongo/commit/3c16f067e897bf07fc9e5fc3f1514c41438b9e04

Comment by Githook User [ 30/Oct/15 ]

Author:

{u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}

Message: SERVER-21034 Sharding should log ignored deletions at higher log level
Branch: master
https://github.com/mongodb/mongo/commit/db0e3e67c7bd0f8319103ea0aba98f8085256ab7

Comment by Daniel Pasette (Inactive) [ 21/Oct/15 ]

I have a test case that is spamming the logs with this message. I'll attach the test case (which may be just pathological because of the TTL index).

var collName = 'topchunk';                                                                           
var st = new ShardingTest({ shards: 2, other: {                                                      
                            shardOptions: { storageEngine: "wiredTiger"}, nopreallocj: 1 }           
                          });                                                                        
var testDB = st.s.getDB('test');                                                                     
var coll = testDB[collName];                                                                         
coll.drop();                                                                                         
testDB.adminCommand({ enableSharding: 'test' });                                                     
testDB.adminCommand({ shardCollection: coll.getFullName(), key: { _id: 1 }});                        
coll.createIndex({t:1}, {expireAfterSeconds: 10*60});                                                
st.startBalancer();                                                                                  
var mongos = st.s;                                                                                   
                                                                                                     
var threads = 4;                                                                                     
var time = 10;                                                                                       
var batchSize = 1000;                                                                                
                                                                                                     
var docs = []                                                                                        
var longString = new Array().join(" ");                                                              
for (var i = 0; i < batchSize; i++) {                                                                
    docs.push( {x: longString, ttl: {"#CUR_DATE": 0}} );                                             
}                                                                                                    
                                                                                                     
function testInsert(docs, threads, time) {                                                           
    var benchArgs = { ops : [ { ns : coll.getFullName() ,                                            
                                op : "insert" ,                                                      
                                doc : docs} ],                                                       
                      parallel : threads,                                                            
                      seconds : time,                                                                
                      totals : true ,                                                                
                      host : mongos.host}                                                            
    res = benchRun(benchArgs);                                                                       
    return res;                                                                                      
}                                                                                                    
                                                                                                     
// insert a bunch of documents and track ops/sec                                                     
while(1) {                                                                                           
    var result = testInsert(docs, threads, time);                                                    
    printjson(result);                                                                               
} 

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