BugZero found this defect 1999 days ago.
Data sources
All data on this page is proprietary to BugZero® or gathered from public sources
3/11/2024
MongoDB Server
No affected releases provided.
No fixed releases provided.
The comments of ReplicationCoordinator::awaitReplication indicate that a NotMaster error code should be returned if called on a node that is not in primary state. The method's logic, however, does not align with this. If called from a secondary, the method will trivially fail with a PrimarySteppedDown error message, which seems incorrect. We should fix this and make sure to clarify this method's pre-condition i.e. that it is only valid to call it on a primary node, if that is the intended behavior.
samy.lanka commented on Mon, 11 Mar 2024 15:19:23 +0000: Hi nihcas700@gmail.com, Thank you for reaching out, this ticket is available for someone outside of MongoDB to pick up! JIRAUSER1277501 commented on Wed, 6 Mar 2024 05:40:18 +0000: Hi team, is this ticket available for somebody outside Mongodb to pick, would be happy to contribute. tess.avitabile commented on Wed, 15 Jan 2020 17:52:53 +0000: Leaving this ticket as-is, since it's a neweng ticket. siyuan.zhou@10gen.com commented on Fri, 27 Sep 2019 18:22:18 +0000: Thanks! My understanding of this ticket is to change the error code instead of the comments, so I'd prefer to leave this ticket as-is for now. lingzhi.deng commented on Thu, 26 Sep 2019 20:34:58 +0000: No, it is not covered. I didn't change any error code handling. But I can do that if all we want is to change the comment. siyuan.zhou@10gen.com commented on Thu, 26 Sep 2019 20:23:57 +0000: ldeng, do you think this is covered by your work? greg.mckeon commented on Mon, 3 Dec 2018 18:47:30 +0000: We should make sure the PrimarySteppedDown error code is the correct one to use and update the comments to indicate that this isn't intended to be called from a secondary. william.schultz commented on Wed, 28 Nov 2018 19:34:12 +0000: The ReplicationCoordinatorImpl::waitUntilOpTimeForRead methods appear to serve an analogous purpose for secondary reads, though perhaps in the future it would be worth combining these interfaces into something that serves both purposes.