From 3f18ff977c82735a68062e4e874ac762a7ccf279 Mon Sep 17 00:00:00 2001 From: Nathan VanBenschoten Date: Fri, 16 Nov 2018 14:21:50 -0500 Subject: [PATCH] storage/tscache: locally log full keys for inverted range Fatal Informs #32149. Release note: None --- pkg/storage/tscache/interval_skl.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/storage/tscache/interval_skl.go b/pkg/storage/tscache/interval_skl.go index 67b818af056c..30a77c84965f 100644 --- a/pkg/storage/tscache/interval_skl.go +++ b/pkg/storage/tscache/interval_skl.go @@ -18,6 +18,7 @@ package tscache import ( "bytes" "container/list" + "context" "encoding/binary" "fmt" "sync/atomic" @@ -248,8 +249,10 @@ func (s *intervalSkl) AddRange(from, to []byte, opt rangeOptions, val cacheValue } d++ } - panic(log.Safe(fmt.Sprintf("inverted range: key lens = [%d,%d), diff @ index %d", - len(from), len(to), d))) + msg := fmt.Sprintf("inverted range (issue #32149): key lens = [%d,%d), diff @ index %d", + len(from), len(to), d) + log.Errorf(context.Background(), "%s, [%s,%s)", msg, from, to) + panic(log.Safe(msg)) case cmp == 0: // Starting key is same as ending key, so just add single node. if opt == (excludeFrom | excludeTo) {