You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "azexcy (via GitHub)" <gi...@apache.org> on 2023/04/26 06:14:40 UTC

[GitHub] [shardingsphere] azexcy commented on a diff in pull request #25307: Refactor data record merge at pipeline

azexcy commented on code in PR #25307:
URL: https://github.com/apache/shardingsphere/pull/25307#discussion_r1177390978


##########
kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/importer/DataSourceImporter.java:
##########
@@ -258,18 +242,46 @@ private void executeBatchDelete(final Connection connection, final List<DataReco
                 for (int i = 0; i < conditionColumns.size(); i++) {
                     Object oldValue = conditionColumns.get(i).getOldValue();
                     if (null == oldValue) {
-                        log.warn("Old value is null, column={}", conditionColumns.get(i));
+                        log.warn("Record old value is null, record={}", each);
                     }
                     preparedStatement.setObject(i + 1, oldValue);
                 }
                 preparedStatement.addBatch();
             }
-            preparedStatement.executeBatch();
+            int[] executeBatch = preparedStatement.executeBatch();
+            if (executeBatch.length == 0) {
+                log.warn("executeDelete failed, deleteSQL={}, conditionColumns={}", deleteSQL, conditionColumns);
+            }
         } finally {
             batchDeleteStatement = null;
         }
     }
     
+    private void sequentialFlush(final DataSource dataSource, final List<DataRecord> buffer) {

Review Comment:
   I find unique key update, delete event not handle correctly now, i will fix it at next PR.



-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org