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

Background indexes created through applyOps should run on the command thread

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 3.6.9, 4.0.5, 4.1.6
    • 3.6.11, 4.0.7, 4.1.7
    • None
    • None
    • Fully Compatible
    • ALL
    • v4.0, v3.6
    • Hide

      The following test reproduces this issue:

      (function() {
          "use strict";
       
          const dbName = "applyOpsReplicatedCreateIndexCrash";
          const collName = "coll";
       
          const rst = new ReplSetTest({nodes: 2});
          rst.startSet();
          rst.initiate();
          const db = rst.getPrimary().getDB(dbName);
          const coll = db.getCollection(collName);
       
          db.coll.drop();
          db.coll.insert({});
          db.adminCommand({
              applyOps: [{
                  op: 'c', ns: coll.getFullName(), o: {
                      createIndexes: coll.getName(),
                      v: 2,
                      background: {a: 1},
                      name: 'a_1_create_v2',
                      unknown: 1
                  }
              }]
          });
       
          rst.stopSet();
      })();
      

      Show
      The following test reproduces this issue: (function() { "use strict";   const dbName = "applyOpsReplicatedCreateIndexCrash"; const collName = "coll";   const rst = new ReplSetTest({nodes: 2}); rst.startSet(); rst.initiate(); const db = rst.getPrimary().getDB(dbName); const coll = db.getCollection(collName);   db.coll.drop(); db.coll.insert({}); db.adminCommand({ applyOps: [{ op: 'c', ns: coll.getFullName(), o: { createIndexes: coll.getName(), v: 2, background: {a: 1}, name: 'a_1_create_v2', unknown: 1 } }] });   rst.stopSet(); })();
    • Storage NYC 2019-01-14, Storage NYC 2019-01-28
    • 6
    • 5

    Description

      Fatal Assertion 50769 on invalid replicated index build, created via applyOps

      Attachments

        Issue Links

          Activity

            People

              louis.williams@mongodb.com Louis Williams
              james.wahlin@mongodb.com James Wahlin
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: