diff --git a/pkg/ddc/alluxio/ufs.go b/pkg/ddc/alluxio/ufs.go index b2158bdc208..53e2f68ca8c 100644 --- a/pkg/ddc/alluxio/ufs.go +++ b/pkg/ddc/alluxio/ufs.go @@ -134,6 +134,16 @@ func (e *AlluxioEngine) ShouldUpdateUFS() (ufsToUpdate *utils.UFSToUpdate) { return } +// UpdateOnUFSChange handles the updates when the Underlying File System (UFS) changes. +// It checks if an update is required, sets the dataset status to Updating, and processes +// the added or removed mount points for the Alluxio engine. +// +// Parameters: +// - ufsToUpdate (*utils.UFSToUpdate): The object containing information about which UFS paths need to be updated. +// +// Returns: +// - updateReady (bool): Indicates whether the update process is ready or completed. +// - err (error): Returns an error if the status update or UFS processing fails, otherwise returns nil. func (e *AlluxioEngine) UpdateOnUFSChange(ufsToUpdate *utils.UFSToUpdate) (updateReady bool, err error) { // 1. check if need to update ufs if !ufsToUpdate.ShouldUpdate() {