[SERVER-61185] Use prefix_search for unique index lookup Created: 02/Nov/21 Updated: 30/Jan/24 Resolved: 18/Jan/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.3.0, 4.4.18, 5.0.14 |
| Type: | Improvement | 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 | ||||||||||||||||||||||||||||||||||||||||||||||||
| Backport Requested: |
v5.0, v4.4
|
||||||||||||||||||||||||||||||||||||||||||||||||
| Sprint: | Execution Team 2021-12-27, Execution Team 2022-01-10, Execution Team 2022-01-24 | ||||||||||||||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||||||||||||||||||||||||||||||||||
| Linked BF Score: | 15 | ||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
Re-implement |
| Comments |
| Comment by Louis Williams [ 13/Oct/22 ] |
|
This change improves the performance of inserting documents into collections with unique indexes. The change was not backported uniformly to all branches. For 4.4: For 5.0: For all newer versions, this behavior is enabled by default and cannot be disabled. |
| Comment by Githook User [ 13/Oct/22 ] |
|
Author: {'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}Message: (cherry picked from commits f18bb1e1c2d7bedeb3c08964e6a65bcc794e2a2a and 5923aa87d869a12d40ce605f3aee69d47314aabf) |
| Comment by Githook User [ 28/Sep/22 ] |
|
Author: {'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}Message: (cherry picked from commits f18bb1e1c2d7bedeb3c08964e6a65bcc794e2a2a and 5923aa87d869a12d40ce605f3aee69d47314aabf) |
| Comment by Githook User [ 13/Jan/22 ] |
|
Author: {'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}Message: |
| Comment by Louis Williams [ 13/Jan/22 ] |
|
etienne.petrel, wow, thanks for identifying my mistake! I will add you to the next code review. |
| Comment by Etienne Petrel [ 13/Jan/22 ] |
|
alex.podelko, I agree with Monica, we don't expect any perf regression. I had a look at the code changes that should re-enable the prefix search option. However we need to be careful as I think the changes are not correct (louis.williams), the option is called prefix_search and not prefix_key, see the definition here. Please make sure the option is enabled with the correct name, an example can be seen here. Let us know if this helps. |
| Comment by Alex Podelko (Inactive) [ 12/Jan/22 ] |
|
monica.ng I am not aware about a regression - but that fix was supposed to fix multiple regressions: BF-22130 BF-23346 BF-22529. Doesn't look like it did. chenhao.qu etienne.petrel luke.pearson jim.oleary |
| Comment by Monica Ng [ 12/Jan/22 ] |
|
I don't expect it to have a performance impact but I agree with Chenhao, if there is a regression we can have a closer look into it. |
| Comment by Chenhao Qu [ 12/Jan/22 ] |
|
monica.ng etienne.petrel jie.chen luke.pearson Do you guys expect |
| Comment by Chenhao Qu [ 12/Jan/22 ] |
|
louis.williams I expect no change for the performance. |
| Comment by Louis Williams [ 12/Jan/22 ] |
|
alex.podelko, the re-enabled prefix_key feature includes correctness fixes from |
| Comment by Githook User [ 11/Jan/22 ] |
|
Author: {'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}Message: |