[SERVER-41100] Update lastWriteOpTime for prepareTransaction on secondary Created: 10/May/19  Updated: 29/Oct/23  Resolved: 20/May/19

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 4.1.12

Type: Bug Priority: Major - P3
Reporter: Siyuan Zhou Assignee: Vesselina Ratcheva (Inactive)
Resolution: Fixed Votes: 0
Labels: prepare_durability
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2019-05-20, Repl 2019-06-03
Participants:
Linked BF Score: 15

 Description   

lastWriteOpTime will be used to maintain the oplog chain when writing commit oplog entry. Since the secondary doesn't update it right now, committing the transaction will not have the link from the commit entry to the prepare.

We should also add invariants to wherever prevOpTime shouldn't be null when writing oplog entries.



 Comments   
Comment by Githook User [ 20/May/19 ]

Author:

{'name': 'Vesselina Ratcheva', 'email': 'vesselina.ratcheva@10gen.com', 'username': 'vessy-mongodb'}

Message: SERVER-41100 Update lastWriteOpTime for prepareTransaction on secondaries
Branch: master
https://github.com/mongodb/mongo/commit/cb7eff01f675d854d7484bd68ce298a8817d2af2

Comment by Judah Schvimer [ 10/May/19 ]

This occurs because refreshFromStorageIfNeeded isn't called on secondaries. We should make sure that all of the other fields that refreshFromStorageIfNeeded refreshes are also set properly by prepare, commit, and abort on secondaries.

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