You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/03/03 13:07:03 UTC

[GitHub] [incubator-inlong] aloyszhang commented on a change in pull request #2878: [INLONG-2877][Agent]Agent task position manager throws npe when send dataproxy ack success

aloyszhang commented on a change in pull request #2878:
URL: https://github.com/apache/incubator-inlong/pull/2878#discussion_r818636958



##########
File path: inlong-agent/agent-plugins/src/main/java/org/apache/inlong/agent/plugin/sinks/SenderManager.java
##########
@@ -206,7 +206,13 @@ public void onMessageAck(SendResult result) {
                 return;
             }
             metric.incSendSuccessNum(bodyList.size());
-            taskPositionManager.updateSinkPosition(jobId, sourcePath, bodyList.size());
+            /**
+             * when there is no source, the position should not be stored locally
+             * since we report snapshot to manager already
+             */
+            if (sourcePath != null) {
+                taskPositionManager.updateSinkPosition(jobId, sourcePath, bodyList.size());
+            }

Review comment:
       Is there any need to add some logs for troubleshooting when `sourcePath` is null?




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

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org