[SERVER-47881] Make ReplicationCoordinatorImpl::getLatestWriteOpTime return StatusWith<OpTime> Created: 01/May/20  Updated: 29/Oct/23  Resolved: 04/May/20

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 4.4.0-rc3
Fix Version/s: 4.4.0-rc4, 4.7.0

Type: Improvement Priority: Major - P3
Reporter: Kelsey Schubert Assignee: Lingzhi Deng
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File asserts-on-upgrade.png    
Issue Links:
Backports
Related
related to SERVER-47926 Less verbose uassert Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.4
Sprint: Repl 2020-05-18
Participants:
Linked BF Score: 35

 Description   

Observed while dogfooding on an internal cluster. After upgrade, whenever the automation agent would write to local.clustermanager, we would throw this uassert:

https://github.com/mongodb/mongo/blob/f0d436d8a5f169d5ae992073e949823b64e27795/src/mongo/db/repl/replication_coordinator_impl.cpp#L2312-L2314



 Comments   
Comment by Githook User [ 05/May/20 ]

Author:

{'name': 'Lingzhi Deng', 'email': 'lingzhi.deng@mongodb.com', 'username': 'ldennis'}

Message: SERVER-47881: Make getLatestWriteOpTime return StatusWith<OpTime>

(cherry picked from commit 892bce4528b2ec97d9f264b5a982d54da0e4971d)
Branch: v4.4
https://github.com/mongodb/mongo/commit/da18d99f15a19713af4035a5d2a6ef4e7caab46d

Comment by Githook User [ 04/May/20 ]

Author:

{'name': 'Lingzhi Deng', 'email': 'lingzhi.deng@mongodb.com', 'username': 'ldennis'}

Message: SERVER-47881: Make getLatestWriteOpTime return StatusWith<OpTime>
Branch: master
https://github.com/mongodb/mongo/commit/892bce4528b2ec97d9f264b5a982d54da0e4971d

Comment by Lingzhi Deng [ 01/May/20 ]

ReplicationCoordinatorImpl::getLatestWriteOpTime is only called here in ReplClientInfo::setLastOpToSystemLastOpTim. And we ignore NotMaster errors. It seems weird if this error gets leaked to clients.

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