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

Fatal assertion when failing to create temporary mapReduce collection on secondary

    • Query
    • Fully Compatible
    • ALL
    • Hide
      var rst = new ReplSetTest({nodes: 2});
      rst.startSet();
      rst.initiate();
      rst.awaitReplication();
      
      var adminDB = rst.getPrimary().getDB('admin');
      
      // Ensure the namespace exists
      adminDB.system.roles.insert({});
      
      // merge or replace can be used as the out type
      adminDB.system.roles.mapReduce(Function.prototype, Function.prototype, {out: {merge: 'mrOutput'}});
      rst.awaitReplication();
      
      Show
      var rst = new ReplSetTest({nodes: 2}); rst.startSet(); rst.initiate(); rst.awaitReplication(); var adminDB = rst.getPrimary().getDB('admin'); // Ensure the namespace exists adminDB.system.roles.insert({}); // merge or replace can be used as the out type adminDB.system.roles.mapReduce(Function.prototype, Function.prototype, {out: {merge: 'mrOutput'}}); rst.awaitReplication();
    • Query 2017-03-27, Query 2017-04-17

      This bug is non-fatal in versions earlier than 3.1.2 (i.e., prior to the changes in SERVER-15207).

      It requires the mapReduce to be performed on a special collection like "admin.system.roles" or "admin.system.users".

      3.1.2+:

       W ACCESS   [repl writer worker 15] Skipping bad update to roles collection in oplog. NoSuchKey Missing expected field "role" Oplog entry: i
       W ACCESS   [repl writer worker 15] Skipping bad update to roles collection in oplog. NoSuchKey Missing expected field "role" Oplog entry: i
       E REPL     [repl writer worker 15] Failed command { create: "tmp.mr.system.roles_0", temp: true } on admin with status BadValue cannot write to 'admin.tmp.mr.system.roles_0' during oplog application
       I -        [repl writer worker 15] Fatal Assertion 16359
      

      3.1.1 and 3.0.4:

      W ACCESS   [repl writer worker 15] Skipping bad update to roles collection in oplog. NoSuchKey Missing expected field "role" Oplog entry: i
      W REPL     [repl writer worker 15] Failed command { create: "tmp.mr.system.roles_0", temp: true } on admin with status BadValue cannot write to 'admin.tmp.mr.system.roles_0' during oplog application
      I COMMAND  [repl writer worker 15] CMD: drop admin.tmp.mr.system.roles_0
      W REPL     [repl writer worker 15] Failed command { drop: "tmp.mr.system.roles_0" } on admin with status UnknownError ns not found during oplog application
      

            Assignee:
            backlog-server-query Backlog - Query Team (Inactive)
            Reporter:
            kamran.khan Kamran K.
            Votes:
            1 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: