michaeljmarshall commented on a change in pull request #13993:
URL: https://github.com/apache/pulsar/pull/13993#discussion_r794865472



##########
File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/impl/Backoff.java
##########
@@ -22,29 +22,59 @@
 import java.time.Clock;
 import java.util.Random;
 import java.util.concurrent.TimeUnit;
-import lombok.Data;
+import lombok.Getter;
 
-// All variables are in TimeUnit millis by default
-@Data

Review comment:
       Interestingly, it looks like spot bugs didn't like the change for the 
lack of synchronization introduced by the annotations:
   
   > Error: Medium: Inconsistent synchronization of 
org.apache.pulsar.client.impl.Backoff.next; locked 75% of time 
[org.apache.pulsar.client.impl.Backoff, org.apache.pulsar.client.impl.Backoff, 
org.apache.pulsar.client.impl.Backoff, org.apache.pulsar.client.impl.Backoff, 
org.apache.pulsar.client.impl.Backoff, org.apache.pulsar.client.impl.Backoff, 
org.apache.pulsar.client.impl.Backoff, org.apache.pulsar.client.impl.Backoff, 
org.apache.pulsar.client.impl.Backoff, org.apache.pulsar.client.impl.Backoff, 
org.apache.pulsar.client.impl.Backoff, org.apache.pulsar.client.impl.Backoff, 
org.apache.pulsar.client.impl.Backoff] Unsynchronized access at 
Backoff.java:[line 35]Unsynchronized access at Backoff.java:[line 
35]Unsynchronized access at Backoff.java:[line 35]Synchronized access at 
Backoff.java:[line 96]Synchronized access at Backoff.java:[line 99]Synchronized 
access at Backoff.java:[line 97]Synchronized access at Backoff.java:[line 
101]Synchronized access at Backoff.java:[line 101]Synchro
 nized access at Backoff.java:[line 142]Synchronized access at 
Backoff.java:[line 133]Synchronized access at Backoff.java:[line 
134]Synchronized access at Backoff.java:[line 134]Synchronized access at 
Backoff.java:[line 34] IS2_INCONSISTENT_SYNC




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


Reply via email to