Skip to content

Conversation

@ti-srebot
Copy link
Collaborator

@ti-srebot ti-srebot commented Mar 21, 2022

cherry-pick #557 to release-3.2
You can switch your code base to this Pull Request by using git-extras:

# In client-java repo:
git pr https://github.com/tikv/client-java/pull/560

After apply modifications, you can push your change to this PR via:

git push git@github.com:ti-srebot/client-java.git pr/560:release-3.2-d354ffc99aa0

Signed-off-by: iosmanthus myosmanthustree@gmail.com

What problem does this PR solve?

Issue Number: to #556

Problem Description:
Attach cluster_id and pd_addresses to slow log to distinguish the request destination while handling multiple TiKV clusters.

What is changed and how does it work?

Add withFields for SlowLogImpl, and use this interface to attach info dynamically while constructing the slow logger.

Code changes

  • Has exported function/method change

Check List for Tests

This PR has been tested by at least one of the following methods:

  • Unit test

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation
  • Need to be included in the release note

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Collaborator Author

/run-all-tests

@codecov
Copy link

codecov bot commented Mar 24, 2022

Codecov Report

❗ No coverage uploaded for pull request base (release-3.2@a72e550). Click here to learn what that means.
The diff coverage is n/a.

@@              Coverage Diff               @@
##             release-3.2     #560   +/-   ##
==============================================
  Coverage               ?   31.06%           
  Complexity             ?     1297           
==============================================
  Files                  ?      279           
  Lines                  ?    17371           
  Branches               ?     1980           
==============================================
  Hits                   ?     5397           
  Misses                 ?    11394           
  Partials               ?      580           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a72e550...a9088bf. Read the comment docs.

Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason zz-jason enabled auto-merge (squash) March 28, 2022 03:34
@zz-jason zz-jason disabled auto-merge March 28, 2022 04:45
@zz-jason zz-jason changed the title [to #556] slowlog: attach cluster_id and pd_addresses to slow log properties (#557) cherry pick #557 to release-3.2 Mar 28, 2022
@zz-jason zz-jason changed the title cherry pick #557 to release-3.2 [to #556] slowlog: attach cluster_id and pd_addresses to slow log properties (#557) Mar 28, 2022
@zz-jason zz-jason merged commit 7a4904e into tikv:release-3.2 Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants