pingcap / pingcap/tidb

The log in `NewFrameItemFromRegionKey` is not clear when the key is not utf8 string

Open
#65,357 1 comment 0 reactions 0 assignees View on GitHub
component/ddl severity/minor type/bug
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

```go
logutil.BgLogger().Warn("decode region key failed", zap.ByteString("key", key), zap.Error(err))
```

In `NewFrameItemFromRegionKey`, we used `zap.ByteString` to print the key. However, if the key is not a valid utf8 string, it'll be turned into a truncated utf8 string with a lot of `\uFFFD`. It's not helpful for debug.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.