Skip to content

Commit

Permalink
Clarify deadlock panic message (#2605)
Browse files Browse the repository at this point in the history
* Clarify deadlock panic message

Signed-off-by: Yuri Shkuro <[email protected]>

* Remove stacktrace

Signed-off-by: Yuri Shkuro <[email protected]>
  • Loading branch information
yurishkuro authored Oct 29, 2020
1 parent 76b8fba commit 26b6116
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions cmd/ingester/app/consumer/deadlock_detector.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package consumer

import (
"runtime"
"strconv"
"sync/atomic"
"time"
Expand Down Expand Up @@ -67,10 +66,9 @@ func newDeadlockDetector(metricsFactory metrics.Factory, logger *zap.Logger, int
metricsFactory.Counter(metrics.Options{Name: "deadlockdetector.panic-issued", Tags: map[string]string{"partition": strconv.Itoa(int(partition))}}).Inc(1)
time.Sleep(time.Second) // Allow time to flush metric

buf := make([]byte, 1<<20)
logger.Panic("No messages processed in the last check interval",
zap.Int32("partition", partition),
zap.String("stack", string(buf[:runtime.Stack(buf, true)])))
logger.Panic("No messages processed in the last check interval, possible deadlock, exiting. "+
"This behavior can be disabled with --ingester.deadlockInterval=0 flag.",
zap.Int32("partition", partition))
}

return deadlockDetector{
Expand Down

0 comments on commit 26b6116

Please sign in to comment.