Skip to content

pagestore: fence POSIX recovery and reclaim orphan layers - #233

Merged
hurricane1026 merged 4 commits into
pagestorefrom
feat/pagestore-orphan-layer-recovery
Sep 8, 2026
Merged

pagestore: fence POSIX recovery and reclaim orphan layers#233
hurricane1026 merged 4 commits into
pagestorefrom
feat/pagestore-orphan-layer-recovery

Conversation

@hurricane1026

Copy link
Copy Markdown

Summary

Follow up #232 with local POSIX store ownership and safe crash-orphan layer recovery.

  • Hold a shared, reference-counted process lease on a persistent .pagestore.lock inode across storage, layer-store, and manifest recovery/teardown. Competing processes fail before provider mutations; inherited handles cannot release the parent's lease.
  • Reconcile canonical local layer filenames against every manifest-owned ID. Validate the complete namespace and local locations before unlinking unreferenced regular single-link files, then fsync the directory. Preserve referenced, deleting, unavailable, and remote-durable IDs; never sweep the object tier.
  • Missing manifests never authorize cleanup. Before tolerated manifest-tail repair, durably install .pagestore-orphan-sweep-inhibited; later restarts stay inhibited. Reject malformed markers and nonregular/aliased manifests.
  • Wire focused C and real-daemon acceptance tests into Meson and standalone CI, and document the recovery contract.

Validation

  • Full configured Meson pagestore suite: 43/43.
  • Python harness unit tests: 189 passed.
  • Modified production C sources: cc -O2 -Wall -Wextra -Werror -fsyntax-only passed.
  • git diff --check passed.
  • Sol architecture review and independent Luna code review; findings addressed before submission.

Scope and limitations

This is cooperative, local POSIX ownership and process-crash recovery. Older binaries/external tools that do not acquire the lock must remain stopped; never remove the persistent lock inode while a store is live. An ambiguous manifest repair permanently inhibits automatic sweeping pending explicit repair. No object-tier orphan sweep, power-loss certification, or SPDK runtime testing is claimed. The SPDK build source list is updated only to retain linkage with the shared POSIX module.

@chatgpt-codex-connector

chatgpt-codex-connectorBot commented Sep 8, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

ReviewStatusCommitReview trigger
📝 Code ReviewCompleted2026-09-08T10:30:58.261055Zcdc23bfManual request
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@hurricane1026

Copy link
Copy Markdown
Author

@codex, review

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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:98884cfe4a

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadcontrib/pagestore/pagestore_core.c Outdated
Comment threadcontrib/pagestore/pagestore_core.c Outdated
Comment threadcontrib/pagestore/pagestore_layer_store.c Outdated
Comment threadcontrib/pagestore/pagestore_layer_store.c
Comment threadcontrib/pagestore/pagestore_store_owner.c
@hurricane1026

Copy link
Copy Markdown
Author

@codex, review

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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:55848bab2e

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadcontrib/pagestore/pagestore_layer_store.c
@hurricane1026

Copy link
Copy Markdown
Author

@codex, review

@chatgpt-codex-connectorchatgpt-codex-connectorBot 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:27fd0f727f

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment threadcontrib/pagestore/pagestore_core.c Outdated
Comment threadcontrib/pagestore/pagestore_layer_store.c
@hurricane1026

Copy link
Copy Markdown
Author

@codex, review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit:cdc23bf829

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@hurricane1026
hurricane1026 merged commit 863c900 into pagestoreSep 8, 2026
3 checks passed
Sign up for freeto 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.

1 participant

@hurricane1026