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

chore(pullsync): cancel ruid cleanup #3456

Merged
merged 2 commits into from Oct 28, 2022
Merged

chore(pullsync): cancel ruid cleanup #3456

merged 2 commits into from Oct 28, 2022

Conversation

istae
Copy link
Member

@istae istae commented Oct 25, 2022

Checklist

  • I have read the coding guide.
  • My change requires a documentation update, and I have done it.
  • I have added tests to cover my changes.
  • I have filled out the description and linked the related issues.

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 Reviewable

@istae istae force-pushed the pullsync-remove-cancel branch 2 times, most recently from 12cf358 to 49f3eb2 Compare October 26, 2022 10:19
@istae istae requested review from a team, vladopajic, notanatol and aloknerurkar and removed request for a team October 26, 2022 10:26
loggerV2.Debug("peer pulling", "peer_address", p.Address, "ruid", ru.Ruid)
ctx, cancel := context.WithCancel(ctx)
loggerV2.Debug("peer pulling", "peer_address", p.Address)

Copy link
Contributor

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.

Copy link
Member Author

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?

Copy link
Contributor

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?

Copy link
Member Author

@istae istae Oct 27, 2022

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.

Copy link
Member Author

@istae istae Oct 27, 2022

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.

@istae istae merged commit 67f0bc4 into master Oct 28, 2022
@istae istae deleted the pullsync-remove-cancel branch October 28, 2022 09:06
@aloknerurkar aloknerurkar added this to the 1.10.0 milestone Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants