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

appliedThrough document write and background validation reads could use the same timestamp

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Replication
    • Labels:
      None
    • Operating System:
      ALL

      Description

      Background validation reads at the all_durable timestamp. My understanding is that on secondaries, the all_durable timestamp can advance before a batch application completes, i.e. being ahead of the lastApplied timestamp.

      It is possible for the oplog applier to write (commit) the appliedThrough document using the timestamp of the last oplog entry in the batch while the background validation is reading at the all_durable which could be the same as the timestamp used in the appliedThrough write.

      Actually, collection validations take the PBWM lock and should conflict with oplog application. But unfortunately, by the time we write the appliedThrough, we already release the PBWM lock (which is only held in _applyOplogBatch). So background validation can start reading from all_durable which would be the timestamp of the last oplog entry in the batch by then while the oplog applier thread is trying to write using that same timestamp. And this violates WT's assertion that commit timestamp is newer than all readers. This assertion is currently disabled.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              milkie Eric Milkie
              Reporter:
              lingzhi.deng Lingzhi Deng
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: