Skip to content

feat: blob info V2 for tracking pooled blobs#3109

Merged
halfprice merged 7 commits intomainfrom
zhewu/blob_info_v2_2nd_attempt
Mar 16, 2026
Merged

feat: blob info V2 for tracking pooled blobs#3109
halfprice merged 7 commits intomainfrom
zhewu/blob_info_v2_2nd_attempt

Conversation

@halfprice
Copy link
Copy Markdown
Collaborator

@halfprice halfprice commented Mar 12, 2026

Description

  • Introduce BlobInfoV2, ValidBlobInfoV2 to support storage pool (bucket) blobs alongside regular blobs
  • Add PooledBlobChangeStatus and PoolExpired variants to BlobInfoMergeOperand for pool blob lifecycle events
  • Wrap existing BlobInfoV1 in versioned BlobInfo enums that route operands to the correct version
  • V1 entries auto-upgrade to V2 when a pool operand arrives; regular operands keep V1 as V1
  • To track per object blob info for pooled blob, we will create a dedicated table and dedicated per object pooled blob info in follow up PR.

To easy review:

  • First commit: simply copy PerObjectBlobInfoV1 to blob_info_v1.rs
  • Second commit: copy implementation of BlobInfoV1 & PerObjectBlobInfoV1 to BlobInfoV2 & PerObjectBlobInfoV2 in blob_info_v2.rs.
  • Third commit (review focus): updating BlobInfoV2 & PerObjectBlobInfoV2.

Contribute to WAL-1162
Contribute to WAL-1175

Test plan

Unit test


Release notes

Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that
a user might notice and any actions they must take to implement updates. (Add release notes after the colon for each item)

  • Storage node:
  • Aggregator:
  • Publisher:
  • CLI:

@halfprice halfprice force-pushed the zhewu/blob_info_v2_2nd_attempt branch from 2e7f39e to c1d5617 Compare March 12, 2026 09:32
@halfprice
Copy link
Copy Markdown
Collaborator Author

Quoting local codex:

can you verify that the third from the last commit is a no-op refactor? Can you also verify that the second from the last commit is simply copy the identical implementation of BlobInfoV1 to BlobInfoV2 and PerObjectBlobInfoV1 to PerObjectBlobInfoV2?

Yes.

For a631793 (refactor: move PerObjectBlobInfoV1 to blob_info_v1.rs), I verified it is a no-op refactor by inspection. The diff only:

  • moves PerObjectBlobInfoV1 and its impls from /Users/zhewu/work/walrus_3/crates/walrus-service/src/node/storage/blob_info/mod.rs into /
    Users/zhewu/work/walrus_3/crates/walrus-service/src/node/storage/blob_info/blob_info_v1.rs
  • adds the imports needed in the new file
  • replaces the old in-module definition with a re-export

I did not find any logic change in that commit.

For 50f7263 (feat: introduce BlobInfoV2 and PerObjectBlobInfoV2 as copies of V1), the answer is also effectively yes, with one small
qualification:

  • PerObjectBlobInfoV2 is identical to PerObjectBlobInfoV1 after the V1 -> V2 rename.
  • BlobInfoV2 / ValidBlobInfoV2 / PermanentBlobInfoV2 are also identical to the V1 implementation after renaming, except for one comment-
    only change: the copied comment says future changes should go to ValidBlobInfoV3 instead of ValidBlobInfoV2.

The commit also adds the expected module/enum plumbing in crates/walrus-service/src/node/storage/blob_info/
mod.rs so the new V2 types are wired into BlobInfo and PerObjectBlobInfo. Other than that wiring and the comment update, I did not find
behavioral differences.

@halfprice halfprice force-pushed the zhewu/blob_info_v2_2nd_attempt branch from c1d5617 to d50f517 Compare March 12, 2026 09:40
@halfprice
Copy link
Copy Markdown
Collaborator Author

@codex review

@halfprice halfprice marked this pull request as ready for review March 12, 2026 09:52
@halfprice halfprice requested a review from mlegner March 12, 2026 09:53
Copy link
Copy Markdown

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

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: d50f5176b9

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

Base automatically changed from zhewu/separate_blob_info_v1 to main March 12, 2026 16:12
@halfprice halfprice force-pushed the zhewu/blob_info_v2_2nd_attempt branch 2 times, most recently from 6a54786 to 2974cbf Compare March 12, 2026 16:46
@halfprice halfprice force-pushed the zhewu/blob_info_v2_2nd_attempt branch from 2974cbf to 6a19cf9 Compare March 12, 2026 17:16
Copy link
Copy Markdown
Contributor

@mlegner mlegner left a comment

Choose a reason for hiding this comment

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

Thank you so much for implementing this and structuring it in such a reviewer-friendly way! 🙏

I confirmed that the first two commits are essentially no-ops and then only reviewed the third commit.

Overall, everything looks sensible to me. I have a few detailed suggestions and one larger one concerning the PerObjectBlobInfoV2.

…vel blob info module. This commit also include some minor code fixes
…ermanentBlobInfo, move PermanentBlobInfo to its own module
Copy link
Copy Markdown
Contributor

@sadhansood sadhansood left a comment

Choose a reason for hiding this comment

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

Thanks @halfprice, i did a pass but I do not have in depth expertise of this part of the codebase. I'll try to do another one later today.

Copy link
Copy Markdown
Collaborator Author

@halfprice halfprice left a comment

Choose a reason for hiding this comment

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

Thanks @sadhansood for the

@halfprice halfprice requested review from mlegner and sadhansood March 13, 2026 03:07
@halfprice
Copy link
Copy Markdown
Collaborator Author

Hi @mlegner , I think it'll be easier to review the comments commit by commit.

8eba00b: in this commit, I moved PermanentBlobInfo to top module, along with a few other small changes addressing the comment.
ac87a22: in this commit, I moved some of the common function used in both ValidBlobInfoV1 and ValidBlobInfoV2 processing permanent blob to PermanentBlobInfo. Those functions were static function and remained static functions now. They probably be more suitable to be converted to a member method, but I don't want to further complicate this PR.
680d1ab: in this commit, I completely removed PerObjectBlobInfoV2. PerObjectBlobInfo updates in this PR is not really needed: the only place where it can link to BlobInfoV2 is in check_invariant() to check the consistency between BlobInfo and PerObjectBlobInfo. Since creating PerObjectPooledBlobInfo requires creating a new DBMAP, I'll leave all of these to follow up PRs.

In short, what this PR introduces is only the aggregated BlobInfoV2.

@halfprice
Copy link
Copy Markdown
Collaborator Author

@codex review

Copy link
Copy Markdown

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

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: 680d1abd18

ℹ️ 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 force-pushed the zhewu/blob_info_v2_2nd_attempt branch from 680d1ab to e0ca6c1 Compare March 13, 2026 04:13
Copy link
Copy Markdown
Contributor

@mlegner mlegner left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the changes, @halfprice. This LGTM. 💯

@halfprice halfprice enabled auto-merge (squash) March 16, 2026 04:50
@halfprice halfprice merged commit f1a9762 into main Mar 16, 2026
26 checks passed
@halfprice halfprice deleted the zhewu/blob_info_v2_2nd_attempt branch March 16, 2026 05:08
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.

4 participants