[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: |
|
||||||||
| 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: (cherry picked from commit 4b7b1c39fb1becc2c0c385d14d7d57dfe5ed7373) |
| Comment by Githook User [ 28/May/20 ] |
|
Author: {'name': 'Samy Lanka', 'email': 'samy.lanka@mongodb.com', 'username': 'lankas'}Message: (cherry picked from commit 4b7b1c39fb1becc2c0c385d14d7d57dfe5ed7373) |
| Comment by Samyukta Lanka [ 28/May/20 ] |
|
Author: {'name': 'Samy Lanka', 'email': 'samy.lanka@mongodb.com', 'username': 'lankas'}Message: Branch: master |