Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BACKPORT/23.0.x] 5610 5625 5660 #5678

Merged
merged 4 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .changelog/5660.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
go/worker/compute/executor/committee: Retry scheduling on failure
15 changes: 13 additions & 2 deletions go/worker/compute/executor/committee/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,8 @@ func (n *Node) startSchedulingBatch(ctx context.Context, batch []*txpool.TxQueue
n.logger.Error("runtime batch execution failed",
"err", err,
)
// Notify the round worker that the execution failed.
n.processedBatchCh <- nil
return
}

Expand All @@ -522,7 +524,7 @@ func (n *Node) startSchedulingBatch(ctx context.Context, batch []*txpool.TxQueue
Batch: rsp.TxHashes,
}

// Submit response to the executor worker.
// Submit response to the round worker.
n.processedBatchCh <- &processedBatch{
proposal: &proposal,
rank: n.rank,
Expand Down Expand Up @@ -770,6 +772,8 @@ func (n *Node) startProcessingBatch(ctx context.Context, proposal *commitment.Pr
n.logger.Error("runtime batch execution failed",
"err", err,
)
// Notify the round worker that the execution failed.
n.processedBatchCh <- nil
return
}

Expand Down Expand Up @@ -1217,6 +1221,13 @@ func (n *Node) handleProcessedBatch(ctx context.Context, batch *processedBatch)
}
lastHeader := n.blockInfo.RuntimeBlock.Header

// A nil batch indicates that scheduling or processing has failed.
// Return to the initial state and retry.
if batch == nil {
n.transitionState(StateWaitingForBatch{})
return
}

// Check if there was an issue during batch processing.
if batch.computed == nil {
n.logger.Warn("worker has aborted batch processing")
Expand Down Expand Up @@ -1691,7 +1702,7 @@ func (n *Node) roundWorker(ctx context.Context) {
// Process observed executor commitments.
n.handleObservedExecutorCommitment(ctx, ec)
case batch := <-n.processedBatchCh:
// Batch processing has finished.
// Batch processing has either finished or failed.
n.handleProcessedBatch(ctx, batch)
case <-schedulerRankTicker.C:
// Change scheduler rank and try again.
Expand Down
Loading