[SERVER-57857] Impossible to change the sync source for the mongod Created: 21/Jun/21 Updated: 27/Oct/23 Resolved: 20/Jul/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Question | Priority: | Major - P3 |
| Reporter: | Konstantin Krasnov | Assignee: | Xuerui Fa |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Sprint: | Repl 2021-07-26 |
| Participants: |
| Description |
|
Hi, I want to change sync source for the mongod on core-storage106-dc2.example.com:
And an error is given:
Why is it getting an error?
How can I change sync source if the replicas have the same oplog optime? |
| Comments |
| Comment by Edwin Zhou [ 20/Jul/21 ] |
|
After some discussion with our internal engineering team, we've identified that during steady state replication, it's probable that all secondaries are caught up. In that case, changing sync sources will hit this error: InvalidSyncSource: Sync source must be ahead of me. to avoid forming a topology with a sync source cycle. We don't have any recommendations for manually changing a sync source to sync to a desired node during steady state replication. Given these circumstances, we believe this is working as designed. Best, |
| Comment by Edwin Zhou [ 12/Jul/21 ] |
|
Thanks for your patience while I investigate this issue. Selecting a syncSource is a temporary measure to override the default sync target for the current node. We should also expect the syncSource from a node to change from time to time depending on ping time and the state of other members' replication. You can find more information on how a sync source is selected in our docs. It seems that manually selecting a syncSource is unpredictable and may benefit from some clarification on if and how we can select a desired sync source from a node. I will pass this along to the replication team for further investigation. Best, |
| Comment by Konstantin Krasnov [ 05/Jul/21 ] |
|
Hi Edwin,
Please find attached files.
Best regards, Konstantin |
| Comment by Edwin Zhou [ 30/Jun/21 ] |
|
Thanks for your report and for your patience while we investigate this issue. It seems you're hitting the condition where the desired sync source has an optime equal to the node's optime. In order to investigate why the two nodes have the same oplog optime, can you please
Files uploaded to this portal are visible only to MongoDB employees and are routinely deleted after some time. Best, |
| Comment by Konstantin Krasnov [ 21/Jun/21 ] |
|
core-storage104-dc2.example.com and core-storage106-dc2.example.com is hidden replicas. |