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

refactor: add request id in context #1153

Merged
merged 5 commits into from
Aug 16, 2023
Merged

Conversation

jiacai2050
Copy link
Contributor

@jiacai2050 jiacai2050 commented Aug 15, 2023

Rationale

Currently when query failed, the error log doesn't contain request id, this makes it's very hard to tell how long the error query takes.

Detailed Changes

  • Add request_id in context, and print this ctx when query failed.
  • Remove enable_partition_table_access, runtime from context to avoid unnecessary clone.
  • Remove unnecessary param's move, change to reference.

Test Plan

proxy/src/grpc/sql_query.rs Outdated Show resolved Hide resolved
proxy/src/lib.rs Show resolved Hide resolved
proxy/src/http/prom.rs Outdated Show resolved Hide resolved
proxy/src/http/prom.rs Outdated Show resolved Hide resolved
Copy link
Member

@ShiKaiWi ShiKaiWi left a comment

Choose a reason for hiding this comment

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

LGTM

@ShiKaiWi ShiKaiWi merged commit 62b061c into apache:main Aug 16, 2023
5 checks passed
@jiacai2050 jiacai2050 deleted the fix-req-id branch August 16, 2023 11:08
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.

3 participants