[SERVER-36283] Initial sync oplog application does not set oplog visibility on completion Created: 25/Jul/18  Updated: 29/Oct/23  Resolved: 27/Jul/18

Status: Closed
Project: Core Server
Component/s: Replication, Storage
Affects Version/s: None
Fix Version/s: 4.0.1, 4.1.2

Type: Bug Priority: Major - P3
Reporter: Daniel Gottlieb (Inactive) Assignee: Daniel Gottlieb (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.0
Sprint: Storage NYC 2018-07-30
Participants:
Linked BF Score: 15

 Description   

For correctness and performance reasons, secondaries do not update oplog visibility when write units of work commit, but rather at the end of applying a batch.

The batch completion logic for initial sync is separate and does not seem to contain an analogous clause.

This can result in hangs finishing up initial sync.



 Comments   
Comment by Githook User [ 27/Jul/18 ]

Author:

{'name': 'Daniel Gottlieb', 'email': 'daniel.gottlieb@mongodb.com', 'username': 'dgottlieb'}

Message: SERVER-36283: Have initial sync completion advance oplog visibility to the initial sync time.

(cherry picked from commit 9568dc3d2fb7244d75744c70c3ac98a8719ca9ab)
Branch: v4.0
https://github.com/mongodb/mongo/commit/9d5a4298d2dd876d0762b27221332f0d9cc1871e

Comment by Githook User [ 27/Jul/18 ]

Author:

{'name': 'Daniel Gottlieb', 'email': 'daniel.gottlieb@mongodb.com', 'username': 'dgottlieb'}

Message: SERVER-36283: Have initial sync completion advance oplog visibility to the initial sync time.
Branch: master
https://github.com/mongodb/mongo/commit/9568dc3d2fb7244d75744c70c3ac98a8719ca9ab

Comment by Daniel Gottlieb (Inactive) [ 25/Jul/18 ]

Good question. I don't believe this affects 3.6. Advancing visibility has changed.

While 3.6 does have the waitForAllEarlierWritesToBeVisible requirement to complete initial sync, the 3.6 version of setOldestTimestamp advanced the oplog visibility timestamp. Oplog application during initial sync ("startup2") advances the oldest timestamp to the end of each batch.

Comment by Bruce Lucas (Inactive) [ 25/Jul/18 ]

Does this affect 3.6 or only 4.0?

Generated at Thu Feb 08 04:42:38 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.