[SERVER-50256] Oplog applier InsertGroup cannot group first operation in vector Created: 11/Aug/20  Updated: 08/Nov/23  Resolved: 08/Nov/23

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 7.2.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Matthew Russotto Assignee: Scott Li
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Replication
Backwards Compatibility: Fully Compatible
Sprint: Repl 2023-10-16, Repl 2023-10-30, Repl 2023-11-13
Participants:

 Description   

The InsertGroup will not group operations starting with (and including) its _doNotGroupBeforePoint iterator, which is set to the last operation grouped in the last attempt, or the start of its operation vector. This means it can never group the first operation in the operation vector. Since there is no "before the beginning" iterator in C++, probably the solution is to make _doNotGroupBeforePoint the first operation not yet grouped, and make InsertGroup not group operations strictly before _doNotGroupBeforePoint.



 Comments   
Comment by Githook User [ 07/Nov/23 ]

Author:

{'name': 'Scott Li', 'email': 'scott.li@mongodb.com', 'username': ''}

Message: SERVER-50256 Fix the off by 1 inefficiency in insertGroup
Branch: master
https://github.com/mongodb/mongo/commit/4376038d6f6ac23df93f7a491fe5c0ea115b7c53

Comment by Judah Schvimer [ 12/Aug/20 ]

matthew.russotto, is this a correctness bug, or just a performance improvement?

Generated at Thu Feb 08 05:22:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.