Skip to content

Commit

Permalink
go/worker/executor: reinsert aborted txs on epoch transition
Browse files Browse the repository at this point in the history
  • Loading branch information
ptrus committed Sep 16, 2020
1 parent 6a28068 commit 89d75e6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions go/worker/compute/executor/committee/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,15 @@ func (n *Node) HandleEpochTransitionLocked(epoch *committee.EpochSnapshot) {

switch {
case epoch.IsExecutorMember():
if state, ok := n.state.(StateWaitingForFinalize); ok {
// In case we are finalizing a batch and epoch transition occurred,
// reinsert the failed transactions back into queue.
if err := n.scheduler.AppendTxBatch(state.raw); err != nil {
n.logger.Warn("failed reinserting aborted transactions in queue",
"err", err,
)
}
}
n.transitionLocked(StateWaitingForBatch{})
default:
n.transitionLocked(StateNotReady{})
Expand Down

0 comments on commit 89d75e6

Please sign in to comment.