Skip to content
Permalink
Browse files

0003879: MSSQL Bulk loader creates excessive logging when max batch size

for the load is greater than max rows to flush
  • Loading branch information...
jumpmind-josh committed Feb 21, 2019
1 parent 7b86fdb commit 1a7356b63afd8d6709da93b8ad4b910d4930b61e
@@ -205,7 +205,8 @@ protected void bulkWrite(CsvData data) {

protected void flush() {
if (loadedRows > 0) {
this.stagedInputFile.close();
this.stagedInputFile.close();

statistics.get(batch).startTimer(DataWriterStatisticConstants.LOADMILLIS);
String filename;
if (StringUtils.isEmpty(uncPath)) {
@@ -240,11 +241,12 @@ protected void flush() {
//TODO: clean this up, deal with errors, etc.?
stmt.execute(sql);
stmt.close();

loadedRows = 0;
} catch (SQLException ex) {
throw getPlatform().getSqlTemplate().translate(ex);
} finally {
statistics.get(batch).stopTimer(DataWriterStatisticConstants.LOADMILLIS);
this.stagedInputFile.delete();
}
}
}

0 comments on commit 1a7356b

Please sign in to comment.
You can’t perform that action at this time.