[SERVER-43848] find/update/delete w/o shard key predicate under txn with snapshot read can miss documents Created: 04/Oct/19 Updated: 29/Oct/23 Resolved: 04/Mar/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 4.2.0 |
| Fix Version/s: | 4.2.6, 4.4.0-rc0, 4.7.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Randolph Tan | Assignee: | Randolph Tan |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | sharding-wfbf-day | ||
| 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, v4.0
|
||||||||
| Sprint: | Sharding 2020-03-09 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 7 | ||||||||
| Description |
|
Scenario: shardKey: x: 1 1. Txn sets read concern timestamp to t5. The issue here is that the shard version map only include shards with chunks and represents the mapping at t10 and not t5. In the case above, there were 2 shards that had chunks at t5, but only 1 shard that had chunks at t10. Even though the document is currently in shard1, the update/remove will not see it because it is running under the snapshot with ts = t5. |
| Comments |
| Comment by Githook User [ 08/Apr/20 ] |
|
Author: {'name': 'Randolph Tan', 'email': 'randolph@10gen.com', 'username': 'renctan'}Message: (cherry picked from commit 305bbe0ed709ffc88916093cfbd716bfb8fea60b) |
| Comment by Githook User [ 26/Mar/20 ] |
|
Author: {'name': 'Randolph Tan', 'username': 'renctan', 'email': 'randolph@10gen.com'}Message: (cherry picked from commit 305bbe0ed709ffc88916093cfbd716bfb8fea60b) |
| Comment by Githook User [ 04/Mar/20 ] |
|
Author: {'username': 'renctan', 'name': 'Randolph Tan', 'email': 'randolph@10gen.com'}Message: |
| Comment by Randolph Tan [ 09/Oct/19 ] |
|
I think you're right. Updated title. |
| Comment by Jack Mulrow [ 09/Oct/19 ] |
|
I think this affects reads too, since they also use ChunkManager::getShardIdsForRange() when targeting shards (through the getTargetedShardsForQuery() helper). |