[SERVER-81890] Avoid invariant due to in progress index build during initial sync Created: 05/Oct/23  Updated: 29/Oct/23  Resolved: 19/Oct/23

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

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

Attachments: File repro.js    
Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution EMEA Team 2023-10-16, Execution EMEA Team 2023-10-30
Participants:
Linked BF Score: 120

 Description   

The attached reproducer consistently crashes the server.

The order of operations is as follows:

  • A secondary begins initial sync and sets the timestamp for the oplog replay
  • Primary creates a collection collA
  • Primary creates an index on the empty collection collA (this creates a createIndexes oplog entry)
  • Primary inserts some documents into collA
  • Primary drops the index of collA
  • Primary begins creating the index again in collA (this is a two phase index build)
  • Secondary clones the collection with the in-progress index build and proceeds to also create the index
  • Secondary replays the oplog and crashes due to the in-progress index build


 Comments   
Comment by Githook User [ 19/Oct/23 ]

Author:

{'name': 'Jordi Olivares Provencio', 'email': 'jordi.olivares-provencio@mongodb.com', 'username': 'jordiolivares'}

Message: SERVER-81890 Normalise index comparisons
Branch: master
https://github.com/mongodb/mongo/commit/ed3a37404a66e850148fc7aff348bb208305b228

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