[SERVER-39996] Setting ignorePrepared should happen outside of waitForReadConcern Created: 06/Mar/19  Updated: 29/Oct/23  Resolved: 26/Aug/19

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

Type: Improvement Priority: Major - P3
Reporter: Samyukta Lanka Assignee: Suganthi Mani
Resolution: Fixed Votes: 0
Labels: prepare_optional
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-39074 Update outside transaction erasing up... Closed
Backwards Compatibility: Fully Compatible
Sprint: Repl 2019-06-03, Repl 2019-06-17, Repl 2019-07-01, Repl 2019-07-15, Repl 2019-07-29, Repl 2019-08-12, Repl 2019-08-26, Repl 2019-09-09
Participants:

 Description   

Currently, we set ignorePrepared on the recovery unit in waitForReadConcern. But it is confusing to do that as a part of that function because setting ignorePrepared doesn't have to do with waiting for read concern. It would be better if we move the logic outside of that function and call it separately. We should also add a note on waitForReadConcern so that any new callers of it evaluate whether they need to set ignorePrepared.

This would also help prevent future bugs caused by someone adding a place to return in waitForReadConcern early, which would accidentally skip setting ignorePrepared.



 Comments   
Comment by Githook User [ 26/Aug/19 ]

Author:

{'username': 'smani87', 'email': 'suganthi.mani@mongodb.com', 'name': 'Suganthi Mani'}

Message: SERVER-39996 Moved setting ignorePrepared behavior outside of waitForReadConcern.
Branch: master
https://github.com/mongodb/mongo/commit/4197e3c394abea7d01084e035a6ce8af32dc1161

Comment by Judah Schvimer [ 06/Mar/19 ]

After discussing with Eric Milkie, we're moving this out of prepare and will do this in the beginning of 4.3 with a backport to 4.2.

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