[SERVER-47630] Reserving a slot in the oplog for addIndexBuildEntry can cause an out-of-order oplog insertion for ephemeralForTest Created: 17/Apr/20  Updated: 29/Oct/23  Resolved: 17/Apr/20

Status: Closed
Project: Core Server
Component/s: Index Maintenance
Affects Version/s: 4.4.0-rc1
Fix Version/s: 4.4.0-rc2, 4.7.0

Type: Bug Priority: Major - P3
Reporter: Gregory Wlodarek Assignee: Gregory Wlodarek
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4
Sprint: Execution Team 2020-05-04
Participants:
Linked BF Score: 48

 Description   

In the commit quorum helper function addIndexBuildEntry, we reserve a slot in the oplog to perform an insertion. This can cause an out-of-order oplog insertion assertion to be hit.



 Comments   
Comment by Githook User [ 17/Apr/20 ]

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-47630 Reserving a slot in the oplog for addIndexBuildEntry can cause an out-of-order oplog insertion for ephemeralForTest

(cherry picked from commit c1fad54e1821500fec2121d2e31a591069bc053d)
Branch: v4.4
https://github.com/mongodb/mongo/commit/b3ade64366311783f002d83b5b6ab746608339b0

Comment by Githook User [ 17/Apr/20 ]

Author:

{'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}

Message: SERVER-47630 Reserving a slot in the oplog for addIndexBuildEntry can cause an out-of-order oplog insertion for ephemeralForTest
Branch: master
https://github.com/mongodb/mongo/commit/c1fad54e1821500fec2121d2e31a591069bc053d

Comment by Suganthi Mani [ 17/Apr/20 ]

It seems ephermeralForTest doesn't handle oplog holes like WT.

FYI, We do reserve oplog slots for batch inserts (like addIndexBuildEntry) before inserting documents to user collection. The Batch insert code path was able to survive in ephemeralForTest storage negine because of this magic check supportsDocLocking() which is missing in addIndexBuildEntry().

Comment by Gregory Wlodarek [ 17/Apr/20 ]

Correct, only for emphemeralForTest, so it's probably to do with how that storage engine manages oplog holes.

Comment by Suganthi Mani [ 17/Apr/20 ]

I think this assertion happens ONLY on ephermeralForTest storage engines due this error msg. gregory.wlodarek correct me If I am wrong?

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