[SERVER-48229] Shutdown PeriodicShardedIndexConsistencyChecker after ReplicationCoordinator so no thread will try to pause the job after it has stopped Created: 14/May/20  Updated: 29/Oct/23  Resolved: 18/Jun/20

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.2.9, 4.4.1, 4.7.0

Type: Bug Priority: Major - P3
Reporter: Randolph Tan Assignee: Cheahuychou Mao
Resolution: Fixed Votes: 0
Labels: sharding-wfbf-day
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:
v4.4, v4.2
Sprint: Sharding 2020-06-29
Participants:
Linked BF Score: 13

 Description   

Normally, when mongod is shutting down, stepdown will get initiated. However, this is only best effort and it is possible that it is not guaranteed to stepdown. This means that it can go ahead and call stop on the index consistency checker. If the replication in the background decides to stepdown, it can trigger the stepdown hook and call pause on the checker after it has already been stopped. This will end up hitting this assertion and since it is running inside the repl executor, the assertion will be uncaught and cause the mongod to terminate.



 Comments   
Comment by Githook User [ 04/Aug/20 ]

Author:

{'name': 'Cheahuychou Mao', 'email': 'cheahuychou.mao@mongodb.com', 'username': 'cheahuychou'}

Message: SERVER-48229 Shutdown PeriodicShardedIndexConsistencyChecker after ReplicationCoordinator so no thread will try to pause the job after it has stopped

(cherry picked from commit 6083eca15b723f878645de53158c6543769dcdb5)
Branch: v4.4
https://github.com/mongodb/mongo/commit/ab7b36187b3a0672b60e488962bfdc1f1509b2b7

Comment by Githook User [ 22/Jun/20 ]

Author:

{'name': 'Cheahuychou Mao', 'email': 'cheahuychou.mao@mongodb.com', 'username': 'cheahuychou'}

Message: SERVER-48229 Shutdown PeriodicShardedIndexConsistencyChecker after ReplicationCoordinator so no thread will try to pause the job after it has stopped

(cherry picked from commit 6083eca15b723f878645de53158c6543769dcdb5)
Branch: v4.2
https://github.com/mongodb/mongo/commit/50f5d296f204936e4dd5d716d59ac273039dc4b5

Comment by Githook User [ 18/Jun/20 ]

Author:

{'name': 'Cheahuychou Mao', 'email': 'cheahuychou.mao@mongodb.com', 'username': 'cheahuychou'}

Message: SERVER-48229 Shutdown PeriodicShardedIndexConsistencyChecker after ReplicationCoordinator so no thread will try to pause the job after it has stopped
Branch: master
https://github.com/mongodb/mongo/commit/6083eca15b723f878645de53158c6543769dcdb5

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