tikv / pd

Placement driver for TiKV
Apache License 2.0
1.04k stars 719 forks source link

*: fix redact log (#8415) #8571

Closed ti-chi-bot closed 1 month ago

ti-chi-bot commented 1 month ago

This is an automated cherry-pick of #8415

What problem does this PR solve?

Issue Number: Close #8419.

What is changed and how does it work?

Check List

Tests

previous with redact log enabled:

[2024/07/18 11:32:59.548 +08:00] [INFO] [keyspace.go:383] ["[keyspace] added region label for keyspace"] [keyspace-id=0] [label-rule="{\"id\":\"keyspaces/0\",\"index\":0,\"labels\":[{\"key\":\"id\",\"value\":\"0\"}],\"rule_type\":\"key-range\",\"data\":[{\"start_key\":\"7200000000000000fb\",\"end_key\":\"7200000100000000fb\"},{\"start_key\":\"7800000000000000fb\",\"end_key\":\"7800000100000000fb\"}]}"] [takes=1.505851ms]
[2024/07/18 11:32:59.787 +08:00] [INFO] [cluster_worker.go:248] ["region batch split, generate new regions"] [region-id=12] [origin="id:14 end_key:\"748000FFFFFFFFFFFFF900000000000000F8\" region_epoch:<conf_ver:1 version:7 > peers:<id:15 store_id:1 >"] [total=1]

now with redact log disabled:

[2024/07/18 11:24:55.806 +08:00] [INFO] [keyspace.go:384] ["[keyspace] added region label for keyspace"] [keyspace-id=0] [label-rule="id: keyspaces/0, index: 0, type: key-range, labels: [key: id, value: 0], data: [startKey: {7200000000000000fb}, endKey: {7200000100000000fb}, startKey: {7800000000000000fb}, endKey: {7800000100000000fb}]"] [takes=1.031017ms]
[2024/07/18 11:24:56.768 +08:00] [INFO] [cluster_worker.go:248] ["region batch split, generate new regions"] [region-id=10] [origin="id:12 end_key:\"748000FFFFFFFFFFFFFA00000000000000F8\" region_epoch:<conf_ver:1 version:6 > peers:<id:13 store_id:1 >"] [total=1]

now with redact log enabled:

[2024/07/18 11:26:17.840 +08:00] [INFO] [keyspace.go:384] ["[keyspace] added region label for keyspace"] [keyspace-id=0] [label-rule=?] [takes=1.007138ms]
[2024/07/18 11:26:20.371 +08:00] [INFO] [cluster_worker.go:248] ["region batch split, generate new regions"] [region-id=14] [origin=?] [total=1]

Release note

None.
ti-chi-bot[bot] commented 1 month ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: HuSharp, lhy1024

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/tikv/pd/blob/release-7.1/OWNERS)~~ [HuSharp,lhy1024] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
ti-chi-bot[bot] commented 1 month ago

[LGTM Timeline notifier]

Timeline:

ti-chi-bot[bot] commented 1 month ago

@ti-chi-bot: Your PR was out of date, I have automatically updated it for you.

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

Instructions for interacting with me using PR comments are available [here](https://prow.tidb.net/command-help). If you have questions or suggestions related to my behavior, please file an issue against the [ti-community-infra/tichi](https://github.com/ti-community-infra/tichi/issues/new?title=Prow%20issue:) repository.