[SERVER-66984] config.transactions collection may end up not having the "parentLsid" partial index if the primary steps down or shuts down while setting up the collection Created: 02/Jun/22  Updated: 29/Oct/23  Resolved: 15/Jun/22

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

Type: Bug Priority: Major - P3
Reporter: Cheahuychou Mao Assignee: Jason Zhang
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v6.0
Sprint: Sharding NYC 2022-06-13, Sharding 2022-06-27
Participants:
Linked BF Score: 12

 Description   

Here is the scenario:

  • node0 steps up and creates the config.transactions collection but steps down before creating the partial index
  • node0 or some other node steps up and sees that the collection has already exists so it skips creating the partial index.
  • the replica set ends up without the partial index forever. 

The issue is that we create the collection and the partial index in two separate oplog entries, and failover/restart can occur between those two writes. This can be solved by also creating the index if the collection exists but is empty and doesn't already have the index since the two writes are split, the collection should remain empty upon recovery.



 Comments   
Comment by Githook User [ 15/Jun/22 ]

Author:

{'name': 'Jason Zhang', 'email': 'jason.zhang@mongodb.com', 'username': 'jz1242'}

Message: SERVER-66984 config.transactions collection may end up not having the "parentLsid" partial index if the primary steps down or shuts down while setting up the collection

(cherry picked from commit f9a3cf210791c19cc2d8569d0a7837745838d0cb)
Branch: v6.0
https://github.com/mongodb/mongo/commit/952ed79880ec280dce20c95ce3b178036d366771

Comment by Githook User [ 14/Jun/22 ]

Author:

{'name': 'Jason Zhang', 'email': 'jason.zhang@mongodb.com', 'username': 'jz1242'}

Message: SERVER-66984 config.transactions collection may end up not having the "parentLsid" partial index if the primary steps down or shuts down while setting up the collection
Branch: master
https://github.com/mongodb/mongo/commit/f9a3cf210791c19cc2d8569d0a7837745838d0cb

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