Commit 8d4a247
committed
fix(cache): improve NFS/lock error handling in DefaultCacheStore
Three improvements to DefaultCacheStore.openDb():
1. Log root cause: the underlying LevelDB exception is now logged at
DEBUG level so it appears in .nextflow.log, aiding diagnosis.
2. Add NXF_CACHE_DIR env-var support: the new resolveCacheBaseDir()
helper checks for the NXF_CACHE_DIR environment variable and uses it
as the base directory for the LevelDB cache. This lets users on NFS /
Lustre / GPFS clusters redirect only the cache DB to a local path
(e.g. /tmp) without having to move the entire pipeline launch
directory.
3. Improve error message: the previous message incorrectly advised users
to use '-w' (which controls the work directory, not the cache
directory). The new message accurately describes the root cause and
documents both remedies: running from a local directory with -w, or
setting NXF_CACHE_DIR.
Fixes: DefaultCacheStore caught a generic Exception from LevelDB when
the launch directory is on a filesystem without POSIX file-lock support
(NFS, Lustre, GPFS, BeeGFS, …) and emitted a misleading error message.
Signed-off-by: Matthias De Smet <11850640+matthdsm@users.noreply.github.com>1 parent f39afea commit 8d4a247
File tree
1 file changed
+33
-4
lines changed- modules/nextflow/src/main/groovy/nextflow/cache
1 file changed
+33
-4
lines changedLines changed: 33 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| |||
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
66 | | - | |
| 68 | + | |
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
70 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
71 | 93 | | |
72 | 94 | | |
73 | 95 | | |
| |||
90 | 112 | | |
91 | 113 | | |
92 | 114 | | |
| 115 | + | |
| 116 | + | |
93 | 117 | | |
94 | 118 | | |
95 | | - | |
96 | | - | |
97 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
98 | 127 | | |
99 | 128 | | |
100 | 129 | | |
| |||
0 commit comments