-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
fix: logs window based pagination to pageSize offset instead of using… #6830
base: main
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.
👍 Looks good to me! Reviewed everything up to d0a130f in 1 minute and 11 seconds
More details
- Looked at
1077
lines of code in5
files - Skipped
0
files when reviewing. - Skipped posting
4
drafted comments based on config settings.
1. pkg/query-service/app/querier/querier.go:357
- Draft comment:
The comment mentions a TODO for defining a limit for logs pagination. Consider addressing this or creating a follow-up task to ensure it's not forgotten. - Reason this comment was not posted:
Confidence changes required:50%
The PR changes the logic for pagination in logs queries to use pageSize and offset instead of id-based filtering. This change is reflected in thePrepareLogsQuery
function and therunWindowBasedListQuery
method. The tests have been updated to reflect these changes, ensuring that the new pagination logic is correctly implemented and tested. The PR description and issue indicate that the goal is to remove id from filters and use offset-based pagination, which is achieved in this PR.
2. pkg/query-service/app/querier/v2/querier.go:360
- Draft comment:
The comment mentions a TODO for defining a limit for logs pagination. Consider addressing this or creating a follow-up task to ensure it's not forgotten. - Reason this comment was not posted:
Confidence changes required:50%
The PR changes the logic for pagination in logs queries to use pageSize and offset instead of id-based filtering. This change is reflected in thePrepareLogsQuery
function and therunWindowBasedListQuery
method. The tests have been updated to reflect these changes, ensuring that the new pagination logic is correctly implemented and tested. The PR description and issue indicate that the goal is to remove id from filters and use offset-based pagination, which is achieved in this PR.
3. pkg/query-service/app/querier/querier.go:328
- 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 is applicable in multiple files in this PR. - Reason this comment was not posted:
Comment was not on a valid diff hunk.
4. pkg/query-service/app/querier/v2/querier.go:329
- 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 is applicable in multiple files in this PR. - Reason this comment was not posted:
Marked as duplicate.
Workflow ID: wflow_wnWrPRGO2OJr3e7o
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Please share the plan. I see this is still not merged SigNoz/signoz-otel-collector#489 |
okay so here is the release plan.
|
|
|
Is there a reason why only desc uses the window search now? Why can't the same be done for asc? |
So in this PR, wanted to focus on fixing the pagination just for the default page. So kept support for pagination asc aside. |
Ok, if there is no technical limitation to make the asc follow the same window-based search, it seemed like a small change so I brought it up. |
Sure, let me make the change. Make sense to do it now as might be left out. |
@srikanthccv I have updated the code to support order by asc both for logs and traces. added tests as well, please have a look also the previous mock results were, incorrect i.e the mock use to return data in asc order even though the query was order by desc. Have fixed that as well. |
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 0040169 in 1 minute and 12 seconds
More details
- Looked at
1693
lines of code in6
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. pkg/query-service/app/querier/v2/querier.go:326
- Draft comment:
The logic for updatinglimitWithOffset
is inconsistent between logs and traces. Ensure thatlimitWithOffset
is correctly updated for both logs and traces to avoid incorrect pagination behavior. - Reason this comment was not posted:
Comment did not seem useful.
2. pkg/query-service/app/querier/v2/querier_test.go:1221
- Draft comment:
The logic for updatinglimitWithOffset
is inconsistent between logs and traces. Ensure thatlimitWithOffset
is correctly updated for both logs and traces to avoid incorrect pagination behavior. - Reason this comment was not posted:
Marked as duplicate.
Workflow ID: wflow_mareoteHuPTh8Ms3
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
LGTM, let me know if you need approval now or later when it is verified with frontend integration. |
Fixes #6829
changes:-
@srikanthccv requesting your review here as you have context on this part.
Important
Updates logs pagination to use pageSize and offset, aligning with traces logic, and updates tests accordingly.
querier.go
andquerier/v2/querier.go
to usepageSize
andoffset
for logs, similar to traces.querier_test.go
andquerier/v2/querier_test.go
to reflect changes in pagination logic.pageSize
andoffset
.id DESC
to default order by clause inquery_builder.go
for logs.This description was created by for 0040169. It will automatically update as commits are pushed.