[SERVER-59831] WTUniqueIndex::_insert expects secondaries to pass in dupsAllowed=true Created: 08/Sep/21 Updated: 29/Oct/23 Resolved: 19/Nov/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.2.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Daniel Gottlieb (Inactive) | Assignee: | Yuhong Zhang |
| 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: | Execution Team 2021-11-15, Execution Team 2021-11-29 | ||||||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||||||
| Linked BF Score: | 152 | ||||||||||||||||||||||||||||||||||||||||
| Description |
|
Using dupsAllowed=false when inserting into a secondary unique index results in inserting + removing on a "prefix" document to serialize access to enforce unique constraints. However the preceding comment states the expectation that only primaries are executing that code path. This results in unnecessary writes to these prefix documents. Moreover, these writes can result in out of order update chains as secondaries can process oplog entries out of order. |
| Comments |
| Comment by Githook User [ 19/Nov/21 ] |
|
Author: {'name': 'Yuhong Zhang', 'email': 'danielzhangyh@gmail.com', 'username': 'YuhongZhang98'}Message: |
| Comment by Githook User [ 11/Nov/21 ] |
|
Author: {'name': 'Yuhong Zhang', 'email': 'danielzhangyh@gmail.com', 'username': 'YuhongZhang98'}Message: Revert " This reverts commit a52ee5999b0fc7adcbce77b37a7313d4585a4cbf. |
| Comment by Githook User [ 04/Nov/21 ] |
|
Author: {'name': 'Yuhong Zhang', 'email': 'danielzhangyh@gmail.com', 'username': 'YuhongZhang98'}Message: |
| Comment by Daniel Gottlieb (Inactive) [ 09/Sep/21 ] |
|
Correct, I believe we unconditionally pass in dupsAllowed=false when inserting keys. My waning memory tells me this might have changed with 2 phase index builds because we wanted secondaries to capture conflicts in the event they were promoted to primary and wanted to commit the index build. But I couldn't tell if we were using some different code path to have storage return possible conflicts. |
| Comment by Louis Williams [ 09/Sep/21 ] |
|
daniel.gottlieb, are you seeing that secondaries are not passing dupsAllowed=true? Do you know why not? |