[SERVER-65006] Write conflict on commitIndexBuild oplog entry insertion can cause multikey to fail to be set Created: 28/Mar/22  Updated: 29/Oct/23  Resolved: 05/May/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.0.1, 5.0.13, 6.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Gregory Noma Assignee: Fausto Leyva (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
related to SERVER-77082 Data race while setting index build i... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v6.0, v5.0, v4.4
Sprint: Execution Team 2022-05-02, Execution Team 2022-05-16
Participants:
Linked BF Score: 115

 Description   

We commit an index build inside of a writeConflictRetry loop. As a part of this process, one of the sources of multikey is the interceptor for writes that came in while the index build was already in progress. However, we also unset the interceptor before inserting the commitIndexBuild oplog entry. This means that if inserting the oplog entry gets a write conflict, we'll restart this process but the interceptor will have already been unset. Thus, we will fail to set multikey.



 Comments   
Comment by Githook User [ 31/Aug/22 ]

Author:

{'name': 'Faustoleyva54', 'email': 'fausto.leyva@mongodb.com', 'username': 'Faustoleyva54'}

Message: SERVER-65006 Delay unsetting the index build Interceptor until we commit
Branch: v5.0
https://github.com/mongodb/mongo/commit/0c0070e8610c8d79fed2d2aec784c1522cff76b5

Comment by Githook User [ 26/Jul/22 ]

Author:

{'name': 'Faustoleyva54', 'email': 'fausto.leyva@mongodb.com', 'username': 'Faustoleyva54'}

Message: SERVER-65006 Delay unsetting the index build Interceptor until we commit
Branch: v6.0
https://github.com/mongodb/mongo/commit/0b70b452f55a8a6b0861f6a08d570c2b19064488

Comment by Githook User [ 04/May/22 ]

Author:

{'name': 'Faustoleyva54', 'email': 'fausto.leyva@mongodb.com', 'username': 'Faustoleyva54'}

Message: SERVER-65006 Delay unsetting the index build Interceptor until we commit
Branch: master
https://github.com/mongodb/mongo/commit/776ff1584ef624413355c3ee7206fbc4bb929b9c

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