[SERVER-63430] The isStandaloneOrPrimary flag from the PreWriteFilter should be computed once per operation Created: 08/Feb/22  Updated: 29/Oct/23  Resolved: 10/Feb/22

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 5.3.0

Type: Task Priority: Major - P3
Reporter: Sergi Mateo Bellido Assignee: Sergi Mateo Bellido
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Sharding EMEA 2022-02-21
Participants:

 Description   

We were computing the value of the flag every time we were reacquiring the locks (i.e. after a yield). However this is not really needed because:

  • If the node was a primary and stepped down, the ongoing operation will be aborted.
  • It is not possible for a secondary to step up without completing first the oplog catch-up.


 Comments   
Comment by Githook User [ 10/Feb/22 ]

Author:

{'name': 'Sergi Mateo Bellido', 'email': 'sergi.mateo-bellido@mongodb.com', 'username': 'smateo'}

Message: SERVER-63430 Compute the isStandaloneOrPrimary flag once
Branch: master
https://github.com/mongodb/mongo/commit/20d836242f5b0187776a2e690ce9bfa4ddc4d476

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