[SERVER-42996] Move ApplierState to OplogApplier Created: 23/Aug/19  Updated: 06/Dec/22  Resolved: 08/Nov/19

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: A. Jesse Jiryu Davis Assignee: Backlog - Replication Team
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-41882 Finish the OplogApplier Closed
Problem/Incident
Related
related to SERVER-44533 Complete TODO listed in SERVER-42996 Closed
Assigned Teams:
Replication
Sprint: Repl 2019-09-23, Repl 2019-10-07, Repl 2019-10-21, Repl 2019-12-02
Participants:
Linked BF Score: 45

 Description   

ApplierState is an enum with values Running, Draining, and Stopped. It is currently owned by the ReplicationCoordinator. Move it to OplogApplier: it belongs there, and it will be easier to unittest drain mode once the OplogApplier and ReplicationCoordinator are less tightly coupled.

Currently, the oplog application code calls ReplicationCoordinator::getApplierState to determine its state. After this step, the oplog application code will own the ApplierState, and ReplicationCoordinator will call OplogApplier methods to change the state.



 Comments   
Comment by A. Jesse Jiryu Davis [ 08/Nov/19 ]

After investigating, we determined this was too hard and risky for the "Address tech debt in Oplog Application Path" project. If a future feature depends on better separation between OplogApplier and ReplicationCoordinator, we'll reconsider.

Comment by Githook User [ 09/Oct/19 ]

Author:

{'name': 'Mihai Andrei', 'email': 'mihai.andrei@mongodb.com'}

Message: Revert SERVER-42996 Move ApplierState to OplogApplier
Branch: master
https://github.com/mongodb/mongo/commit/6e136efbd50551965c17116d00e1f3179c039770

Comment by Githook User [ 08/Oct/19 ]

Author:

{'email': 'mihai.andrei@mongodb.com', 'name': 'Mihai Andrei'}

Message: SERVER-42996 Move ApplierState to OplogApplier
Branch: master
https://github.com/mongodb/mongo/commit/1d1379a2b019df47c8a49fdba107b46aa54736c7

Comment by Mihai Andrei [ 30/Sep/19 ]

Needs to wait for SyncTail to be fully merged into OplogApplierImpl (otherwise it is not possible for this line to work properly without exposing the ReplicationCoordinator's internal state).

Generated at Thu Feb 08 05:01:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.