Skip to content

Conversation

@vlerdman
Copy link

This PR adds tracking total size of nodes during graph walk. New code saves backward compability with ipfs/kubo.

Changes

  • Extend merkledag.ProgressTracker to save and update TotalSize of visited nodes
  • Update progress via wrapping GetLinksDirect function instead of visit
  • Update testProgressIndicator for checking TotalSize

References

@vlerdman vlerdman requested a review from a team as a code owner November 23, 2025 13:10
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

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

@vlerdman thank you for submitting this – any chance you could also:

  • open a PR in https://github.com/ipfs/kubo that uses this in ipfs pin add command and has green CI there as well
    ? (it would speed up review process)

Comment on lines 469 to 472
// Total is the total number of nodes fetched.
Total int
// TotalSize is the total size of the nodes fetched.
TotalSize uint64
Copy link
Member

Choose a reason for hiding this comment

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

nit: good oportunity to be more clear than ambigous "Total", perhaps:

  Nodes int    // number of nodes visited
  Bytes uint64 // total bytes of raw block data

Copy link
Author

Choose a reason for hiding this comment

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

Changed

@vlerdman
Copy link
Author

vlerdman commented Nov 24, 2025

@vlerdman thank you for submitting this – any chance you could also:

  • open a PR in https://github.com/ipfs/kubo that uses this in ipfs pin add command and has green CI there as well
    ? (it would speed up review process)

@lidel Thanks for such fast feedback! Opened a PR - ipfs/kubo#11074

@hsanjuan
Copy link
Contributor

Triage:

  • Will be reviewed and probably going into 0.40.

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.

Add total size of pinned objects to pin add progress reports.

4 participants