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

Warning logged when incremental MR collections are unsuccessfully dropped on secondaries

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.6.5, 2.7.7
    • Component/s: MapReduce
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Completed:
    • Steps To Reproduce:
      Hide

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

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

      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

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: