[SERVER-82627] ReshardingDataReplication does not join the ReshardingOplogFetcher thread pool causing invariant failure. Created: 31/Oct/23  Updated: 25/Jan/24  Resolved: 02/Nov/23

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

Type: Bug Priority: Major - P3
Reporter: Nandini Bhartiya Assignee: Nandini Bhartiya
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:
v7.2, v7.1, v7.0, v6.0, v5.0
Participants:
Linked BF Score: 120

 Description   

As seen in https://jira.mongodb.org/browse/BF-30264 – it is possible that while resharding is in progress, a recipient primary may step down and the step up process does not wait for the step down to complete. When resharding completes on the recipient, the recipient state document is deleted on the current primary and this deletion is then replicated on the secondaries. Since an earlier secondary was a primary, it has a stale ActiveInstance (because the step up did not wait for the step down to complete), its deletion of the state document triggers the instance's cleanup and that is when the invariant failure is hit because the task in the GuaranteedExecutor failed to run before deletion. To avoid such scenarios, ReshardingDataReplication must join the ReshardingOplogFetcher thread pool.



 Comments   
Comment by Githook User [ 25/Jan/24 ]

Author:

{'name': 'Nandini Bhartiya', 'email': 'nandini.bhartiya@mongodb.com', 'username': 'nandinibhartiyaMDB'}

Message: SERVER-82627: ReshardingDataReplication joins the ReshardingOplogFetcher thread pool

(cherry picked from commit 6ccfb31dac058cd05c2b0730e77a8c414844e766)

GitOrigin-RevId: 1bcbb1884fed1655affc07baa1155d7ce87ffd02
Branch: v6.0
https://github.com/mongodb/mongo/commit/a56fd9eb5139d4e1fc142125240947d5567b8036

Comment by Githook User [ 25/Jan/24 ]

Author:

{'name': 'Nandini Bhartiya', 'email': 'nandini.bhartiya@mongodb.com', 'username': 'nandinibhartiyaMDB'}

Message: SERVER-82627: ReshardingDataReplication joins the ReshardingOplogFetcher thread pool

(cherry picked from commit 6ccfb31dac058cd05c2b0730e77a8c414844e766)

GitOrigin-RevId: f2c28304139786b7757edd6bc8e0ee3b1f2a5601
Branch: v7.0
https://github.com/mongodb/mongo/commit/16a1a5ddd43bdd342c5f4bc09ccd540c884c80e2

Comment by Githook User [ 25/Jan/24 ]

Author:

{'name': 'Nandini Bhartiya', 'email': 'nandini.bhartiya@mongodb.com', 'username': 'nandinibhartiyaMDB'}

Message: SERVER-82627: ReshardingDataReplication joins the ReshardingOplogFetcher thread pool

(cherry picked from commit 6ccfb31dac058cd05c2b0730e77a8c414844e766)

GitOrigin-RevId: 2b6376df45be744839310dee6ac4a703eb2b4cd9
Branch: v5.0
https://github.com/mongodb/mongo/commit/d7a1cfe4063044b9c793de5b86667aef922a7a32

Comment by Githook User [ 02/Nov/23 ]

Author:

{'name': 'Nandini Bhartiya', 'email': 'nandini.bhartiya@mongodb.com', 'username': 'nandinibhartiyaMDB'}

Message: SERVER-82627: ReshardingDataReplication joins the ReshardingOplogFetcher thread pool
Branch: master
https://github.com/mongodb/mongo/commit/6ccfb31dac058cd05c2b0730e77a8c414844e766

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