[SERVER-77298] Prevent fassert after killing opCtx as part of reconstructing prepared transactions after initial sync Created: 18/May/23  Updated: 29/Oct/23  Resolved: 21/Jun/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.0-rc0, 5.0.19, 4.4.23, 7.0.0-rc6, 6.0.8

Type: Bug Priority: Major - P3
Reporter: Xuerui Fa Assignee: Xuerui Fa
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.0, v6.0, v5.0, v4.4
Sprint: Repl 2023-05-29, Repl 2023-06-12, Repl 2023-06-26
Participants:
Linked BF Score: 105

 Description   

Currently, reconstructPreparedTransactions() fasserts that there was no error while applying operations. However, in initial sync, we allow the opCtx to be interrupted while we are calling reconstructPreparedTransactions(). As a result, we may fassert if we kill a session during execution of that function. We should ensure that we do not fassert due to interrupts. This can potentially be done with runWithoutInterruptionExceptAtGlobalShutdown or setKillOpsExempt.



 Comments   
Comment by Githook User [ 23/Jun/23 ]

Author:

{'name': 'XueruiFa', 'email': 'xuerui.fa@mongodb.com', 'username': 'XueruiFa'}

Message: SERVER-77298: Prevent fassert after killing opCtx as part of reconstructing prepared txns

(cherry picked from commit bbf5b82b5712828f651c966303763a45f83ff3cf)
Branch: v5.0
https://github.com/mongodb/mongo/commit/a4dcf21ec698f2c9f3f57173dbb3dc4cf7b1ba70

Comment by Githook User [ 21/Jun/23 ]

Author:

{'name': 'XueruiFa', 'email': 'xuerui.fa@mongodb.com', 'username': 'XueruiFa'}

Message: SERVER-77298: Prevent fassert after killing opCtx as part of reconstructing prepared txns
Branch: v7.0
https://github.com/mongodb/mongo/commit/9d09104202bbfd83cf1b8a665964b02014bd11d0

Comment by Githook User [ 21/Jun/23 ]

Author:

{'name': 'XueruiFa', 'email': 'xuerui.fa@mongodb.com', 'username': 'XueruiFa'}

Message: SERVER-77298: Prevent fassert after killing opCtx as part of reconstructing prepared txns
Branch: v6.0
https://github.com/mongodb/mongo/commit/611d46011bbd9d5de3930681a6d6b4ec9bb52a2d

Comment by Githook User [ 21/Jun/23 ]

Author:

{'name': 'XueruiFa', 'email': 'xuerui.fa@mongodb.com', 'username': 'XueruiFa'}

Message: SERVER-77298: Prevent fassert after killing opCtx as part of reconstructing prepared txns
Branch: v4.4
https://github.com/mongodb/mongo/commit/3abca02e5d101defc884c6cb202ca9ae66759fb8

Comment by Githook User [ 15/Jun/23 ]

Author:

{'name': 'XueruiFa', 'email': 'xuerui.fa@mongodb.com', 'username': 'XueruiFa'}

Message: SERVER-77298: Prevent fassert after killing opCtx as part of reconstructing prepared txns
Branch: master
https://github.com/mongodb/mongo/commit/bbf5b82b5712828f651c966303763a45f83ff3cf

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