two_phase_drops.js pendingDropRegex is not robust to similar names

XMLWordPrintableJSON

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

      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
            Reporter:
            Judah Schvimer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: