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

Setting ignorePrepared should happen outside of waitForReadConcern

    • Fully Compatible
    • Repl 2019-06-03, Repl 2019-06-17, Repl 2019-07-01, Repl 2019-07-15, Repl 2019-07-29, Repl 2019-08-12, Repl 2019-08-26, Repl 2019-09-09

      Currently, we set ignorePrepared on the recovery unit in waitForReadConcern. But it is confusing to do that as a part of that function because setting ignorePrepared doesn't have to do with waiting for read concern. It would be better if we move the logic outside of that function and call it separately. We should also add a note on waitForReadConcern so that any new callers of it evaluate whether they need to set ignorePrepared.

      This would also help prevent future bugs caused by someone adding a place to return in waitForReadConcern early, which would accidentally skip setting ignorePrepared.

            Assignee:
            suganthi.mani@mongodb.com Suganthi Mani
            Reporter:
            samy.lanka@mongodb.com Samyukta Lanka
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: