-
Notifications
You must be signed in to change notification settings - Fork 319
ensure that only one limit is used on query #1221
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
Changes from all commits
481907a
d69d02d
d82a8cf
c6c7ba9
202f1dd
c90f690
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@hyperdx/common-utils": patch | ||
"@hyperdx/app": patch | ||
--- | ||
|
||
Tweak getMapKeys to leverage one row limiting implementation |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -313,12 +313,12 @@ export class Metadata { | |
query_params: sql.params, | ||
connectionId, | ||
clickhouse_settings: { | ||
max_rows_to_read: String( | ||
this.getClickHouseSettings().max_rows_to_read ?? | ||
DEFAULT_METADATA_MAX_ROWS_TO_READ, | ||
), | ||
read_overflow_mode: 'break', | ||
...this.getClickHouseSettings(), | ||
// Max 15 seconds to get keys | ||
timeout_overflow_mode: 'break', | ||
max_execution_time: 15, | ||
// Set the value to 0 (unlimited) so that the LIMIT is used instead | ||
max_rows_to_read: '0', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you can probably set this to undefined instead There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we set it to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm I was thinking it would overwrite it but you're right. Alright let's give this a shot |
||
}, | ||
}) | ||
.then(res => res.json<Record<string, unknown>>()) | ||
|
@@ -642,12 +642,12 @@ export class Metadata { | |
connectionId: chartConfig.connection, | ||
clickhouse_settings: !disableRowLimit | ||
? { | ||
max_rows_to_read: String( | ||
this.getClickHouseSettings().max_rows_to_read ?? | ||
DEFAULT_METADATA_MAX_ROWS_TO_READ, | ||
), | ||
read_overflow_mode: 'break', | ||
...this.getClickHouseSettings(), | ||
// Max 15 seconds to get keys | ||
timeout_overflow_mode: 'break', | ||
max_execution_time: 15, | ||
// Set the value to 0 (unlimited) so that the LIMIT is used instead | ||
max_rows_to_read: '0', | ||
} | ||
: undefined, | ||
}) | ||
|
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.
@MikeShi42 you said "shorter query timeout" in the ticket- I guessed 15 seconds. Is this reasonable?