This is an automated email from the ASF dual-hosted git repository.

dockerzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git


The following commit(s) were added to refs/heads/master by this push:
     new 03a694cde4 [INLONG-8729][DataProxy] Wrong result in the 
addSendResultMetric function also reports success (#8730)
03a694cde4 is described below

commit 03a694cde467a5d891e0a5587c79825b81296227
Author: Goson Zhang <[email protected]>
AuthorDate: Tue Aug 15 17:56:45 2023 +0800

    [INLONG-8729][DataProxy] Wrong result in the addSendResultMetric function 
also reports success (#8730)
---
 .../inlong/dataproxy/sink/mq/MessageQueueZoneSinkContext.java       | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/sink/mq/MessageQueueZoneSinkContext.java
 
b/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/sink/mq/MessageQueueZoneSinkContext.java
index 495b62d325..0193eea6f9 100644
--- 
a/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/sink/mq/MessageQueueZoneSinkContext.java
+++ 
b/inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/sink/mq/MessageQueueZoneSinkContext.java
@@ -134,8 +134,10 @@ public class MessageQueueZoneSinkContext extends 
SinkContext {
     public void addSendResultMetric(PackProfile currentRecord, String mqName, 
String topic, boolean result,
             long sendTime) {
         if (currentRecord instanceof SimplePackProfile) {
-            AuditUtils.add(AuditUtils.AUDIT_ID_DATAPROXY_SEND_SUCCESS,
-                    ((SimplePackProfile) currentRecord).getEvent());
+            if (result) {
+                AuditUtils.add(AuditUtils.AUDIT_ID_DATAPROXY_SEND_SUCCESS,
+                        ((SimplePackProfile) currentRecord).getEvent());
+            }
             return;
         }
         BatchPackProfile batchProfile = (BatchPackProfile) currentRecord;

Reply via email to