Skip to content

feat(node): add a durable table of blobs pending recovery - #3667

Open
halfprice wants to merge 2 commits into
mainfrom
zhewu/pending-recover-blobs-table
Open

feat(node): add a durable table of blobs pending recovery#3667
halfprice wants to merge 2 commits into
mainfrom
zhewu/pending-recover-blobs-table

Conversation

@halfprice

Copy link
Copy Markdown
Collaborator

Description

First PR of a two-PR stack that decouples the persisted event cursor from blob recovery (design: record recovering blobs durably and always mark certify events as persisted).

This PR adds the inert plumbing only — no behavior change:

  • New pending_recover_blobs column family and PendingRecoverBlobsTable (key: blob ID; value: versioned record with the certify event index and epoch), with a cached record count.
  • Storage API: insert/delete/scan/count (unused for now; marked allow(dead_code), removed by the follow-up PR that adds the write path and executor).
  • Database options plumbing and two new blob_recovery config knobs for the upcoming drain executor (max_concurrent_pending_recoveries, pending_recovery_drain_interval_secs).
  • Metrics definitions and a read-pending-recover-blobs dbtool command.

Existing databases pick up the new column family automatically on restart; no migration is needed.

Test plan

  • New storage unit test covering insert/overwrite/delete/count semantics.
  • CI: full walrus-service suite, clippy, and the config example snapshot test.

Add a pending_recover_blobs column family that records blobs whose
recovery is pending, keyed by blob ID with the certify event index and
epoch. Includes the storage API, database options, config knobs for the
upcoming drain executor, metrics, and a dbtool read command.

The table is not yet populated; the write path and the executor that
drains it land in a follow-up change.
@github-actions

Copy link
Copy Markdown
Contributor

Warning: This PR modifies one of the example config files. Please consider the
following:

  • Make sure the changes are backwards compatible with the current configuration.
  • Make sure any added parameters follow the conventions of the existing parameters; in
    particular, durations should take seconds or milliseconds using the naming convention
    _secs or _millis, respectively.
  • If there are added optional parameter sections, it should be possible to specify them
    partially. A useful pattern there is to implement Default for the struct and derive
    #[serde(default)] on it, see BlobRecoveryConfig as an example.
  • You may need to update the documentation to reflect the changes.

@halfprice

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: f64bd30a65

ℹ️ 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 thread crates/walrus-service/src/node/storage/pending_recover_blobs.rs Outdated
…ds on open

A RocksDB read error is re-yielded by the iterator without advancing,
so counting with `Iterator::count` would loop forever and hang the
storage open. Propagate the first error instead.
@halfprice

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 786e23f659

ℹ️ 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".

@halfprice
halfprice requested a review from shuowang12 August 21, 2026 05:41
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.

1 participant