RESOLVED - issue BATCH-1159: PROCESS_SKIP_COUNT seems not to ever get written to database

This commit is contained in:
dsyer
2009-03-18 16:36:00 +00:00
parent f988e9c9d9
commit c6ca23f224
2 changed files with 13 additions and 10 deletions

View File

@@ -62,7 +62,7 @@ public class JdbcStepExecutionDao extends AbstractJdbcBatchMetadataDao implement
private static final String UPDATE_STEP_EXECUTION = "UPDATE %PREFIX%STEP_EXECUTION set START_TIME = ?, END_TIME = ?, "
+ "STATUS = ?, COMMIT_COUNT = ?, READ_COUNT = ?, FILTER_COUNT = ?, WRITE_COUNT = ?, EXIT_CODE = ?, "
+ "EXIT_MESSAGE = ?, VERSION = ?, READ_SKIP_COUNT = ?, WRITE_SKIP_COUNT = ?, ROLLBACK_COUNT = ?, LAST_UPDATED = ?"
+ "EXIT_MESSAGE = ?, VERSION = ?, READ_SKIP_COUNT = ?, PROCESS_SKIP_COUNT = ?, WRITE_SKIP_COUNT = ?, ROLLBACK_COUNT = ?, LAST_UPDATED = ?"
+ " where STEP_EXECUTION_ID = ? and VERSION = ?";
private static final String GET_RAW_STEP_EXECUTIONS = "SELECT STEP_EXECUTION_ID, STEP_NAME, START_TIME, END_TIME, STATUS, COMMIT_COUNT,"
@@ -166,15 +166,17 @@ public class JdbcStepExecutionDao extends AbstractJdbcBatchMetadataDao implement
stepExecution.getStatus().toString(), stepExecution.getCommitCount(), stepExecution.getReadCount(),
stepExecution.getFilterCount(), stepExecution.getWriteCount(),
stepExecution.getExitStatus().getExitCode(), exitDescription, version,
stepExecution.getReadSkipCount(), stepExecution.getWriteSkipCount(),
stepExecution.getRollbackCount(), stepExecution.getLastUpdated(), stepExecution.getId(),
stepExecution.getVersion() };
int count = getJdbcTemplate().getJdbcOperations().update(
getQuery(UPDATE_STEP_EXECUTION),
parameters,
new int[] { Types.TIMESTAMP, Types.TIMESTAMP, Types.VARCHAR, Types.INTEGER, Types.INTEGER,
Types.INTEGER, Types.INTEGER, Types.VARCHAR, Types.VARCHAR, Types.INTEGER, Types.INTEGER,
Types.INTEGER, Types.INTEGER, Types.TIMESTAMP, Types.INTEGER, Types.INTEGER });
stepExecution.getReadSkipCount(), stepExecution.getProcessSkipCount(),
stepExecution.getWriteSkipCount(), stepExecution.getRollbackCount(),
stepExecution.getLastUpdated(), stepExecution.getId(), stepExecution.getVersion() };
int count = getJdbcTemplate().getJdbcOperations()
.update(
getQuery(UPDATE_STEP_EXECUTION),
parameters,
new int[] { Types.TIMESTAMP, Types.TIMESTAMP, Types.VARCHAR, Types.INTEGER, Types.INTEGER,
Types.INTEGER, Types.INTEGER, Types.VARCHAR, Types.VARCHAR, Types.INTEGER,
Types.INTEGER, Types.INTEGER, Types.INTEGER, Types.INTEGER, Types.TIMESTAMP,
Types.INTEGER, Types.INTEGER });
// Avoid concurrent modifications...
if (count == 0) {

View File

@@ -94,6 +94,7 @@ public abstract class AbstractStepExecutionDaoTests extends AbstractTransactiona
stepExecution.setStatus(BatchStatus.STARTED);
stepExecution.setReadSkipCount(7);
stepExecution.setProcessSkipCount(2);
stepExecution.setWriteSkipCount(5);
stepExecution.setProcessSkipCount(11);
stepExecution.setRollbackCount(3);