[SERVER-38667] Notify IndexBuildsCoordinator of replica set member stepup and stepdown Created: 17/Dec/18  Updated: 29/Oct/23  Resolved: 11/Jul/19

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

Type: Task Priority: Major - P3
Reporter: Dianna Hohensee (Inactive) Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: index-repl
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-39484 Add step-up and step-down state trans... Closed
Backwards Compatibility: Fully Compatible
Sprint: Storage NYC 2019-01-14, Storage NYC 2019-02-25, Execution Team 2019-07-15
Participants:
Story Points: 5

 Description   

Add step-up and step-down hooks for the IndexBuildsCoordinator.

There's a field on the mongod implementation that indicates primary/secondary state https://github.com/mongodb/mongo/blob/5eca4a77da863bd4e68bf4eb7c2d0c920982f8b9/src/mongo/db/index_builds_coordinator_mongod.h#L137

And there are interface functions for setting primary and secondary, which look like they've been implemented in the mongod and embedded already. https://github.com/mongodb/mongo/blob/5eca4a77da863bd4e68bf4eb7c2d0c920982f8b9/src/mongo/db/index_builds_coordinator.h#L197-L198

We'll need to call the state change functions in here https://github.com/mongodb/mongo/blob/4d09b2e0a605aefd7adefda28e01e309bbf30883/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp#L483 and it looks like stepdown hooks go in here maybe https://github.com/mongodb/mongo/blob/4d09b2e0a605aefd7adefda28e01e309bbf30883/src/mongo/db/repl/replication_coordinator_impl.cpp#L2800 – check in with someone from repl to find out their preferences for new hook additions.



 Comments   
Comment by Githook User [ 11/Jul/19 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-38667 remove unused replication state notification functions from IndexBuildsCoordinator
Branch: master
https://github.com/mongodb/mongo/commit/adab6702bc9869557c14eb8b0e888c6e854f4593

Comment by Benety Goh [ 10/Jul/19 ]

Re-opening to remove unused functions from the IndexBuildsCoordinator interface.

Comment by Dianna Hohensee (Inactive) [ 08/Feb/19 ]

Decided not to do this. The IndexBuildsCoordinator will call into the replcoord to check repl member state. We don't have a known need for immediate action on state change.

Comment by Dianna Hohensee (Inactive) [ 29/Jan/19 ]

Can unlink the replcoord from the index builds coordinator library (adding in SERVER-37643) along with this change – switch out any ReplicationCoordinator::get(opCtx)->canAcceptWritesFor(opCtx, nss) checks with the _replState field that will be correctly set now.

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