fix: file lock and acc file load - #5
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5de5f1c5b1
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| run: cargo test --verbose | ||
|
|
||
| - name: Run FUSE tests (requires root) | ||
| run: sudo -E $(which cargo) test --verbose -- --ignored --test-threads=1 |
There was a problem hiding this comment.
Restrict ignored-test run to non-interactive FUSE cases
This step now runs cargo test ... -- --ignored, which executes all ignored tests in the workspace; the libtest runner explicitly documents --ignored as “Run only ignored tests.” In this commit, tests/antares_test.rs adds test_mount_job_no_cl_keep_running that blocks on tokio::signal::ctrl_c().await, so this workflow will hang indefinitely on CI (and the same broad --ignored invocation was added to .github/workflows/test.yml). Please target only specific non-interactive FUSE tests instead of all ignored tests.
Useful? React with 👍 / 👎.
Dicfuse previously exposed readiness before root directory entries were loaded, which made Antares mounts fragile for callers that immediately traverse deep paths after mount. This change delays the ready signal until the root directory has been seeded, increases lookup refresh and retry budgets for cold paths, adds a FUSE mount readiness probe in Antares, and replaces the radix trie mutex with an rwlock to reduce contention in read-heavy lookup workloads.
c2f9c45 to
764a84a
Compare
Signed-off-by: Luxian <lux1an@qq.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 565d5f0f8f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| match fetch_file(&newit.hash).await { | ||
| Ok(content) => { | ||
| store.save_file(new_inode, content); |
There was a problem hiding this comment.
Move blob prefetch outside per-directory lock
load_dir_depth now awaits fetch_file while the per-directory _dir_guard is still held, so any concurrent ensure_dir_loaded/lookup for that same path blocks behind every blob download; on directories with many or large files this turns metadata operations into long stalls and can make mounts appear hung. This regression was introduced by the new prefetch block and should run after releasing the directory lock (or in separate tasks) to keep directory operations responsive.
Useful? React with 👍 / 👎.
| tokio::signal::ctrl_c() | ||
| .await | ||
| .expect("failed to listen for Ctrl-C"); |
There was a problem hiding this comment.
Keep ignored FUSE test non-blocking
This ignored test waits on tokio::signal::ctrl_c().await, so any non-interactive run of ignored tests will block indefinitely until a signal is injected. Fresh evidence for this re-raised issue: the same file still documents running all ignored Antares tests (cargo test --test antares_test -- --ignored ...), and libtest --help states --ignored runs only ignored tests, which now includes this never-ending case.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ddce762bae
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| ) | ||
| .await?; | ||
|
|
||
| antares_fuse.mount().await?; |
There was a problem hiding this comment.
Convert mount failures into Result errors
mount_job_at now invokes antares_fuse.mount().await here, but the underlying mount path can panic on common runtime failures (e.g., non-empty mountpoint or failed FUSE mount) instead of returning an error, which crashes CLI/daemon callers even though this API is typed as std::io::Result. This makes mount failures unrecoverable in production contexts where permissions or mountpoint state are not guaranteed.
Useful? React with 👍 / 👎.
|
|
||
| // Mark ready after root children are loaded. Callers waiting on wait_for_ready() (e.g., | ||
| // Antares mount) can now safely resolve root-level lookups without blocking on network IO. | ||
| store.mark_ready(); |
There was a problem hiding this comment.
Gate readiness on successful root seed
import_arc marks the store as ready at this line even when the immediately preceding root seed (ensure_dir_loaded(1)) failed (seeded_ok == false). Since mount_job_at now waits on wait_for_ready(), this can signal readiness prematurely and allow mounts to proceed with an unseeded root, reintroducing early lookup ENOENTs during transient startup fetch failures.
Useful? React with 👍 / 👎.
No description provided.