[SERVER-77939] metadataConsistencyCheck may be executed in a secondary RS node Created: 09/Jun/23  Updated: 29/Oct/23  Resolved: 09/Jun/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 7.0.0-rc3
Fix Version/s: 7.1.0-rc0, 7.0.0-rc4

Type: Bug Priority: Major - P3
Reporter: Silvia Surroca Assignee: Silvia Surroca
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.0
Sprint: Sharding EMEA 2023-06-12
Participants:
Linked BF Score: 146

 Description   

We must ensure that MetadataConsistencyCheck is executed only on a primary Replica Set node.

When this is not happening?

CASE 1

  • metadataConsistencyCheck command is received on node1
  • node1 steps down before we can set the opCtx as interruptible
  • metadataConsistencyCheck thread marks the opCtx as interruptible
  • metadataConsistencyCheck thread will never be interrupted because stepdown has already happened, so it will run on a secondary replica set node.

CASE 2

  • metadataConsistencyCheck command is received on node1
  • metadataConsistencyCheck thread marks the opCtx as interruptible
  • node1 steps down before we can set the opCtx as interruptible
  • metadataConsistencyCheck thread doesn't check if the opCtx has been interrupted and returns the result to the user


 Comments   
Comment by Githook User [ 12/Jun/23 ]

Author:

{'name': 'Silvia Surroca', 'email': 'silvia.surroca@mongodb.com', 'username': 'silviasuhu'}

Message: SERVER-77939 Ensure MetadataConsistencyCheck is executed only on a primary ReplicaSet node
Branch: v7.0
https://github.com/mongodb/mongo/commit/d8f6302504fe9260c1d8a85824ee4fd9e99a9a7e

Comment by Githook User [ 09/Jun/23 ]

Author:

{'name': 'Silvia Surroca', 'email': 'silvia.surroca@mongodb.com', 'username': 'silviasuhu'}

Message: SERVER-77939 Ensure MetadataConsistencyCheck is executed only on a primary ReplicaSet node
Branch: master
https://github.com/mongodb/mongo/commit/c527b1365539bb1db05dc66222e154ae26efb3de

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