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

wantlist entries are never cleared from gateway nodes #3165

Closed
whyrusleeping opened this issue Sep 1, 2016 · 4 comments
Closed

wantlist entries are never cleared from gateway nodes #3165

whyrusleeping opened this issue Sep 1, 2016 · 4 comments
Labels
kind/bug A bug in existing code (including security flaws) topic/bitswap Topic bitswap topic/gateway Topic gateway
Milestone

Comments

@whyrusleeping
Copy link
Member

The gateways wantlists seem to just get bigger and bigger as time goes on. We need to be clearing out entries related to gateway requests when each request terminates.

@whyrusleeping whyrusleeping added kind/bug A bug in existing code (including security flaws) topic/bitswap Topic bitswap topic/gateway Topic gateway labels Sep 1, 2016
@whyrusleeping whyrusleeping added this to the ipfs 0.4.4 milestone Sep 1, 2016
@ghost
Copy link

ghost commented Sep 1, 2016

Can wantlist entries be tied to a context?

@Kubuxu
Copy link
Member

Kubuxu commented Sep 1, 2016

I think we could, I don't know how far we are from passing the context to the bitswap.

Problem arises when there are two different requests wanting the same hash from bitswap.
Solution: reference counting in requests that were called only with context and periodic (?10min?) GC, if context is done, decrease the counter by one, if it is 0, remove the entry from wantlist.

Sounds good? I could get right to it.

@whyrusleeping
Copy link
Member Author

@Kubuxu each wantlist entry does have a context associated with it already. The issue is that if multiple requests reference the same block, you end up having to store multiple contexts, and respecting each of them.

@Kubuxu
Copy link
Member

Kubuxu commented Sep 13, 2016

Resolved by #3182

@Kubuxu Kubuxu closed this as completed Sep 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) topic/bitswap Topic bitswap topic/gateway Topic gateway
Projects
None yet
Development

No branches or pull requests

2 participants