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 15:56:06 UTC

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

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



##########
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:
       Maybe we can keep this `private`, unless we need to expose.




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