[SERVER-44373] recover_multiple_prepared_transactions_startup.js test should wait for majority commit point to advance before committing a prepared transaction Created: 01/Nov/19  Updated: 29/Oct/23  Resolved: 01/Nov/19

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

Type: Bug Priority: Major - P3
Reporter: Lingzhi Deng Assignee: Lingzhi Deng
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:
v4.2
Sprint: Repl 2019-11-04
Participants:
Linked BF Score: 8

 Description   

recover_multiple_prepared_transactions_startup.js test should wait for majority commit point to advance before committing a prepared transaction.

Even though the test was running with a single node, after a restart, the lastCommitted is not set until the _firstOpTimeOfMyTerm is durable ( i.e. flushed) and by default we use the lastDurable to calculate the commit point. Therefore, the test races with the WTJournalFlusher thread flushing the first oplog entry after the restart. Committing a prepared transaction with lastCommitted being null is not allowed and will give error "commitTransaction for a prepared transaction cannot be run before its prepare oplog entry has been majority committed".



 Comments   
Comment by Githook User [ 19/Nov/19 ]

Author:

{'username': 'ldennis', 'email': 'lingzhi.deng@mongodb.com', 'name': 'Lingzhi Deng'}

Message: SERVER-44373: recover_multiple_prepared_transactions_startup.js test should wait for majority commit point to advance before committing a prepared transaction

(cherry picked from commit 8191b9a55df49629d7f8aec22a4e9c9414e9e914)
Branch: v4.2
https://github.com/mongodb/mongo/commit/5075945096ab03b81277450c0ea7b24bb727c0cf

Comment by Githook User [ 01/Nov/19 ]

Author:

{'username': 'ldennis', 'email': 'lingzhi.deng@mongodb.com', 'name': 'Lingzhi Deng'}

Message: SERVER-44373: recover_multiple_prepared_transactions_startup.js test should wait for majority commit point to advance before committing a prepared transaction
Branch: master
https://github.com/mongodb/mongo/commit/8191b9a55df49629d7f8aec22a4e9c9414e9e914

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