Skip to content

Conversation

brandon-pereira
Copy link
Contributor

Before: Both limit and max_rows_read sent with query, which can conflict and result in misses in reads

After: limit is sent and max_rows_read is set to unlimited rows so that the limit will always be met. Additionally, set a max query time of 15 seconds and break so that after 15 seconds results will always be shown.

Fixes HDX-2440

Copy link

changeset-bot bot commented Sep 29, 2025

🦋 Changeset detected

Latest commit: c90f690

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@hyperdx/common-utils Patch
@hyperdx/app Patch
@hyperdx/api Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Sep 29, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
hyperdx-v2-oss-app Ready Ready Preview Comment Oct 3, 2025 10:49pm

const { width, startResize } = useResizable(16, 'left');

const { data: countData } = useExplainQuery(chartConfig);
const numRows: number = countData?.[0]?.rows ?? 0;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removing unused code

...this.getClickHouseSettings(),
// Max 15 seconds to get keys
timeout_overflow_mode: 'break',
max_execution_time: 15,
Copy link
Contributor Author

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?

Copy link
Contributor

github-actions bot commented Sep 29, 2025

E2E Test Results

All tests passed • 25 passed • 3 skipped • 202s

Status Count
✅ Passed 25
❌ Failed 0
⚠️ Flaky 0
⏭️ Skipped 3

View full report →

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',
Copy link
Contributor

Choose a reason for hiding this comment

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

you can probably set this to undefined instead

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we set it toundefined then it gets merged with the default settings and gets set to what you have defined in settings. But if it is set, this has a higher priority

Copy link
Contributor

Choose a reason for hiding this comment

The 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

knudtty
knudtty previously approved these changes Oct 1, 2025
@brandon-pereira
Copy link
Contributor Author

Tested this change in stagingv2 and everything seemed to work well even on large time ranges (30d)

Copy link
Member

@wrn14897 wrn14897 left a comment

Choose a reason for hiding this comment

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

lgtm

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