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(puller): increment from value on successful sync only and sleep only on connection error #3515

Merged
merged 3 commits into from Nov 9, 2022

Conversation

istae
Copy link
Member

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

Puller only sleeps when there is a connection related error from sync interval.
Sync from field is only incremented when previous sync attempt and received top value are good (nonzero)

Open API Spec Version Changes (if applicable)

Motivation and Context (Optional)

Related Issue (Optional)

Screenshots (if appropriate):


This change is Reviewable

@istae istae changed the title fix: increment from value on successful sync only and sleep only on connection error fix(puller): increment from value on successful sync only and sleep only on connection error Nov 9, 2022
@@ -303,12 +303,16 @@ func (s *Syncer) handler(streamCtx context.Context, p p2p.Peer, stream p2p.Strea
return fmt.Errorf("read get range: %w", err)
}

s.logger.Debug("make offer start", "bin", rn.Bin, "from", rn.From, "to", rn.To, "peer", 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.

To stay consistent I'd recommend renaming "peer" to "peer_address", the same is below.

Copy link
Member Author

Choose a reason for hiding this comment

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

I knew you were going to write this haha <3

@istae istae merged commit f656f01 into master Nov 9, 2022
@istae istae deleted the puller-fixes branch November 9, 2022 13:38
@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