Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions pkg/ddc/alluxio/ufs.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,16 @@ func (e *AlluxioEngine) UpdateOnUFSChange(ufsToUpdate *utils.UFSToUpdate) (updat
return
}

// checkIfRemountRequired checks whether a remount operation is needed for the given UFS.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few lines below, ShouldSyncDatasetMounts uses the project's richer doc-comment template with explicit Parameters: and Returns: sections. Since you're adding fresh documentation here anyway, it would be nice to mirror that format for in-file consistency — for example noting that ufsToUpdate is an in/out parameter that the function may mutate (via AddMountPaths) to carry new mount paths back to the caller. Purely a consistency suggestion, not a blocker.

// It compares the runtime's MountTime with the Alluxio master container's start time.
// If the master container started after the last mount, the in-memory mount state may not
// have survived the restart, so it finds unmounted UFS paths and adds them to ufsToUpdate
// for remount scheduling. If no paths need remounting, it refreshes the runtime's MountTime
// to prevent the check from re-firing on every reconcile.
//
// Parameters:
// - ufsToUpdate (*utils.UFSToUpdate): An in/out parameter that may be mutated via
// AddMountPaths to carry unmounted paths back to the caller for remount scheduling.
func (e *AlluxioEngine) checkIfRemountRequired(ufsToUpdate *utils.UFSToUpdate) {
runtime, err := e.getRuntime()
if err != nil {
Expand Down
Loading