Skip to content

Refactor parts metadata - #669

Merged
MarcoPolo merged 5 commits into
masterfrom
refactor-partsMetadata
Feb 4, 2026
Merged

MarcoPolo merged 5 commits into
masterfrom
refactor-partsMetadata

Conversation

@MarcoPolo

Copy link
Copy Markdown
Contributor

To optimize when we send PartsMetadata we need the metadata to do two
things:

  • Get the union of two parts metadata.
  • Return if one parts metadata is a subset of another.

This allows us to avoid sending our updated partsMetadata to the peer
that gave us new data, as they can infer our updatedPartsMetadata.

To optimize when we send PartsMetadata we need the metadata to do two
things:

- Get the union of two parts metadata.
- Return if one parts metadata is a subset of another.

This allows us to avoid sending our updated partsMetadata to the peer
that gave us new data, as they can infer our updatedPartsMetadata.
@MarcoPolo
MarcoPolo force-pushed the refactor-partsMetadata branch from 4da181f to 15a568d Compare February 3, 2026 16:11
@MarcoPolo
MarcoPolo force-pushed the refactor-partsMetadata branch from 15a568d to 9085ee5 Compare February 3, 2026 23:28
@MarcoPolo
MarcoPolo merged commit 63d7d8e into master Feb 4, 2026
9 checks passed
@MarcoPolo
MarcoPolo deleted the refactor-partsMetadata branch February 4, 2026 13:42
Comment on lines +41 to +42
// Returns true if the object is a subset of B.
IsSubset(B PartsMetadata) bool

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

NIT:
IsSubsetOf is clearer, I think.

MarcoPolo added a commit that referenced this pull request Feb 12, 2026
MarcoPolo added a commit that referenced this pull request Feb 27, 2026
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