-
Notifications
You must be signed in to change notification settings - Fork 10
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
Extend peer task queue to work with want-have / want-block #8
Conversation
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.
LGTM. The only things that really need to be fixed are the documentation issues.
Otherwise, I'd like to give @hannahhoward a chance to review.
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.
Approve on the condition yall do the Graphsync update -- which I don't think will be too hard.
I am curious how this will affect allocations... I believe that part of the point of the old architecture was essentially to avoid every reallocating task blocks or changing the list order... hence the someone odd tactic of marking task blocks as garbage rather than removing them from the queue, until they got to the front. That always felt like possibly premature optimization but I don't know the history -- @Stebalien might.
So:
So yeah, probably premature (and possibly incorrect) optimization. |
go-ipfs-pq has this cryptic comment: // TODO explain why this interface should not be extended
// It does not support Remove. This is because... My assumption was that it doesn't support Perhaps we should add a |
I seem to recall asking Why about this and he couldn't remember. As far as I know, |
Ah, I guess |
Looking at the source code that is correct, Remove may do twice as many operations, depending on where in the heap the removed item is. In any case I agree that overall it's going to be either a negligible difference or maybe even net-positive to have |
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.
LGTM. Could you submit a PR against go-graphsync before we merge this?
Well, LGTM except the tests are failing. |
Created PR against go-graphsync: ipfs/go-graphsync#44 |
The Bitswap proof-of-concept
This PR extends peer task queue to support Bitswap's requirements and
See ipfs/go-bitswap#197