[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:
Duplicate
is duplicated by SERVER-86161 Speed up accesses of oplogTruncateAft... Closed
Related
related to SERVER-86161 Speed up accesses of oplogTruncateAft... Closed
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: SERVER-82597 Upsert oplogTruncateAfterPointDocument with collection_internal APIs (#18048)

GitOrigin-RevId: 9127fa0969dccd7ef4287de8d1da984bb1296b9a
Branch: master
https://github.com/mongodb/mongo/commit/9b11aa7cb61158b2a185abdc2c34edf2d000b73b

Generated at Thu Feb 08 06:49:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.