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

two_phase_drops.js pendingDropRegex is not robust to similar names

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.7.0
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Fully Compatible
    • ALL
    • Repl 2020-05-18
    • 48

      In this example, I would expect the "find" function to return the other collection.

      MongoDB shell version v4.4.0-rc3
      > collName = "testcoll"
      testcoll
      > a= new RegExp("system\.drop\..*\." + collName + "$");
      /system.drop..*.testcoll$/
      > b = ["system.drop.1588746254i1t1.r_testcoll", "system.drop.1588746258i5t1.testcoll"]
      [
      	"system.drop.1588746254i1t1.r_testcoll",
      	"system.drop.1588746258i5t1.testcoll"
      ]
      > b.find(c => a.test(c))
      system.drop.1588746254i1t1.r_testcoll
      

            Assignee:
            judah.schvimer@mongodb.com Judah Schvimer
            Reporter:
            judah.schvimer@mongodb.com Judah Schvimer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: