RobertIndie commented on code in PR #1197:
URL: https://github.com/apache/pulsar-client-go/pull/1197#discussion_r1753903360


##########
pulsar/backoff/backoff.go:
##########
@@ -38,6 +45,13 @@ type DefaultBackoff struct {
        backoff time.Duration
 }
 
+func NewDefaultBackoff() Policy {
+       return &DefaultBackoff{}
+}
+func NewDefaultBackoffWithBackOff(backoff time.Duration) Policy {
+       return &DefaultBackoff{backoff: backoff}

Review Comment:
   ```suggestion
        return &DefaultBackoff{backoff: backoff / 2}
   ```
   
   I think we should treat this as the initial backoff time, right? 
   If it's, then we need to first divide the backoff by 2. Because each time 
Next is called, the backoff is doubled first.
   



##########
pulsar/backoff/backoff.go:
##########
@@ -38,6 +45,13 @@ type DefaultBackoff struct {
        backoff time.Duration
 }
 
+func NewDefaultBackoff() Policy {
+       return &DefaultBackoff{}
+}
+func NewDefaultBackoffWithBackOff(backoff time.Duration) Policy {

Review Comment:
   ```suggestion
   func NewDefaultBackoffWithInitialBackOff(backoff time.Duration) Policy {
   ```
   
   Seems this name would be better?



-- 
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-unsubscr...@pulsar.apache.org

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

Reply via email to