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

[client-v2] Added setting log_comment #1864

Merged
merged 5 commits into from
Oct 29, 2024
Merged

[client-v2] Added setting log_comment #1864

merged 5 commits into from
Oct 29, 2024

Conversation

chernser
Copy link
Contributor

@chernser chernser commented Oct 10, 2024

Summary

There is an option to set a comment that will be seen in system.query_log record associated with a query. It is useful for troubleshooting. In case of HTTP interface client should send the comment thru query parameter log_comment.

Closes: #1836

Checklist

Delete items not relevant to your PR:

  • Unit and integration tests covering the common scenarios were added
  • A human-readable description of the changes was provided to include in CHANGELOG
  • For significant changes, documentation in https://github.com/ClickHouse/clickhouse-docs was updated with further explanations or tutorials

@chernser chernser marked this pull request as ready for review October 28, 2024 22:50
Copy link
Contributor

@mzitnik mzitnik left a comment

Choose a reason for hiding this comment

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

Looks like Query & Insert Settings share some variables do you think we should extract a common base for team?

@chernser
Copy link
Contributor Author

Thanks @mzitnik! I've replaced code with shared constant from ClientSettings.

@mzitnik
Copy link
Contributor

mzitnik commented Oct 29, 2024

Thanks @mzitnik! I've replaced code with shared constant from ClientSettings.

Actually was referring if we can have a common base class since there is shared code

Copy link

sonarcloud bot commented Oct 29, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
50.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@chernser
Copy link
Contributor Author

@mzitnik I think, we should not do it to keep developer away from idea of extracting common part.
I do not plan to add all server settings in such way and it should not be a problem for maintenance. What I'm afraid of that joining two separate mechanisms will lead to more rigid code and it will not save time as intendent.

@chernser chernser merged commit db1c498 into main Oct 29, 2024
59 of 60 checks passed
@chernser chernser deleted the v2_log_comment branch October 29, 2024 17:09
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.

[client-v2] Log Comment
2 participants