[SERVER-66621] Primary node stuck waiting for secondary to finish indexBuild when downgrading from 4.4 to 4.2 Created: 20/May/22  Updated: 29/Oct/23  Resolved: 11/Jul/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 4.4.13
Fix Version/s: 4.4.16

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

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2022-07-11, Execution Team 2022-07-25
Participants:
Linked BF Score: 0

 Description   

In versions 4.4 and up, we support two-phase index builds meaning that a primary will wait to fully commit an index until the index is built on all secondaries. This is not the case on 4.2; secondaries will not build the index and effectively ignore the "startIndexBuild" oplog entry

There is a race condition on the primary when setting the index build protocol (single/two-phase) and downgrading the FCV which takes a global lock (whereas setting the protocol does not). So, if the index build protocol is set to two-phase and then we downgrade (on the primary), and then the secondary downgrades before building the index, the primary will wait for a response from the secondary signifying the index was built, but the secondary (on version 4.2 with the single index build protocol) will not build it.



 Comments   
Comment by Githook User [ 11/Jul/22 ]

Author:

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

Message: SERVER-66621 Add additional check for two phase index build support
Branch: v4.4
https://github.com/mongodb/mongo/commit/ed8fb871a38e4cb682e2e499922ef17d079eefc2

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