Commit 571f586
committed
dataflow-state: Handle non-existent deployment dirs
At process start up, Readyset will clean out the tmp/working dir,
in case the process crashed on a previous run and we need to delete
temp files. If the `working_dir` already exists by the time the
`clean_working_dir()` function is invoked, then everything is fine. If
the directory does not exist, then the call to `Path::canonicalize()`
will fail.
This problem does not exist in standalone, as the Standalone Authority
is created (and it's storage directories) much earlier than we attempt
to clean out the working dir. This is not the case in adapter/server
operation, which is where this was failing. The fix is to simply not
try to delete or canonicalize the working directory path if the
directory does not exist.
Release-Note-Core: Fix a bug in distributed readyset where
readyset-server will fail on startup due to a missing working_dir.
Change-Id: Ibe7b0511d285b224a36ce7568673105926f1c354
Reviewed-on: https://gerrit.readyset.name/c/readyset/+/7920
Tested-by: Buildkite CI
Reviewed-by: Johnathan Davis <jcd@readyset.io>1 parent 7bed7c9 commit 571f586
1 file changed
+15
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
135 | | - | |
| 134 | + | |
136 | 135 | | |
137 | 136 | | |
138 | 137 | | |
| |||
325 | 324 | | |
326 | 325 | | |
327 | 326 | | |
328 | | - | |
329 | | - | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
330 | 332 | | |
331 | 333 | | |
332 | | - | |
| 334 | + | |
333 | 335 | | |
334 | | - | |
335 | | - | |
336 | 336 | | |
337 | | - | |
338 | | - | |
| 337 | + | |
339 | 338 | | |
340 | 339 | | |
341 | 340 | | |
| |||
1477 | 1476 | | |
1478 | 1477 | | |
1479 | 1478 | | |
1480 | | - | |
| 1479 | + | |
1481 | 1480 | | |
1482 | 1481 | | |
1483 | 1482 | | |
1484 | 1483 | | |
1485 | 1484 | | |
1486 | 1485 | | |
1487 | 1486 | | |
1488 | | - | |
1489 | | - | |
1490 | | - | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
1491 | 1490 | | |
1492 | 1491 | | |
| 1492 | + | |
1493 | 1493 | | |
1494 | | - | |
1495 | | - | |
| 1494 | + | |
| 1495 | + | |
1496 | 1496 | | |
1497 | 1497 | | |
1498 | 1498 | | |
| |||
0 commit comments