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

fix: pullsync will only return an error if the interval needs to be retried #3555

Merged
merged 2 commits into from Nov 16, 2022

Conversation

istae
Copy link
Member

@istae istae commented Nov 16, 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

Pullsync will only return an error if the interval needs to be retried, (eg: connection or localstore related errors), for other errors, we simply log and continue the operation.
This way the puller can easily determine when to retry the same interval.

Open API Spec Version Changes (if applicable)

Motivation and Context (Optional)

Related Issue (Optional)

Screenshots (if appropriate):


This change is Reviewable

@istae istae marked this pull request as ready for review November 16, 2022 15:20
@istae istae changed the title fix: puller retry internal on error fix: pullsync will only return an error if the interval needs to be retried Nov 16, 2022
@@ -120,7 +120,7 @@ func (s *Syncer) Protocol() p2p.ProtocolSpec {
// provide less chunks than requested.
func (s *Syncer) SyncInterval(ctx context.Context, peer swarm.Address, bin uint8, from, to uint64) (uint64, error) {
isLiveSync := to == MaxCursor
loggerV2 := s.logger.V(2).Register()
// loggerV2 := s.logger.V(2).Register()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be removed when it's not used.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, mainnet will have all of these logs disabled

@istae istae merged commit b73cf9c into master Nov 16, 2022
@istae istae deleted the pullsync-fix branch November 16, 2022 20:31
@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

4 participants