Skip to content

Commit

Permalink
debug: print extra debug info
Browse files Browse the repository at this point in the history
Release note: None
  • Loading branch information
darinpp committed Aug 17, 2020
1 parent 12049d3 commit 1b0fea6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions pkg/sql/row/kv_fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"github.com/cockroachdb/cockroach/pkg/roachpb"
"github.com/cockroachdb/cockroach/pkg/sql/sqlbase"
"github.com/cockroachdb/cockroach/pkg/storage/enginepb"
"github.com/cockroachdb/cockroach/pkg/util/log"
)

// KVFetcher wraps kvBatchFetcher, providing a NextKV interface that returns the
Expand Down Expand Up @@ -74,6 +75,9 @@ func (f *KVFetcher) NextKV(
var err error
key, rawBytes, f.batchResponse, err = enginepb.ScanDecodeKeyValueNoTS(f.batchResponse)
if err != nil {
if err != nil {
log.Errorf(ctx, "ScanDecodeKeyValueNoTS err %+v", ctx)
}
return false, kv, false, err
}
return true, roachpb.KeyValue{
Expand Down
2 changes: 1 addition & 1 deletion pkg/storage/enginepb/decode.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func ScanDecodeKeyValueNoTS(repr []byte) (key []byte, value []byte, orepr []byte
rawKey := repr[kvLenSize:keyEnd]
key, _, ok = SplitMVCCKey(rawKey)
if !ok {
return nil, nil, nil, errors.Errorf("invalid encoded mvcc key: %x", rawKey)
return nil, nil, nil, errors.Errorf("invalid encoded mvcc key: %x, input: %x", rawKey, repr)
}
return key, value, ret, err
}

0 comments on commit 1b0fea6

Please sign in to comment.