Skip to content

Commit

Permalink
Handle attribute caching with Lustre filesystem (#5650)
Browse files Browse the repository at this point in the history

Signed-off-by: Ben Sherman <[email protected]>
Signed-off-by: Paolo Di Tommaso <[email protected]>
Co-authored-by: Paolo Di Tommaso <[email protected]>
  • Loading branch information
bentsherman and pditommaso authored Jan 9, 2025
1 parent 6617f52 commit 61674d2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ class GridTaskHandler extends TaskHandler implements FusionAwareTask {
protected Integer readExitStatus() {

String workDirList = null
if( exitTimestampMillis1 && FileHelper.workDirIsNFS ) {
if( exitTimestampMillis1 && FileHelper.workDirIsSharedFS ) {
/*
* When the file is in a NFS folder in order to avoid false negative
* list the content of the parent path to force refresh of NFS metadata
Expand Down
14 changes: 7 additions & 7 deletions modules/nf-commons/src/main/nextflow/file/FileHelper.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -468,14 +468,14 @@ class FileHelper {
* @return The {@code true} when the path is a NFS mount {@code false} otherwise
*/
@Memoized
static boolean isPathNFS(Path path) {
static boolean isPathSharedFS(Path path) {
assert path
if( path.getFileSystem() != FileSystems.getDefault() )
return false

final type = getPathFsType(path)
def result = type == 'nfs'
log.debug "NFS path ($result): $path"
final result = type == 'nfs' || type == 'lustre'
log.debug "FS path type ($result): $path"
return result
}

Expand All @@ -491,7 +491,7 @@ class FileHelper {
process.destroy()

if( status ) {
log.debug "Can't check if specified path is NFS ($status): ${FilesEx.toUriString(path)}\n${Bolts.indent(text,' ')}"
log.debug "Unable to determine FS type ($status): ${FilesEx.toUriString(path)}\n${Bolts.indent(text,' ')}"
return null
}

Expand All @@ -503,8 +503,8 @@ class FileHelper {
* {@code true} when the current session working directory is a NFS mounted path
* {@code false otherwise}
*/
static boolean getWorkDirIsNFS() {
isPathNFS(Global.session.workDir)
static boolean getWorkDirIsSharedFS() {
isPathSharedFS(Global.session.workDir)
}

/**
Expand Down Expand Up @@ -546,7 +546,7 @@ class FileHelper {
if( Files.exists(self) )
return true

if( !workDirIsNFS )
if( !workDirIsSharedFS )
return false


Expand Down

0 comments on commit 61674d2

Please sign in to comment.