[SERVER-64182] Re-enabling health checks should check if another pending check was already scheduled Created: 03/Mar/22  Updated: 29/Oct/23  Resolved: 11/Mar/22

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

Type: Bug Priority: Major - P3
Reporter: Andrew Shuvalov (Inactive) Assignee: Andrew Shuvalov (Inactive)
Resolution: Fixed Votes: 0
Labels: sharding-nyc-subteam2
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Problem/Incident
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.2, v5.0
Participants:
Linked BF Score: 177

 Description   

The test failure discovered two problems:
1. If health checking is disabled, and then re-enabled quickly enough a scheduled check from the previous cycle that remains in the queue will be duplicated by another one. The logic to keep a scheduled check in the queue when disabled was supposed to be correct because when the time is due, the logic checks the enabled flag before doing anything
2. When health checking is re-enabled it will happen in-line. Instead, it should be scheduled and return immediately.



 Comments   
Comment by Githook User [ 14/Mar/22 ]

Author:

{'name': 'Andrew Shuvalov', 'email': 'andrew.shuvalov@mongodb.com', 'username': 'shuvalov-mdb'}

Message: SERVER-64182 reconsile minor differences during 5.0 backport
Branch: v5.0
https://github.com/mongodb/mongo/commit/15ab1b0cd98bd40165c2b3e8b0f5db030b81876a

Comment by Githook User [ 14/Mar/22 ]

Author:

{'name': 'Andrew Shuvalov', 'email': 'andrew.shuvalov@mongodb.com', 'username': 'shuvalov-mdb'}

Message: SERVER-64182 avoid duplicate health checks; cleanups

(cherry picked from commit e146ca34cbec7301ba1be1cc3c10c56a53a107fc)
Branch: v5.0
https://github.com/mongodb/mongo/commit/8fe804f3b383594441788ac995b6e50c9c340928

Comment by Githook User [ 11/Mar/22 ]

Author:

{'name': 'Andrew Shuvalov', 'email': 'andrew.shuvalov@mongodb.com', 'username': 'shuvalov-mdb'}

Message: SERVER-64182 avoid duplicate health checks; cleanups
Branch: master
https://github.com/mongodb/mongo/commit/e146ca34cbec7301ba1be1cc3c10c56a53a107fc

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