[SERVER-48459] Race in non_transaction_snapshot_reads_retry.js Created: 28/May/20 Updated: 29/Oct/23 Resolved: 01/Jun/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 4.7.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | A. Jesse Jiryu Davis | Assignee: | A. Jesse Jiryu Davis |
| 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 | ||||
| Sprint: | Repl 2020-06-01 | ||||
| Participants: | |||||
| Linked BF Score: | 22 | ||||
| Comments |
| Comment by A. Jesse Jiryu Davis [ 01/Jun/20 ] |
|
In the old code:
However, between steps 1 and 2 it's possible for some other write to occur at timestamp T. (Lingzhi noticed that in the build failure, a config server finished building an index on a config colleciton, which advanced the clusterTime.) Then at step 2 we select T for the read timestamp. Sometimes this is possible: insertTS < history expiration time < T < updateTS At step 7, the read proceeds with timestamp T, which is still valid. There is no SnapshotTooOld error, and we retrieve the version of the document before it was updated, and the test fails. The new code sleeps after updating the document instead of before, to ensure that the oldest valid read timestamp is >= updateTS. |
| Comment by Githook User [ 01/Jun/20 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}Message: |