Skip to content

Commit f1a4180

Browse files
committed
Add comments to updatingUFSWithMountCommand in pkg/ddc/alluxio/ufs_internal.go
1 parent 50940f8 commit f1a4180

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

pkg/ddc/alluxio/ufs_internal.go

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,23 @@ func (e *AlluxioEngine) processUpdatingUFS(ufsToUpdate *utils.UFSToUpdate) (upda
187187

188188
return
189189
}
190-
190+
// updatingUFSWithMountCommand updates the Alluxio UFS mount points based on the differences identified in ufsToUpdate.
191+
// It performs mount operations for new UFS paths specified in ufsToUpdate.ToAdd() and unmount operations for paths
192+
// listed in ufsToUpdate.ToRemove(). The function skips mount points using Fluid native schemes as they are not editable.
193+
// For each mount to be added, it merges dataset-level SharedOptions with mount-specific Options, then applies
194+
// encryption configurations from both SharedEncryptOptions and mount-level EncryptOptions (with latter taking precedence
195+
// on key conflicts). The function first verifies that the Alluxio master is ready before executing any mount/unmount
196+
// commands via AlluxioFileUtils.
197+
//
198+
// Parameters:
199+
// - dataset: the Dataset custom resource containing mount specifications and configuration options
200+
// - ufsToUpdate: a utility struct holding lists of UFS paths to add or remove
201+
//
202+
// Returns:
203+
// - updateReady: true if all mount/unmount operations completed successfully, false otherwise
204+
// - err: any error encountered during readiness check, option processing, or mount/unmount execution
205+
//
206+
// Note: Mount operations are idempotent; however, concurrent modifications to the same Alluxio path may cause conflicts.
191207
func (e *AlluxioEngine) updatingUFSWithMountCommand(dataset *datav1alpha1.Dataset, ufsToUpdate *utils.UFSToUpdate) (updateReady bool, err error) {
192208

193209
podName, containerName := e.getMasterPodInfo()

0 commit comments

Comments
 (0)