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

createIndexes should set the latest optime on its opCtx to meet writeConcern if no indexes are found to need building

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.3.1
    • Component/s: Storage
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Execution Team 2019-07-15

      Description

      I haven't tested this, only code inspection, but createIndexes returns OK if it find all indexes to already exist / be being built. I don't see any code setting the latest optime on the opCtx, so I think we are not going to wait for writeConcern correctly if no writes are done by the operation thread.

      Foreground index builds would have been misbehaving, since they could block behind other foreground builds and then see that everything is already built and return without a write.

      With SERVER-40927, to wait for background index builds to finish before returning, we'll have the same problem as foreground.

      This would be a longstanding issue, if it does exist.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              benety.goh Benety Goh
              Reporter:
              dianna.hohensee Dianna Hohensee
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: