-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat: support for window based pagination in new trace v4 #6440
base: develop
Are you sure you want to change the base?
Conversation
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.
❌ Changes requested. Reviewed everything up to 5bf01a7 in 49 seconds
More details
- Looked at
228
lines of code in4
files - Skipped
0
files when reviewing. - Skipped posting
6
drafted comments based on config settings.
1. pkg/query-service/app/querier/querier.go:310
- Draft comment:
The function name was changed fromrunLogsListQuery
torunWindowBasedListQuery
, but the comment above still refers to logs. Consider updating the comment for clarity. - Reason this comment was not posted:
Confidence changes required:50%
The function namerunLogsListQuery
was changed torunWindowBasedListQuery
in multiple places, but the comment above it still refers to logs. This should be updated for clarity.
2. pkg/query-service/app/querier/v2/querier.go:310
- Draft comment:
The function name was changed fromrunLogsListQuery
torunWindowBasedListQuery
, but the comment above still refers to logs. Consider updating the comment for clarity. - Reason this comment was not posted:
Confidence changes required:50%
The function namerunLogsListQuery
was changed torunWindowBasedListQuery
in multiple places, but the comment above it still refers to logs. This should be updated for clarity.
3. pkg/query-service/utils/logs.go:12
- Draft comment:
The functionGetLogsListTsRanges
was renamed toGetListTsRanges
, but the typeLogsListTsRange
was not renamed. Consider renaming the type for consistency. - Reason this comment was not posted:
Confidence changes required:50%
The functionGetLogsListTsRanges
was renamed toGetListTsRanges
, but the typeLogsListTsRange
was not renamed. For consistency, consider renaming the type as well.
4. pkg/query-service/utils/logs_test.go:10
- Draft comment:
The test function was renamed toTestListTsRange
, but the test case names still refer to logs. Consider updating the test case names for consistency. - Reason this comment was not posted:
Confidence changes required:50%
The test functionTestLogsListTsRange
was renamed toTestListTsRange
, but the test case names still refer to logs. Consider updating the test case names for consistency.
5. pkg/query-service/app/querier/querier.go:312
- Draft comment:
The functionrunWindowBasedListQuery
usesLogsListTsRange
from theutils
package, which is consistent with the updated function nameGetListTsRanges
. Ensure this change is reflected throughout the codebase. - Reason this comment was not posted:
Confidence changes required:20%
The functionrunWindowBasedListQuery
in bothquerier.go
andv2/querier.go
files is using theLogsListTsRange
type fromutils
package. The functionGetLogsListTsRanges
was renamed toGetListTsRanges
, and the test function was also updated accordingly. This change is consistent across the codebase.
6. pkg/query-service/app/querier/v2/querier.go:312
- Draft comment:
The functionrunWindowBasedListQuery
usesLogsListTsRange
from theutils
package, which is consistent with the updated function nameGetListTsRanges
. Ensure this change is reflected throughout the codebase. - Reason this comment was not posted:
Confidence changes required:20%
The functionrunWindowBasedListQuery
in bothquerier.go
andv2/querier.go
files is using theLogsListTsRange
type fromutils
package. The functionGetLogsListTsRanges
was renamed toGetListTsRanges
, and the test function was also updated accordingly. This change is consistent across the codebase.
Workflow ID: wflow_khr4V0jU0vDE3wFV
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
👍 Looks good to me! Incremental review on 5077726 in 22 seconds
More details
- Looked at
147
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
4
drafted comments based on config settings.
1. pkg/query-service/app/querier/querier.go:318
- Draft comment:
Typo in comment: "se we are considering only one query" should be "we are considering only one query". - Reason this comment was not posted:
Confidence changes required:10%
The code in both files has a typo in the comment on line 318. It says "se we are considering only one query" which should be "we are considering only one query".
2. pkg/query-service/app/querier/v2/querier.go:318
- Draft comment:
Typo in comment: "se we are considering only one query" should be "we are considering only one query". - Reason this comment was not posted:
Confidence changes required:10%
The code in both files has a typo in the comment on line 318. It says "se we are considering only one query" which should be "we are considering only one query".
3. pkg/query-service/app/querier/querier.go:318
- Draft comment:
Typo in comment: replace 'se' with 'we'. - Reason this comment was not posted:
Confidence changes required:10%
TherunWindowBasedListQuery
function in bothquerier.go
andv2/querier.go
files contain a typo in the comment on line 318. The word 'se' should be 'we'.
4. pkg/query-service/app/querier/v2/querier.go:318
- Draft comment:
Typo in comment: replace 'se' with 'we'. - Reason this comment was not posted:
Confidence changes required:10%
TherunWindowBasedListQuery
function in bothquerier.go
andv2/querier.go
files contain a typo in the comment on line 318. The word 'se' should be 'we'.
Workflow ID: wflow_Mtb7UHGHKrSBcsj5
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
👍 Looks good to me! Incremental review on 373397c in 14 seconds
More details
- Looked at
45
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_H7k9Ag1UC3fu7U6L
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
// if we don't find any trace in [t1, t10], then we search in [t10, 20] with offset=50, limit=100 | ||
if len(data) > 0 { | ||
params.CompositeQuery.BuilderQueries[qName].Offset = 0 | ||
params.CompositeQuery.BuilderQueries[qName].Limit = limit - uint64(len(data)) |
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.
You are over-subtracting by using the len of data
? It should be subtracting the data fetched in the last recent request, not the whole data
? Example, [t1-t2]:20, [t2-t3]:10, [t3-t4]:0, [t4:t5]:0, [t5:t6]:10, with offset = 0, limit = 40. after first iteration, the limit = 20, second iteration, the limit = 20 - (30) = -10.
Please add tests (use the clickhouse mocker to return rows).
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.
disregard, I see limit
is a global value that's not changed on each iteration. I would still encourage adding tests.
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.
For testing I will have to mock for reader, since I have to mock the function reader.GetListResultV3
. Any reference on how do I add that ?
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.
Have added testes, please have a look again @srikanthccv
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.
👍 Looks good to me! Incremental review on 7366913 in 25 seconds
More details
- Looked at
80
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. pkg/query-service/app/querier/querier.go:338
- Draft comment:
The comment 'this will to run only once' is misleading. The loop iterates over the 'queries' map, so it can run multiple times. Consider removing or correcting this comment. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
The comment seems to be incorrect because the loop iterates over a map, which can have multiple entries. The comment suggests a misunderstanding of the loop's behavior. The comment should likely be removed or corrected to reflect the actual behavior of the loop.
I might be missing some context about the 'queries' map, such as if it is guaranteed to have only one entry in this specific context. However, without explicit evidence in the provided code, the comment appears misleading.
The code does not provide any evidence that the 'queries' map will always have only one entry. Therefore, the comment is misleading and should be removed or corrected.
The comment is misleading because the loop can run multiple times depending on the number of entries in the 'queries' map. The comment should be removed or corrected.
2. pkg/query-service/app/querier/v2/querier.go:338
- Draft comment:
The comment 'this will to run only once' is misleading. The loop iterates over the 'queries' map, so it can run multiple times. Consider removing or correcting this comment. - Reason this comment was not posted:
Marked as duplicate.
Workflow ID: wflow_o1gmiLANWjDX3BdI
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
👍 Looks good to me! Incremental review on b8a803f in 14 seconds
More details
- Looked at
27
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. pkg/query-service/app/querier/querier.go:385
- Draft comment:
The change fromlimit - length
tolimit - uint64(len(data))
ensures that the limit is adjusted based on the actual data length, which is more accurate. This change is consistent in bothquerier.go
andquerier/v2.go
. - Reason this comment was not posted:
Confidence changes required:10%
The change fromlimit - length
tolimit - uint64(len(data))
is consistent in both files. This change ensures that the limit is adjusted based on the actual data length, which is a more accurate representation of the remaining limit.
Workflow ID: wflow_mlLaMu2CChPnVinF
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
👍 Looks good to me! Incremental review on dee206c in 44 seconds
More details
- Looked at
600
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. pkg/query-service/app/querier/querier_test.go:1148
- Draft comment:
The test functionTest_querier_runWindowBasedListQuery
is duplicated in bothquerier_test.go
andv2/querier_test.go
. Consider refactoring to avoid duplication. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
The comment is speculative as it refers to another file not included in the diff. Without evidence of duplication in the current file, the comment does not provide actionable feedback. The comment does not align with the rules as it is speculative and not based on changes in the current diff.
The comment might be valid if there is indeed a duplication in another file, but without seeing that file, it's impossible to confirm. The comment does not provide enough context or evidence to be actionable.
Even if the comment is correct, it does not pertain to changes made in this diff and lacks evidence. Therefore, it should be removed based on the rules provided.
Remove the comment as it is speculative and not based on changes in the current diff. It lacks evidence and actionable feedback.
Workflow ID: wflow_Zj5BZVKqUjLpytxW
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
👍 Looks good to me! Incremental review on 62c6c9b in 33 seconds
More details
- Looked at
53
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
3
drafted comments based on config settings.
1. pkg/query-service/app/querier/querier_test.go:1131
- Draft comment:
The renaming ofqueryMatcherAny
toregexMatcher
is consistent across both files, which is good. However, the change is purely cosmetic and doesn't affect functionality. Ensure the new name accurately reflects the purpose of the struct, which is to match SQL queries using regex. - Reason this comment was not posted:
Confidence changes required:20%
The renaming ofqueryMatcherAny
toregexMatcher
is consistent across both files, which is good. However, the change is purely cosmetic and doesn't affect functionality. It's important to ensure that the new name accurately reflects the purpose of the struct, which is to match SQL queries using regex.
2. pkg/query-service/app/querier/v2/querier_test.go:1188
- Draft comment:
The renaming ofqueryMatcherAny
toregexMatcher
is consistent across both files, which is good. However, the change is purely cosmetic and doesn't affect functionality. Ensure the new name accurately reflects the purpose of the struct, which is to match SQL queries using regex. - Reason this comment was not posted:
Confidence changes required:20%
The renaming ofqueryMatcherAny
toregexMatcher
is consistent across both files, which is good. However, the change is purely cosmetic and doesn't affect functionality. It's important to ensure that the new name accurately reflects the purpose of the struct, which is to match SQL queries using regex.
3. pkg/query-service/app/querier/querier_test.go:1134
- Draft comment:
Avoid using thecomponent/index.tsx
file structure approach, as it makes it difficult to debug and find components using global search tools like VS Code. This applies to theregexMatcher
type definition here and inquerier/v2/querier_test.go
. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
The comment is likely incorrect because it refers to a React component file structure, which is not applicable to a Go test file. The comment does not seem to address any changes made in the diff.
I might be missing some context about the project structure, but based on the file content, the comment seems irrelevant.
The file content and the nature of the comment strongly suggest that the comment is misplaced and irrelevant.
The comment should be deleted as it is not relevant to the changes made in the diff.
Workflow ID: wflow_2m0NuCHHYcSoquoP
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
FOR #5713
Adds support for window based pagination for traces.
Important
Adds window-based pagination for trace queries with utility updates and a new schema flag in
querier
andquerier/v2
.querier.go
andquerier/v2.go
.runWindowBasedListQuery()
to handle pagination logic.runBuilderListQueries()
to support trace data sources with pagination.GetLogsListTsRanges()
toGetListTsRanges()
.TestLogsListTsRange()
toTestListTsRange()
.UseTraceNewSchema
flag inquerier
andquerier/v2
to toggle new trace schema support.This description was created by for 62c6c9b. It will automatically update as commits are pushed.