Yizhou-Yang commented on code in PR #7580:
URL: https://github.com/apache/inlong/pull/7580#discussion_r1133669697


##########
inlong-sort/sort-connectors/jdbc/src/main/java/org/apache/inlong/sort/jdbc/internal/JdbcBatchingOutputFormat.java:
##########
@@ -277,7 +294,7 @@ public final synchronized void writeRecord(In record) {
             if (executionOptions.getBatchSize() > 0
                     && batchCount >= executionOptions.getBatchSize()) {
                 flush();
-                if (sinkMetricData != null) {
+                if (sinkMetricData != null && dirtySink == null) {
                     sinkMetricData.invoke(rowSize, dataSize);

Review Comment:
   if dirty sink is not null, the tablemetricExecutor will add metrics one time 
if it is initialized successfully. So the metric will be calculated twice.



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