Skip to content

fix: file lock and acc file load - #5

Merged
genedna merged 3 commits into
gitmono-dev:masterfrom
Ivanbeethoven:master
May 12, 2026
Merged

fix: file lock and acc file load#5
genedna merged 3 commits into
gitmono-dev:masterfrom
Ivanbeethoven:master

Conversation

@Ivanbeethoven

Copy link
Copy Markdown
Collaborator

No description provided.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread .github/workflows/ci.yml Outdated
run: cargo test --verbose

- name: Run FUSE tests (requires root)
run: sudo -E $(which cargo) test --verbose -- --ignored --test-threads=1

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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.
@Ivanbeethoven
Ivanbeethoven force-pushed the master branch 2 times, most recently from c2f9c45 to 764a84a Compare March 13, 2026 08:27
Signed-off-by: Luxian <lux1an@qq.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread src/dicfuse/store.rs
Comment on lines +2251 to +2253
match fetch_file(&newit.hash).await {
Ok(content) => {
store.save_file(new_inode, content);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

Comment thread tests/antares_test.rs
Comment on lines +475 to +477
tokio::signal::ctrl_c()
.await
.expect("failed to listen for Ctrl-C");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Signed-off-by: Luxian <lux1an@qq.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread src/antares/mod.rs
)
.await?;

antares_fuse.mount().await?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

Comment thread src/dicfuse/store.rs

// 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();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@genedna
genedna merged commit ee11479 into gitmono-dev:master May 12, 2026
7 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants