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/12/30 01:08:17 UTC

[GitHub] [inlong] yunqingmoswu commented on a diff in pull request #7088: [INLONG-7075][Sort] Add table level metric and dirty data backup for PostgreSQL

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


##########
inlong-sort/sort-connectors/jdbc/src/main/java/org/apache/inlong/sort/jdbc/internal/JdbcMultiBatchingOutputFormat.java:
##########
@@ -519,6 +512,9 @@ protected void attemptFlush() throws IOException {
                     if (!flushFlag && null != tableException) {
                         LOG.info("Put tableIdentifier:{} exception:{}",
                                 tableIdentifier, tableException.getMessage());
+                        outputMetrics(tableIdentifier, Long.valueOf(tableIdRecordList.size()),
+                                1L, true);
+                        dirtySinkHelper.invoke(record, DirtyType.RETRY_LOAD_ERROR, tableException);
                         tableExceptionMap.put(tableIdentifier, tableException);
                         if (isIgnoreTableException) {

Review Comment:
   It is better to rethrow the exception when 'isIgnoreTableException' is 'false'?



##########
inlong-sort/sort-connectors/jdbc/src/main/java/org/apache/inlong/sort/jdbc/internal/JdbcMultiBatchingOutputFormat.java:
##########
@@ -519,6 +512,9 @@ protected void attemptFlush() throws IOException {
                     if (!flushFlag && null != tableException) {
                         LOG.info("Put tableIdentifier:{} exception:{}",
                                 tableIdentifier, tableException.getMessage());
+                        outputMetrics(tableIdentifier, Long.valueOf(tableIdRecordList.size()),
+                                1L, true);
+                        dirtySinkHelper.invoke(record, DirtyType.RETRY_LOAD_ERROR, tableException);

Review Comment:
   Dirty data sink should be after restart with exception when the 'isIgnoreTableException' is 'false'



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