You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/05/18 00:29:21 UTC

[GitHub] [pulsar] sijie commented on a change in pull request #10618: [Functions] Process async results in the same Java runnable thread

sijie commented on a change in pull request #10618:
URL: https://github.com/apache/pulsar/pull/10618#discussion_r633949502



##########
File path: pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/JavaInstanceRunnable.java
##########
@@ -272,11 +273,12 @@ public void run() {
 
                 removeLogTopicHandler();
 
-                try {
-                    processResult(currentRecord, result);
-                } catch (Exception e) {
-                    log.warn("Failed to process result of message {}", currentRecord, e);
-                    currentRecord.fail();
+                // process the synchronous results
+                if (result != null) {
+                    handleResult(currentRecord, result);
+                } else {
+                    // process the asynchronous results
+                    processAsyncResults();

Review comment:
       @nlu90 Nice catch! I have addressed your comment in commit 326ae15




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