diff --git a/pkg/ddc/alluxio/cache.go b/pkg/ddc/alluxio/cache.go index 755db772a40..9046b2a430e 100644 --- a/pkg/ddc/alluxio/cache.go +++ b/pkg/ddc/alluxio/cache.go @@ -206,6 +206,13 @@ func (e *AlluxioEngine) invokeCleanCache(path string) (err error) { } +// getGracefulShutdownLimits retrieves the maximum number of retry attempts for graceful shutdown. +// It first attempts to get the value from the runtime specification's CleanCachePolicy. +// If MaxRetryAttempts is not specified in the runtime, it returns the default value. +// +// Returns: +// - gracefulShutdownLimits: The number of retry attempts allowed for graceful shutdown +// - error: Any error that occurred while retrieving the runtime func (e *AlluxioEngine) getGracefulShutdownLimits() (gracefulShutdownLimits int32, err error) { runtime, err := e.getRuntime() if err != nil {