[SERVER-48369] Fix prepare_conflict.js to use write concern "majority" when creating an index Created: 21/May/20  Updated: 29/Oct/23  Resolved: 21/May/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.2.8, 4.4.0-rc8, 4.7.0

Type: Bug Priority: Major - P3
Reporter: Samyukta Lanka Assignee: Samyukta Lanka
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.4, v4.2
Sprint: Repl 2020-06-01
Participants:
Linked BF Score: 13

 Description   

This index build should be run with write concern "majority" because it will set a collection's minVisibleSnapshot when committing. If the index build's commit timestamp isn't included in all_durable, then this transaction could establish a readTimestamp earlier than the collection's minVisibleSnapshot (since it is run with snapshot read concern without atClusterTime, it will choose the all_durable timestamp as its readTimestamp). This causes the transaction to fail with snapshot unavailable. In order to fix this, the index build's commit timestamp should be included in all_durable so that any oplog holes before the collection's minVisibleSnapshot are filled before starting the transction.



 Comments   
Comment by Githook User [ 02/Jun/20 ]

Author:

{'name': 'Samy Lanka', 'email': 'samy.lanka@mongodb.com', 'username': 'lankas'}

Message: SERVER-48369 Fix prepare_conflict.js to use write concern majority when creating an index

(cherry picked from commit 4b7b1c39fb1becc2c0c385d14d7d57dfe5ed7373)
Branch: v4.2
https://github.com/mongodb/mongo/commit/0237c8441b0ba1dfef31c22cad82d4b4570aac16

Comment by Githook User [ 28/May/20 ]

Author:

{'name': 'Samy Lanka', 'email': 'samy.lanka@mongodb.com', 'username': 'lankas'}

Message: SERVER-48369 Fix prepare_conflict.js to use write concern majority when creating an index

(cherry picked from commit 4b7b1c39fb1becc2c0c385d14d7d57dfe5ed7373)
Branch: v4.4
https://github.com/mongodb/mongo/commit/d84de21543f3eb858c2f2043f8bce4b251611065

Comment by Samyukta Lanka [ 28/May/20 ]

Author:

{'name': 'Samy Lanka', 'email': 'samy.lanka@mongodb.com', 'username': 'lankas'}

Message: SERVER-48369 Fix prepare_conflict.js to use write concern majority when creating an index

Branch: master
https://github.com/mongodb/mongo/commit/4b7b1c39fb1becc2c0c385d14d7d57dfe5ed7373

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