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/04/20 16:02:40 UTC

[GitHub] [pulsar] lhotari commented on a change in pull request #10278: [Java Client] Fix concurrency issue in client's producer epoch handling

lhotari commented on a change in pull request #10278:
URL: https://github.com/apache/pulsar/pull/10278#discussion_r616828913



##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConnectionHandler.java
##########
@@ -104,11 +108,15 @@ protected void reconnectLater(Throwable exception) {
         state.setState(State.Connecting);
         state.client.timer().newTimeout(timeout -> {
             log.info("[{}] [{}] Reconnecting after connection was closed", state.topic, state.getHandlerName());
-            ++epoch;
+            incrementEpoch();
             grabCnx();
         }, delayMs, TimeUnit.MILLISECONDS);
     }
 
+    protected long incrementEpoch() {

Review comment:
       that's true. I exposed it as `protected` since the `reconnectLater` method is `protected` and I was following a similar style.




-- 
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.

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