Skip to content

Commit

Permalink
0005927: Use sym_outgoing_error table to ignore a row in outgoing batch
Browse files Browse the repository at this point in the history
  • Loading branch information
Catherine Quamme authored and Catherine Quamme committed Jul 18, 2023
1 parent 5bd975a commit e15bb9b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Expand Up @@ -37,7 +37,9 @@
public interface IOutgoingBatchService {
public List<String> getNodesInError();

public void markAllAsSentForNode(String nodeId, boolean includeConfigChannel);
public void updateOutgoingError(long batchId, String nodeId);

public void markAllAsSentForNode(String nodeId, boolean includeConfigChannel);

public void markAllConfigAsSentForNode(String nodeId);

Expand Down
Expand Up @@ -36,7 +36,6 @@
import org.jumpmind.db.sql.ISqlTransaction;
import org.jumpmind.db.sql.Row;
import org.jumpmind.db.sql.mapper.LongMapper;
import org.jumpmind.db.sql.mapper.RowMapper;
import org.jumpmind.db.sql.mapper.StringMapper;
import org.jumpmind.symmetric.common.Constants;
import org.jumpmind.symmetric.common.ParameterConstants;
Expand Down Expand Up @@ -85,6 +84,10 @@ public OutgoingBatchService(IParameterService parameterService, ISymmetricDialec
setSqlMap(new OutgoingBatchServiceSqlMap(symmetricDialect.getPlatform(), createSqlReplacementTokens()));
}

public void updateOutgoingError(long batchId, String nodeId) {
sqlTemplate.update(getSql("updateOutgoingError"), batchId, nodeId);
}

@Override
public int cancelLoadBatches(long loadId) {
return sqlTemplate.update(getSql("cancelLoadBatchesSql"), new Date(), loadId);
Expand Down
Expand Up @@ -169,5 +169,7 @@ public OutgoingBatchServiceSqlMap(IDatabasePlatform platform,
+ " last_update_hostname, ?, create_time, 'copy' from $(outgoing_batch) where node_id=? and channel_id=? and batch_id > ?) ");
putSql("getAllBatchesSql", "select batch_id from $(outgoing_batch)");
putSql("whereInProgressStatusSql", "where status in (?, ?, ?, ?, ?) ");
putSql("updateOutgoingError",
"update $(outgoing_error) set resolve_ignore = 1 where batch_id = ? and node_id = ?");
}
}

0 comments on commit e15bb9b

Please sign in to comment.