[SERVER-63013] When health observer returns status failure it will never run again Created: 26/Jan/22  Updated: 29/Oct/23  Resolved: 03/Feb/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.3.0

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

Issue Links:
Backports
Problem/Incident
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.0, v4.4
Sprint: Sharding 2022-02-07
Participants:
Linked BF Score: 178
Story Points: 2

 Description   

Bug is introduced by SERVER-59365, this commit.

The previous code was pass-through when `periodicCheckImpl()` returns the Future with failed status, now it just returns. The continuation is required to set the `_currentlyRunningHealthCheck` back to false in any outcome. With this bug, the health observer will never run again.

My assessment is that the LDAP health observer should not be affected because it is designed to never return a Status failure, it returns the HealthCheckStatus object with result fields set to failure.

The fix should:
1. return the code logic back to pass-through
2. write a unit test with mock observer to throw a Status error
3. double check the LDAP observer code that this is indeed not a problem



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

Author:

{'name': 'Kshitij Gupta', 'email': 'kshitij.gupta@mongodb.com', 'username': 'kshitijng'}

Message: SERVER-63013: When health observer returns status failure it will never
run again.

(cherry picked from commit 458895d6629e5bc700c2d6f8d84c8f91c58eab94)
Branch: v5.0
https://github.com/mongodb/mongo/commit/1497a7d78706a502b98eeb7fa121bf8ec311029c

Comment by Githook User [ 14/Mar/22 ]

Author:

{'name': 'Kshitij Gupta', 'email': 'kshitij.gupta@mongodb.com', 'username': 'kshitijng'}

Message: SERVER-63013: When health observer returns status failure it will never
run again.

(cherry picked from commit fc58b976b7bb4b8ef499883e7b620f5ced234a5d)
Branch: v5.0
https://github.com/10gen/mongo-enterprise-modules/commit/d7a3b47a57ca60d11b8beafbecd1861c66f6a509

Comment by Githook User [ 03/Feb/22 ]

Author:

{'name': 'Kshitij Gupta', 'email': 'kshitij.gupta@mongodb.com', 'username': 'kshitijng'}

Message: SERVER-63013: When health observer returns status failure it will never
run again.
Branch: master
https://github.com/mongodb/mongo/commit/458895d6629e5bc700c2d6f8d84c8f91c58eab94

Comment by Githook User [ 03/Feb/22 ]

Author:

{'name': 'Kshitij Gupta', 'email': 'kshitij.gupta@mongodb.com', 'username': 'kshitijng'}

Message: SERVER-63013: When health observer returns status failure it will never
run again.
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/fc58b976b7bb4b8ef499883e7b620f5ced234a5d

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