pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [pulsar] cckellogg commented on a change in pull request #7010: Fix null pointer when getting function instance metrics.
Date Thu, 21 May 2020 15:27:09 GMT

cckellogg commented on a change in pull request #7010:
URL: https://github.com/apache/pulsar/pull/7010#discussion_r428723696



##########
File path: pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/JavaInstanceRunnable.java
##########
@@ -801,4 +810,12 @@ public void setupOutput(ContextImpl contextImpl) throws Exception {
             Thread.currentThread().setContextClassLoader(this.instanceClassLoader);
         }
     }
+
+    public String getStatsAsString() throws IOException {
+        if (stats != null) {

Review comment:
       We should synchronize this method as well?  
   
   Also line 241 (run() method) accesses the stats variable and the close() method does too.
Difference threads access these methods and change the stats variable. It's the same for other
variables in this class. 




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



Mime
View raw message