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

Change oplog fetching query to read beyond lastApplied

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Replication

      In SERVER-84195, we changed sync source selection to use lastWritten instead of lastApplied. However, when we do oplog fetching , we use a local read against the sync source, which will be transformed to a PIT read at lastApplied if the sync source is a secondary. This can cause a problem in the following case(T1 < T2 < T3):

      • Node A is a secondary and lastWritten(A)=T3, lastApplied(A)=T1
      • Node B is another secondary and lastWritten(B)=T2
      • Node B changes its sync source to be A because A's lastWritten is greater than B's.
      • Node B sends a find cmd to Node A but Node A turns that into a snapshot read at T1, which will give Node B nothing. 
      • Node B goes into an unexpected rollback.

            Assignee:
            Unassigned Unassigned
            Reporter:
            jiawei.yang@mongodb.com Jiawei Yang
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated: