Skip to content

Commit

Permalink
storage/tscache: locally log full keys for inverted range Fatal
Browse files Browse the repository at this point in the history
Informs cockroachdb#32149.

Release note: None
  • Loading branch information
nvanbenschoten committed Nov 16, 2018
1 parent dffa94b commit 3f18ff9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/storage/tscache/interval_skl.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package tscache
import (
"bytes"
"container/list"
"context"
"encoding/binary"
"fmt"
"sync/atomic"
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 3f18ff9

Please sign in to comment.