wu-sheng commented on a change in pull request #4987:
URL: https://github.com/apache/skywalking/pull/4987#discussion_r450280604



##########
File path: 
oap-server/server-receiver-plugin/skywalking-trace-receiver-plugin/src/main/java/org/apache/skywalking/oap/server/receiver/trace/provider/parser/listener/TraceSegmentSampler.java
##########
@@ -25,7 +25,7 @@
  * ignored
  */
 public class TraceSegmentSampler {
-    private TraceServiceModuleConfig config;
+    private volatile TraceServiceModuleConfig config;

Review comment:
       You are always using the same `config#getTraceSampleRateWatcher ` 
reference, right? As the `config` is never changed, you don't need this. 
`volatile` could cause more CPU, please use it if necessary.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to