[SERVER-66211] setFCV downgrade can overwrite the state for the latest txnNumber during internal transactions config.transactions entries removal Created: 04/May/22  Updated: 29/Oct/23  Resolved: 04/May/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.0.0-rc5, 6.1.0-rc0

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

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v6.0
Sprint: Sharding NYC 2022-05-16
Participants:

 Description   

SERVER-58761 made setFVC do the following:

For each session that has an internal session that executed retryable internal transactions for a command with txnNumber (i.e. as indicated by its lsid.txnNumber) greater or equal to the latest txnNumber in the parent session, update the config.transactions entry for the parent session to have txnNumber equal to that lsid.txnNumber and lastWriteOpTime equal to {t: 1, ts: Timestamp(1, 0)}.

However, it doesn't specify the "txnNum" field in the update query so if there is a new transaction or retryable write that starts and commits on the parent session between the write is issued by setFCV and when the write is applied, that write would end up overwriting the state for the latest txnNumber.



 Comments   
Comment by Githook User [ 04/May/22 ]

Author:

{'name': 'Cheahuychou Mao', 'email': 'mao.cheahuychou@gmail.com', 'username': 'cheahuychou'}

Message: SERVER-66211 setFCV downgrade can overwrite the state for the latest txnNumber during internal transactions config.transactions entries removal
Branch: master
https://github.com/mongodb/mongo/commit/248fa79fd395f335724cabd706428ef2cc1e2b84

Comment by Githook User [ 04/May/22 ]

Author:

{'name': 'Cheahuychou Mao', 'email': 'mao.cheahuychou@gmail.com', 'username': 'cheahuychou'}

Message: SERVER-66211 setFCV downgrade can overwrite the state for the latest txnNumber during internal transactions config.transactions entries removal
Branch: v6.0
https://github.com/mongodb/mongo/commit/387a30c6a387ea31a114fa4a0140ad12fdfee85a

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