Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/giant-ways-taste.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hyperdx/app": patch
---

fix issue with query timeout on the search page
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jest.mock('@/api', () => ({
useMe: () => ({
data: {
team: {
queryTimeout: 30000,
queryTimeout: 30,
},
},
}),
Expand Down
5 changes: 3 additions & 2 deletions packages/app/src/hooks/useOffsetPaginatedQuery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Copy link
Member Author

Choose a reason for hiding this comment

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

I added this here, doesn't hurt to pass it


// 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 =
Expand Down
Loading