[SERVER-14168] Warning logged when incremental MR collections are unsuccessfully dropped on secondaries Created: 04/Jun/14  Updated: 11/Mar/15  Resolved: 09/Sep/14

Status: Closed
Project: Core Server
Component/s: MapReduce
Affects Version/s: None
Fix Version/s: 2.6.5, 2.7.7

Type: Bug Priority: Minor - P4
Reporter: Kamran K. Assignee: Mathias Stearn
Resolution: Done Votes: 1
Labels: 28qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-13981 Temporary map/reduce collections are ... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Steps To Reproduce:

function createReplSet() {
    var replSet = new ReplSetTest({
        name: 'mapReduceReplSet',
        nodes: 2
    });
 
    replSet.startSet();
    replSet.initiate();
    replSet.awaitSecondaryNodes();
    return replSet;
}
 
(function testIncrementalCollectionsAreNotReplicated() {
    var replSet = createReplSet();
 
    var primaryColl = replSet.getPrimary().getDB('mapReduce').testColl;
    primaryColl.drop();
 
    // insert some dummy docs
    for (var i = 0; i < 20; i++) {
        primaryColl.insert({foo: i});
    }
 
    var mapFunction = function() {
        emit(this.foo, 1);
    };
    var reduceFunction = function() {
        return 1;
    };
 
    // these lines actually trigger the warning
    primaryColl.mapReduce(mapFunction, reduceFunction, {out: 'temp_coll'});
    replSet.awaitReplication();
 
    replSet.stopSet();
})();

Participants:

 Description   

The fix for SERVER-13981 purposely allows drop commands for incremental MapReduce collections to be replicated--even though the preceding createCollection commands are not replicated. As a result, a warning like this is logged:

[repl writer worker 1] warning: repl Failed command { drop: "tmp.mr.testColl_0_inc" } on mapReduce with status UnknownError ns not found during oplog application

It'd be nice to prevent this (potentially confusing) warning from being triggered and logged.


Version: 2.6.2-rc0



 Comments   
Comment by Githook User [ 17/Sep/14 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-14168 Don't logOp drop of "inc" collection in MR

The creation and inserts into it are not logOp'd so logging the drop lead to
a warning being printed on secondaries.

(cherry picked from commit 69e509c06de65ae0cd49805841e3d6018ac6e6bc)
Branch: v2.6
https://github.com/mongodb/mongo/commit/d024587b174d1328361d78b3220794c4b941258b

Comment by Githook User [ 09/Sep/14 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-14168 Don't logOp drop of "inc" collection in MR

The creation and inserts into it are not logOp'd so logging the drop lead to
a warning being printed on secondaries.
Branch: master
https://github.com/mongodb/mongo/commit/69e509c06de65ae0cd49805841e3d6018ac6e6bc

Comment by João Soares [ 31/Aug/14 ]

I see these warnings on my secondaries' logs all the time, would be nice to get a workaround for this...

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