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
Truncate responses to /v1/query #13140
base: master
Are you sure you want to change the base?
Conversation
@Rramu91 the
Right now, there is no configuration parameter to change the value of This truncation only happens on the query overview page of the UI. There is no truncation of the query text on the query details page. Are you not seeing the query text being truncated on the main UI page? |
Thanks for the contribution! There are a few thoughts here, so to get into them...
|
Thanks. Since we did not have this fix merged, we fixed this internally a while ago. Query text are indeed getting truncated on the main UI page but It makes sense to add truncation in query details page as well. We have many queries with >800k chars in query text. Think it makes sense to truncate and not show full query text in the UI for these. |
@@ -82,7 +85,7 @@ public List<BasicQueryInfo> getAllQueryInfo(@QueryParam("state") String stateFil | |||
ImmutableList.Builder<BasicQueryInfo> builder = ImmutableList.builder(); | |||
for (BasicQueryInfo queryInfo : queries) { | |||
if (stateFilter == null || queryInfo.getState() == expectedState) { | |||
builder.add(queryInfo); | |||
builder.add(truncateQueryInfo(queryInfo, webUiConfig.getQueryMaxDisplayLength())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the purpose of truncating queries here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO truncation on the query overview page is sufficient, as that's what will get loaded the most and the sizes add up over queries. The loading of query details will be much less frequent, with only one query string being pulled in. And the string may not be the most expensive component anyway in the data being loaded on that page.
👋 @Rramu91 @phd3 - this PR has become inactive. We hope you are still interested in working on it. Please let us know, and we can try to get reviewers to help with that. We're working on closing out old and inactive PRs, so if you're too busy or this has too many merge conflicts to be worth picking back up, we'll be making another pass to close it out in a few weeks. |
Description
Too many of large queries, especially coming from BI tools - can slow down the loading of the UI. Hence we are truncating the responses sent to /v1/query.
Related issues, pull requests, and links
Documentation
( ) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.
Release notes
( ) No release notes entries required.
( ) Release notes entries required with the following suggested text: