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/02 20:38:31 UTC

[GitHub] [pulsar] jerrypeng commented on a change in pull request #10775: Run code to respond to auth challenge in a different thread in the pulsar client

jerrypeng commented on a change in pull request #10775:
URL: https://github.com/apache/pulsar/pull/10775#discussion_r644303810



##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java
##########
@@ -1212,12 +1212,15 @@ void sendComplete(final Exception e) {
                     TimeoutException te = (TimeoutException) e;
                     long sequenceId = te.getSequenceId();
                     long ns = System.nanoTime();
+
+                    String firstSentString = firstSentAt == 0 ? "never" : String.format("%d ns ago", ns - firstSentAt);
+                    String lastSentString = lastSentAt == 0 ? "never" : String.format("%d ns ago", ns - lastSentAt);

Review comment:
       In java numeric primitives are by default initialized to 0 so explicitly initializing numeric primitive types to zero is superfluous.  I did not want to change more existing code that was not related to this 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.

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