[SERVER-66032] Secondary oplog application failure for prepared internal transactions that span an FCV change Created: 27/Apr/22  Updated: 29/Oct/23  Resolved: 28/Apr/22

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

Type: Task 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
Backport Requested:
v6.0
Sprint: Sharding 2022-05-02
Participants:

 Description   

Consider a replica set with a primary and a secondary:

  1. The FCV is 6.0. An internal transaction (one with the new session id format) begins on the primary and passes this FCV check.
  2. The setFCV command starts and updates the target version in the FCV document to 5.0. The in-memory FCV is now "downgrading to 5.0". 
  3. Right before the setFCV command starts aborting unprepared transactions, the internal transaction above enters the prepared state. So the internal transaction does not get aborted.
  4. The secondary applies the write to the FCV document and updates its in-memory FCV "downgrading to 5.0". 
  5. The secondary applies the applyOps oplog entries for the prepared internal transaction but cannot to do so because of the the FCV check above so it hits this fassert.

The issue is that the secondary shouldn't check the FCV since the check has already been done by the primary. 



 Comments   
Comment by Githook User [ 28/Apr/22 ]

Author:

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

Message: SERVER-66032 Secondary oplog application failure for prepared internal transactions that span an FCV change

(cherry picked from commit ef9865164e5932a636b11b5373f3c4b38a490df6)
Branch: v6.0
https://github.com/mongodb/mongo/commit/715c8344c0c325f69b2a8dc7485834e55f5a6b7a

Comment by Githook User [ 28/Apr/22 ]

Author:

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

Message: SERVER-66032 Secondary oplog application failure for prepared internal transactions that span an FCV change
Branch: master
https://github.com/mongodb/mongo/commit/ef9865164e5932a636b11b5373f3c4b38a490df6

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