[SERVER-82597] Improve ReplicationConsistencyMarkersImpl::_upsertOplogTruncateAfterPointDocument Created: 30/Oct/23 Updated: 05/Feb/24 Resolved: 01/Feb/24 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 8.0.0-rc0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Mark Benvenuto | Assignee: | Scott Li |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | perf-8.0, perf-tiger, perf-tiger-handoff, perf-tiger-poc, perf-tiger-q4, repl-shortlist | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Assigned Teams: |
Replication
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Sprint: | Repl 2023-11-27, Repl 2023-12-11, Repl 2023-12-25, Repl 2024-01-08, Repl 2024-01-22, Repl 2024-02-05 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
Going directly to the storage engine is cheaper then going through the query engine. It avoids the overhead of allocating/deallocating the QE stages and walking the associated extra code. ReplicationConsistencyMarkersImpl::_upsertOplogTruncateAfterPointDocument is called as part of writing replication changes. Changing it to use the storage engine api will reduce the instruction count. While the POC made the change in ReplicationConsistencyMarkersImpl, a better approach may be to make it with upsertById in storage engine impl. The ReplicationConsistencyMarkersImpl does cache the _id record id. It also bypasses the opobservers to saving time applying the change Note: I have not measured the perf of this change alone POC: https://github.com/10gen/mongo/commit/2f09e0eb2cdb1acdc8d23ab397c2f26647204fd5 |
| Comments |
| Comment by Githook User [ 01/Feb/24 ] |
|
Author: {'name': 'Scott Li', 'email': '146780710+scottli-sz@users.noreply.github.com', 'username': 'scottli-sz'}Message: GitOrigin-RevId: 9127fa0969dccd7ef4287de8d1da984bb1296b9a |