healchow commented on code in PR #7580:
URL: https://github.com/apache/inlong/pull/7580#discussion_r1161170819


##########
inlong-sort/sort-connectors/jdbc/src/main/java/org/apache/inlong/sort/jdbc/internal/JdbcMultiBatchingOutputFormat.java:
##########
@@ -547,7 +676,18 @@ protected void attemptFlush() throws IOException {
                             jdbcStatementExecutor.executeBatch();
                             Long totalDataSize =
                                     
Long.valueOf(record.toString().getBytes(StandardCharsets.UTF_8).length);
-                            outputMetrics(tableIdentifier, 1L, totalDataSize, 
false);
+                            if (dirtySinkHelper.getDirtySink() == null) {
+                                outputMetrics(tableIdentifier, (long) 
tableIdRecordList.size(),
+                                        totalDataSize, false);
+                            } else {
+                                try {
+                                    outputMetrics(tableIdentifier);
+                                } catch (Exception e) {
+                                    LOG.error("JDBC table metric calculation 
exception" + e);

Review Comment:
   ```suggestion
                                       LOG.error("JDBC table metric calculation 
exception: ", e);
   ```



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