yunqingmoswu commented on code in PR #6750:
URL: https://github.com/apache/inlong/pull/6750#discussion_r1040616694


##########
inlong-sort/sort-connectors/kafka/src/main/java/org/apache/inlong/sort/kafka/FlinkKafkaProducer.java:
##########
@@ -859,10 +861,14 @@ public void open(Configuration configuration) throws 
Exception {
                         @Override
                         public void onCompletion(RecordMetadata metadata, 
Exception e) {
                             if (e != null) {
-                                sendDirtyMetrics(rowSize, dataSize);
+                                
sinkMetricData.sendDirtyMetrics(metadata.topic(), 1L, dataSize);

Review Comment:
   It is inappropriate to determine whether it is dirty data here, because 
there may be network abnormalities, and it is recommended to be consistent with 
the judgment logic of dirty data archiving for dirty data



##########
inlong-sort/sort-connectors/kafka/src/main/java/org/apache/inlong/sort/kafka/FlinkKafkaProducer.java:
##########
@@ -875,7 +881,11 @@ public void onCompletion(RecordMetadata metadata, 
Exception e) {
                         public void onCompletion(RecordMetadata metadata, 
Exception exception) {
                             if (exception != null && asyncException == null) {
                                 asyncException = exception;
-                                sendDirtyMetrics(rowSize, dataSize);
+                                
sinkMetricData.sendDirtyMetrics(metadata.topic(), 1L, dataSize);

Review Comment:
   It is inappropriate to determine whether it is dirty data here, because 
there may be network abnormalities, and it is recommended to be consistent with 
the judgment logic of dirty data archiving for dirty data.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to