Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a SkipNext method on block reader #338

Merged
merged 5 commits into from
Oct 20, 2022
Merged

Conversation

willscott
Copy link
Member

@willscott willscott commented Oct 19, 2022

alternative to #337

  • Confirm interface meets piece store index needs.
  • Tests

@willscott willscott requested review from dirkmc and masih October 19, 2022 09:55
}

if sctSize == 0 {
_, _, err := cid.CidFromBytes([]byte{})
Copy link
Member

Choose a reason for hiding this comment

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

Props for this hack to get the right error msg

v2/block_reader.go Outdated Show resolved Hide resolved
Copy link
Member

@rvagg rvagg left a comment

Choose a reason for hiding this comment

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

lgtm if it serves purpose, although I'm a little skeptical that the skipping is going to save much aside from passing slices around given the likely layering of buffered reads down to the OS and the size of our blocks being relatively small. But maybe that's worth it?

@willscott willscott merged commit 50e029b into master Oct 20, 2022
@willscott willscott deleted the feat/skipBlockReader branch October 20, 2022 09:27
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