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
# Conflicts:
#	symmetric-client/src/main/java/org/jumpmind/symmetric/io/JdbcBatchBulkDatabaseWriter.java
  • Loading branch information
Philip Marzullo committed Dec 28, 2021
1 parent eed8624 commit 97af697
Showing 1 changed file with 12 additions and 0 deletions.
Expand Up @@ -21,12 +21,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 @@ -118,4 +120,14 @@ public void end(Batch batch, boolean inError) {
}
super.end(batch, 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 97af697

Please sign in to comment.