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

Remove redundant rollback handling on index drops

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.9.0
    • Affects Version/s: None
    • Component/s: Storage
    • Labels:
    • Fully Compatible
    • Storage NYC 2019-01-14, Execution Team 2021-02-22
    • 137

      With the completion of SERVER-38548 making index drops two-phase, we can now remove the special handling where we rebuild indexes on rollback because the index table was dropped immediately and the dropIndex gets rolled back.

      I believe this code in kv_storage_engine.cpp does the special handling and can now be eliminated safely.

      And in this bit, it should also be safe to refactor away the "!foundIdent" piece. Dan G's explanation of that scenario was as follows, which won't happen anymore either with SERVER-38548 complete,

      "
      Suppose the oplog contains:
      ts: 10, createIndex: "a"
      ts: 30, dropIndex: "a"
      If the secondary completes the background index and timestamps the `ready: true` write at ts: 20, rolling back to 25 will show a `ready: true` index, but no underlying table because it was dropped. (edited)
      "

      Note: A good way to test that those code paths are inactive might be to add some invariants that they never occur anymore and run a full evergreen patch.

            Assignee:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Reporter:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: