morningman commented on a change in pull request #497: Support io and cpu 
indicates for current query
URL: https://github.com/apache/incubator-doris/pull/497#discussion_r244979806
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/common/util/RuntimeProfile.java
 ##########
 @@ -67,19 +73,23 @@ public RuntimeProfile() {
         this.counterMap.put("TotalTime", counterTotalTime);
     }
     
-    public Counter getCounterTotalTime() {
+    public synchronized Counter getCounterTotalTime() {
         return counterTotalTime;
     }
 
-    public Map<String, Counter> getCounterMap() {
+    public synchronized Map<String, Counter> getCounterMap() {
 
 Review comment:
   this 'synchronized' is protect nothing. counterMap is returned, and the 
caller will get it and do anything without lock protection.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to