Jason918 commented on a change in pull request #12779:
URL: https://github.com/apache/pulsar/pull/12779#discussion_r748801509
##########
File path:
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConnectionHandler.java
##########
@@ -37,7 +37,8 @@
protected final Backoff backoff;
private static final AtomicLongFieldUpdater<ConnectionHandler>
EPOCH_UPDATER = AtomicLongFieldUpdater
.newUpdater(ConnectionHandler.class, "epoch");
- private volatile long epoch = 0L;
+ // Start with -1L because it gets incremented before sending on the first
connection
+ private volatile long epoch = -1L;
Review comment:
OK, I see. I am OK with this new starting value.
But IMHO, it's better to assert that the epoch value increased after a
single producer reconnect to avoid more flaky test.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]