Skip to content

Commit

Permalink
0005118: During a full load do not ok existing batches for the same load
Browse files Browse the repository at this point in the history
id.
  • Loading branch information
joshahicks committed Nov 17, 2021
1 parent 21c30ec commit 8dc3880
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -1228,6 +1228,8 @@ private int insertSqlEventsPriorToReload(Node targetNode, String nodeIdRecord, l
loadId, createBy, channelId);
batchCount++;

long curBatchId = engine.getSequenceService().currVal(transaction, Constants.SEQUENCE_OUTGOING_BATCH);

/*
* Mark incoming batches as OK at the target node because we marked
* outgoing batches as OK at the source
Expand All @@ -1236,7 +1238,8 @@ private int insertSqlEventsPriorToReload(Node targetNode, String nodeIdRecord, l
transaction,
targetNode,
String.format(
"update %s_incoming_batch set status='OK', error_flag=0 where node_id='%s' and status != 'OK'",
"update %s_incoming_batch set status='OK', error_flag=0 where node_id='%s' and status != 'OK' "
+ "and batch_id < " + curBatchId,
tablePrefix, engine.getNodeService().findIdentityNodeId()), true,
loadId, createBy);
batchCount++;
Expand Down

0 comments on commit 8dc3880

Please sign in to comment.