Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: use hex format for region meta key #1627

Merged
merged 4 commits into from
Jul 15, 2019
Merged

Conversation

rleungx
Copy link
Member

@rleungx rleungx commented Jul 10, 2019

What problem does this PR solve?

When printing the log, the region meta key is not in hex format in many places. e.g.

[2019/07/10 08:36:24.581 +00:00] [INFO] [cluster_worker.go:207] ["region batch split, generate new regions"] [region-id=48898216] [origin="[{\"id\":48904284,\"start_key\":\"NzQ4MDAwMDAwMDAwMDAwNUZGMTc1RjcyODAwMDAwMDAwMEZGNDZDOUE1MDAwMDAwMDAwMEZB\",\"end_key\":\"NzQ4MDAwMDAwMDAwMDAwNUZGMTc1RjcyODAwMDAwMDAwMEZGNDhFQUE4MDAwMDAwMDAwMEZB\",\"region_epoch\":{\"conf_ver\":74,\"version\":1332},\"peers\":[{\"id\":48904285,\"store_id\":1723600},{\"id\":48904286,\"store_id\":14},{\"id\":48904287,\"store_id\":12}]}]"] [total=1]

What is changed and how it works?

After this PR:

[2019/07/10 12:03:30.051 +00:00] [INFO] [cluster_worker.go:205] ["region batch split, generate new regions"] [region-id=179169] [origin="id:179249 start_key:\"7480000000000004FF0A00000000000000F8\" end_key:\"7480000000000004FF0B00000000000000F8\" region_epoch:<conf_ver:23 version:547 > peers:<id:179250 store_id:7 > peers:<id:179251 store_id:4 > peers:<id:179252 store_id:6 >"] [total=1]

Check List

Tests

  • Unit test
  • Manual test

Related changes

  • Need to cherry-pick to the release branch
  • Need to be included in the release notes

server/core/region.go Outdated Show resolved Hide resolved
server/core/region.go Outdated Show resolved Hide resolved
server/core/region.go Outdated Show resolved Hide resolved
server/core/region.go Outdated Show resolved Hide resolved
Copy link
Contributor

@shafreeck shafreeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

rleungx added 4 commits July 15, 2019 16:23
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
@rleungx
Copy link
Member Author

rleungx commented Jul 15, 2019

/rebuild

@rleungx rleungx merged commit d6b5378 into tikv:master Jul 15, 2019
rleungx added a commit to rleungx/pd that referenced this pull request Jul 15, 2019
nolouch pushed a commit that referenced this pull request Jul 15, 2019
* core: use hex format for region meta key (#1627)

Signed-off-by: Ryan Leung <[email protected]>=

* add CHANGELOG

Signed-off-by: Ryan Leung <[email protected]>
nolouch pushed a commit to nolouch/pd that referenced this pull request Jul 15, 2019
youjiali1995 pushed a commit that referenced this pull request Jul 17, 2019
* *:Start swithing to the zap logger (#1422)

Signed-off-by: nolouch <[email protected]>

* *: log format for schedule, scheduler, syncer, api (#1423)

* log format for schedule, scheduler, syncer, api

Signed-off-by: rleungx <[email protected]>

* pdctl, api: support hex format keys (#1309)

pdctl, api: support hex format keys

Signed-off-by: disksing <[email protected]>

* *: log format for tools, client, pkg, table (#1424)

* log format for tools, client, pkg, table, simulator

Signed-off-by: rleungx <[email protected]>

* *: log format for server (#1431)

* *: log format for server

Signed-off-by: nolouch <[email protected]>

* *: log format for logutil, server/core (#1438)

* *: log format for logutil,server/core

* *: improve some logs (#1516)

* improve some logs

Signed-off-by: Ryan Leung <[email protected]>

* log: do not add stack to error log (#1532)

* pkg, tools: improve the log message (#1636)

* pkg,tools: improve the log message

Signed-off-by: nolouch <[email protected]>

* core: use hex format for region meta key (#1627)

Signed-off-by: Ryan Leung <[email protected]>=

* address comments

Signed-off-by: nolouch <[email protected]>

* address comments

Signed-off-by: nolouch <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants