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

backend: add namespace/token to the log of BackendConnManager #241

Merged
merged 2 commits into from
Mar 7, 2023

Conversation

djshow832
Copy link
Collaborator

What problem does this PR solve?

Issue Number: close #240

Problem Summary:
Add namespace/token to the log of BackendConnManager to help debug.

What is changed and how it works:
Add UpdateLogger to ConnContext so that the HandshakeHandler can add customized fields.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code
[2023/03/07 17:07:48.831 +08:00] [ERROR] [main.proxy.conn.be] [backend/backend_conn_mgr.go:258] [get backend failed] [connID=2] [remoteAddr=127.0.0.1:51124] [ns=default] [duration=15.000067206s] [last_err="no instances to route"]

Notable changes

  • Has configuration change
  • Has HTTP API interfaces change (Don't forget to add the declarative for API)
  • Has tiproxyctl change
  • Other user behavior changes

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@djshow832 djshow832 requested a review from xhebox March 7, 2023 09:15
@xhebox xhebox merged commit 5a00605 into pingcap:main Mar 7, 2023
@djshow832 djshow832 deleted the router_id branch March 7, 2023 09:57
xhebox pushed a commit to xhebox/TiProxy that referenced this pull request Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add router ID to backendConnManager logger
2 participants