mirror of
https://github.com/hyperdxio/hyperdx
synced 2026-04-21 13:37:15 +00:00
Ensure correct query timeout value is used. (#1417)
For example, it defaults to 60 seconds, but a timeout gets created for 60 milliseconds. ## Before <img width="2850" height="1264" alt="Screenshot 2025-11-28 at 2 11 33 PM" src="https://github.com/user-attachments/assets/8eff105b-39b0-459b-bdf3-a149645e3c57" /> ## After <img width="1848" height="1086" alt="Screenshot 2025-11-28 at 2 19 20 PM" src="https://github.com/user-attachments/assets/406f53ed-cda0-4ccc-9442-249d6a507a5a" /> Original PR: https://github.com/hyperdxio/hyperdx/pull/1072 Bug Introduced here: https://github.com/hyperdxio/hyperdx/pull/1132 Closes https://github.com/hyperdxio/hyperdx/issues/1416 Fixes HDX-2931
This commit is contained in:
parent
2f25ce6fa6
commit
3f94105891
3 changed files with 9 additions and 3 deletions
5
.changeset/giant-ways-taste.md
Normal file
5
.changeset/giant-ways-taste.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@hyperdx/app": patch
|
||||
---
|
||||
|
||||
fix issue with query timeout on the search page
|
||||
|
|
@ -11,7 +11,7 @@ jest.mock('@/api', () => ({
|
|||
useMe: () => ({
|
||||
data: {
|
||||
team: {
|
||||
queryTimeout: 30000,
|
||||
queryTimeout: 30,
|
||||
},
|
||||
},
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -165,12 +165,13 @@ const queryFn: QueryFunction<TQueryFnData, TQueryKey, TPageParam> = async ({
|
|||
const query = await renderChartConfig(windowedConfig, getMetadata());
|
||||
|
||||
const queryTimeout = queryKey[2];
|
||||
const clickhouseClient = getClickhouseClient();
|
||||
// TODO: it seems like queryTimeout is not being honored, we should fix this
|
||||
const clickhouseClient = getClickhouseClient({ queryTimeout });
|
||||
|
||||
// Create abort signal from timeout if provided
|
||||
const abortController = queryTimeout ? new AbortController() : undefined;
|
||||
if (abortController && queryTimeout) {
|
||||
setTimeout(() => abortController.abort(), queryTimeout);
|
||||
setTimeout(() => abortController.abort(), queryTimeout * 1000);
|
||||
}
|
||||
|
||||
const resultSet =
|
||||
|
|
|
|||
Loading…
Reference in a new issue