-
Notifications
You must be signed in to change notification settings - Fork 165
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
feat: range request support #330
Conversation
iroh-resolver/src/unixfs.rs
Outdated
} | ||
|
||
fn poll_complete(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<std::io::Result<u64>> { | ||
Poll::Ready(Ok(0)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong return value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, would love some input on what it should be. I'm assuming the delta from the initial position which in a simplified version returns the seek offset?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think this is the delta, so we need to store it and return it. Later when we do seeking with loading, this will also delegate to an internal future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I took some time to understand this and as far as I get it it's not the delta but rather the final position it seeked to. Because otherwise the consumer would need to figure out what the delta means especially in circular buffer and negative moves etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes new offset from the start is what should be returned 👍
0d5a3ee
to
19692f6
Compare
@dignifiedquire can you take another look at the unixfs seeking, it's funkier now. |
} | ||
} | ||
|
||
#[tokio::test] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either in this PR or at least have an issue for seeking across dag-cbor, dag-json and raw files as well please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotta do other stuff before release :/
merge conflict 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, please also open an issue to add some additional tests on the seeking math, that is easy to get wrong on edge cases and I don't trust my own review of them. Some nice proptests should help for confidence.
Closes n0-computer/beetle#234