You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/06/29 00:24:28 UTC

[GitHub] [pulsar-client-go] dvergnes commented on a change in pull request #557: [Issue 556]Add jitter to exponential backoff (#556)

dvergnes commented on a change in pull request #557:
URL: https://github.com/apache/pulsar-client-go/pull/557#discussion_r660196553



##########
File path: pulsar/internal/backoff.go
##########
@@ -40,6 +43,7 @@ func (b *Backoff) Next() time.Duration {
 	} else if b.backoff.Nanoseconds() > maxBackoff.Nanoseconds() {
 		b.backoff = maxBackoff
 	}
+	jitter := rand.Float64() * float64(b.backoff) * jitterPercentage

Review comment:
       Yes, you are right. I updated the PR.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org