nisiyong commented on a change in pull request #6009:
URL: https://github.com/apache/skywalking/pull/6009#discussion_r543157454
##########
File path:
apm-commons/apm-datacarrier/src/main/java/org/apache/skywalking/apm/commons/datacarrier/partition/SimpleRollingPartitioner.java
##########
@@ -18,16 +18,18 @@
package org.apache.skywalking.apm.commons.datacarrier.partition;
+import java.util.concurrent.atomic.AtomicInteger;
+
/**
* use normal int to rolling.
*/
public class SimpleRollingPartitioner<T> implements IDataPartitioner<T> {
- @SuppressWarnings("NonAtomicVolatileUpdate")
- private volatile int i = 0;
+
+ private final AtomicInteger i = new AtomicInteger();
Review comment:
> in the partition, there is a lock to avoid the real issue.
Could you tell me where the lock is? I want to take a look.
----------------------------------------------------------------
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:
[email protected]