Skip to content

Commit

Permalink
0005175: JdbcBatchBulkDatabaseWriter only uses one record in the batches
Browse files Browse the repository at this point in the history
for deletes, and fails on record 10000
  • Loading branch information
Philip Marzullo committed Dec 28, 2021
1 parent 35b2dcb commit a0a8db1
Showing 1 changed file with 12 additions and 0 deletions.
@@ -1,12 +1,14 @@
package org.jumpmind.symmetric.io;

import org.jumpmind.db.platform.IDatabasePlatform;
import org.jumpmind.db.sql.DmlStatement.DmlType;
import org.jumpmind.db.sql.JdbcSqlTemplate;
import org.jumpmind.db.sql.JdbcSqlTransaction;
import org.jumpmind.symmetric.SymmetricException;
import org.jumpmind.symmetric.common.ContextConstants;
import org.jumpmind.symmetric.io.data.Batch;
import org.jumpmind.symmetric.io.data.CsvData;
import org.jumpmind.symmetric.io.data.writer.Conflict;
import org.jumpmind.symmetric.io.data.writer.DatabaseWriterSettings;

public class JdbcBatchBulkDatabaseWriter extends AbstractBulkDatabaseWriter {
Expand Down Expand Up @@ -102,5 +104,15 @@ public void end(Batch batch, boolean inError) {
}


@Override
protected boolean requireNewStatement(DmlType currentType, CsvData data,
boolean applyChangesOnly, boolean useConflictDetection,
Conflict.DetectConflict detectType) {
if (currentType == DmlType.DELETE) {
applyChangesOnly = false;
}
return super.requireNewStatement(currentType, data, applyChangesOnly, useConflictDetection, detectType);
}

}

0 comments on commit a0a8db1

Please sign in to comment.