Skip to content

Conversation

@MathieuDutSik
Copy link
Contributor

Motivation

The pending_proposed_blobs needs to be simplified. But before that, we can restructure the access code.

Proposal

Group the operations in the querying of the data in maybe_get_required_blobs.

Test Plan

The CI.

Release Plan

  • Nothing to do / These changes follow the usual release cycle.

Links

None.

@MathieuDutSik MathieuDutSik marked this pull request as ready for review November 10, 2025 15:02
@ma2bd ma2bd requested review from afck and bart-linera December 6, 2025 18:32
Copy link
Contributor

@afck afck left a comment

Choose a reason for hiding this comment

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

Looks good to me; although it does make the code more complicated and in practice probably only a small fraction of blocks have a significant number of blobs. Either way, would be good to add some more comments to the code to make it easier to read.

*maybe_blob = Some(blob);
break;
}
for (_, pending_blobs) in self
Copy link
Contributor

Choose a reason for hiding this comment

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

You probably want to continue here if maybe_blob.is_some()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, you are very much correct.
I changed that part of the code significantly, though.

for (index, blob_id) in missing_indices.into_iter().zip(missing_blob_ids) {
for (_, pending_blob) in &pending_blobs {
if let Some(blob) = pending_blob.get(&blob_id).await? {
maybe_blobs[index].1 = Some(blob);
Copy link
Contributor

Choose a reason for hiding this comment

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

And break;?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. Sorry.

break;
.await?;
for (index, blob_id) in missing_indices.into_iter().zip(missing_blob_ids) {
for (_, pending_blob) in &pending_blobs {
Copy link
Contributor

Choose a reason for hiding this comment

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

(Strictly speaking, it's not a single pending_blob. It's still a collection of pending blobs that belong to a single block.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok. renamed "pending_blobs" as "all_entries_pending_blobs" and "pending_blob" as "pending_blobs".

@MathieuDutSik MathieuDutSik added this pull request to the merge queue Dec 8, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 8, 2025
@MathieuDutSik MathieuDutSik added this pull request to the merge queue Dec 8, 2025
Merged via the queue into linera-io:main with commit 016b225 Dec 8, 2025
34 checks passed
@MathieuDutSik MathieuDutSik deleted the pending_owner_blobs branch December 8, 2025 18:19
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