[SERVER-68361] LogTransactionOperationsForShardingHandler::commit misses transferring documents from prepared and non-prepared transactions changing a document's shard key value Created: 27/Jul/22 Updated: 29/Oct/23 Resolved: 10/Nov/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 4.2.0, 4.4.0, 5.0.0, 6.0.0, 6.1.0-rc3 |
| Fix Version/s: | 6.1.1, 4.2.24, 4.4.19, 5.0.15, 6.0.4, 6.2.0-rc0 |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Randolph Tan | Assignee: | Randolph Tan |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | sharding-nyc-subteam1 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||||||||||||||
| Backport Requested: |
v6.1, v6.0, v5.0, v4.4, v4.2
|
||||||||||||||||||||||||||||||||||||
| Sprint: | Sharding 2022-08-08, Sharding 2022-08-22, Sharding 2022-09-05, Sharding 2022-09-19, Sharding NYC 2022-11-14 | ||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||
| Linked BF Score: | 113 | ||||||||||||||||||||||||||||||||||||
| Story Points: | 5 | ||||||||||||||||||||||||||||||||||||
| Description |
Original summaryInvestigate getPreImageDocumentKey calls in LogTransactionOperationsForShardingHandler::commit Original descriptionIt is called a few times around here: But there appears to be no code setting the value. |
| Comments |
| Comment by Githook User [ 21/Nov/22 ] | |||||||
|
Author: {'name': 'Randolph Tan', 'email': 'randolph@10gen.com', 'username': 'renctan'}Message: (cherry picked from commit e9858528d75b8b56211799c982f836b21912e780) | |||||||
| Comment by Githook User [ 18/Nov/22 ] | |||||||
|
Author: {'name': 'Randolph Tan', 'email': 'randolph@10gen.com', 'username': 'renctan'}Message: (cherry picked from commit 051e9310e027a52591ae9100078c24efafebad47) | |||||||
| Comment by Githook User [ 16/Nov/22 ] | |||||||
|
Author: {'name': 'Randolph Tan', 'email': 'randolph@10gen.com', 'username': 'renctan'}Message: (cherry picked from commit e8ee517f32043af220c8db1a739c2d80b2cb0969) | |||||||
| Comment by Githook User [ 14/Nov/22 ] | |||||||
|
Author: {'name': 'Randolph Tan', 'email': 'randolph@10gen.com', 'username': 'renctan'}Message: (cherry picked from commit 2061d2244caf64e2fee1b42418cd3a557d028e8c) | |||||||
| Comment by Githook User [ 14/Nov/22 ] | |||||||
|
Author: {'name': 'Randolph Tan', 'email': 'randolph@10gen.com', 'username': 'renctan'}Message: (cherry picked from commit 2061d2244caf64e2fee1b42418cd3a557d028e8c) | |||||||
| Comment by Githook User [ 10/Nov/22 ] | |||||||
|
Author: {'name': 'Randolph Tan', 'email': 'randolph@10gen.com', 'username': 'renctan'}Message: | |||||||
| Comment by Max Hirschhorn [ 27/Jul/22 ] | |||||||
|
In addition to Randolph's observation that ReplOperation::setPreImageDocumentKey() isn't being called, it also noticed isInRange() is designed to extract the shard key value from the full document but may be called with a document key instead for op=u and op=d. This may mean the behavior for a shard key pattern using nested fields is also improper (see
|