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
chore(pullsync): cancel ruid cleanup #3456
Conversation
12cf358
to
49f3eb2
Compare
loggerV2.Debug("peer pulling", "peer_address", p.Address, "ruid", ru.Ruid) | ||
ctx, cancel := context.WithCancel(ctx) | ||
loggerV2.Debug("peer pulling", "peer_address", p.Address) | ||
|
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 if the peer goes away and we have active sync workers waiting to restart, but within this time, if the peer comes back and issues a fresh pull sync request, we should check here if we have the workers running, if yes we should clean them up.
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.
what does clean up imply here?
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.
What happens to the sync workers that are in progress? How does the handler take those into consideration?
If the peers try to sync again, then kademlia topo signal after the worker wakes up doesn't remove the peer, what will happen?
This ruid handling would cancel those contexts and close them. We would need to do something similar?
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.
If I understood the question:
If there is a hanging makeOffer call because there are not enough chunks to satisfy the request the makeOffer will timeout in 15 seconds with the worseCase timer in the falling edge detector. If the worry is there could be a leak, this is not the case.
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.
The cancel ruid functionality was to cancel this waiting makeOffer call but everything should be ok with this 15 second timer terminating the wait.
2175ccc
to
5167642
Compare
Checklist
Description
PR removes the cancellation ruid and all related code after the latest changes to the puller and pullsync protocols.
Open API Spec Version Changes (if applicable)
Motivation and Context (Optional)
Related Issue (Optional)
Screenshots (if appropriate):
This change is