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

Background indexes created through applyOps should run on the command thread

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.6.9, 4.0.5, 4.1.6
    • Fix Version/s: 3.6.11, 4.0.7, 4.1.7
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.0, v3.6
    • Steps To Reproduce:
      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(); })();
    • Sprint:
      Storage NYC 2019-01-14, Storage NYC 2019-01-28
    • Linked BF Score:
      6
    • Story Points:
      5

      Description

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

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              louis.williams Louis Williams
              Reporter:
              james.wahlin James Wahlin
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: