Skip to content

Commit

Permalink
Add more information to se1quencer panic message
Browse files Browse the repository at this point in the history
Adds a bunch more information to a panic message emitted by the
sequencer, in an effort to troubleshoot the cause of the panic.
  • Loading branch information
psFried committed Oct 16, 2024
1 parent ba1ed6d commit 2204057
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion message/sequencer.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,15 @@ func (w *Sequencer) Step() error {
// with one exception: messages with zero-valued Clocks are not
// expected to be consistently ordered on clock.
// In QueueUncommitted we synthetically assigned a clock value.
panic("ring clock <= emit.minClock")
panic(fmt.Sprintf("ring clock <= emit.minClock\n%+v", map[string]interface{}{
"uuid": uuid,
"message": w.Dequeued,
"dequeuedClock": w.dequeuedClock,
"offsets": w.offsets,
"partials": w.partials,
"pending": w.pending,
"emit": w.emit,
}))
}
} else if w.dequeuedClock > w.emit.maxClock {
continue // ACK'd clock tells us not to commit.
Expand Down

0 comments on commit 2204057

Please # to comment.