[SERVER-48565] Ghost timestamps on primaries can break causality in multi-document "snapshot" reads Created: 03/Jun/20 Updated: 29/Oct/23 Resolved: 05/Jun/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 4.4.0-rc7 |
| Fix Version/s: | 4.4.0-rc9, 4.7.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Louis Williams | Assignee: | Louis Williams |
| 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
|
||||||||
| Sprint: | Execution Team 2020-06-15 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 11 | ||||||||
| Description |
|
Due to behavior described in If a ghost timestamp is used by a concurrent operation, an operation may observe all_durable moving backward after waiting for it to advance from a call to waitForAllEarlierOplogWritesToBeVisible. This means that a transaction with a readConcern "afterClusterTime: T" may read at a timestamp less than T. I believe we can fix this by making all readers of all_durable go through getAllDurableTimestamp, which tracks and only returns the highest seen timestamp, preventing callers from seeing all_durable move backward.
*: all_durable is calculated as the minimum of (highest committed timestamp, oldest active timestamped transaction - 1) |
| Comments |
| Comment by Githook User [ 05/Jun/20 ] |
|
Author: {'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}Message: This ensures that no operations observe the all_durable timestamp moving (cherry picked from commit 00b9d54bfc7f8fc442b55ca5a55625bddd59c8da) |
| Comment by Githook User [ 04/Jun/20 ] |
|
Author: {'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}Message: This ensures that no operations observe the all_durable timestamp moving |