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

Preserve LastComputeSeqNum if 0 #4775

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Changes from all commits
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
8 changes: 7 additions & 1 deletion pkg/orchestrator/nodes/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,13 @@ func (n *nodesManager) resolveStartingOrchestratorSeqNum(
// We should implement proper comparison logic to ensure sequence numbers only advance forward.
func (n *nodesManager) updateSequenceNumbers(state *models.ConnectionState, orchestratorSeq, computeSeq uint64) {
state.LastOrchestratorSeqNum = orchestratorSeq
state.LastComputeSeqNum = computeSeq

// Only update LastComputeSeqNum if greater than 0, as zero can indicate
// either no messages processed yet or a connection that has just been
// established. This preserves the existing sequence number in those cases.
if computeSeq > 0 {
state.LastComputeSeqNum = computeSeq
}
}

// enrichState adds live tracking data to a node state.
Expand Down
Loading