Skip to content

Commit 64d0c51

Browse files
authored
This PR is to add comments to checkMasterHealthy in pkg/ddc/goosefs/health_check.go (#4882)
* Add comments/notation to checkMasterHealthy in pkg/ddc/goosefs/health_check.go Signed-off-by: miledragon <miledragon0@gmail.com> * add comments to checkMasterHealthy in pkg/ddc/goosefs/health_check.go Signed-off-by: miledragon <miledragon0@gmail.com> --------- Signed-off-by: miledragon <miledragon0@gmail.com>
1 parent f3c1fb4 commit 64d0c51

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

pkg/ddc/goosefs/health_check.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,18 @@ func (e *GooseFSEngine) CheckRuntimeHealthy() (err error) {
7878
return
7979
}
8080

81-
// checkMasterHealthy checks the master healthy
81+
// checkMasterHealthy checks whether the GooseFS master StatefulSet is healthy.
82+
// It compares the desired and ready replica counts of the master StatefulSet.
83+
// If the master is not healthy, it updates the runtime status to NotReady with the appropriate condition.
84+
// If the master is healthy, it updates the status to Ready.
85+
// The function uses a retry mechanism to handle conflicts when updating the runtime status.
86+
//
87+
// Parameters:
88+
// - none (uses fields from the GooseFSEngine receiver)
89+
//
90+
// Returns:
91+
// - error: returns an error if the master is not healthy or if the runtime status update fails.
92+
8293
func (e *GooseFSEngine) checkMasterHealthy() (err error) {
8394
masterName := e.getMasterName()
8495

0 commit comments

Comments
 (0)