-
Notifications
You must be signed in to change notification settings - Fork 9
feat: pagination using offset-id #278
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #278 +/- ##
==========================================
- Coverage 71.16% 71.07% -0.09%
==========================================
Files 201 201
Lines 14773 14823 +50
==========================================
+ Hits 10513 10536 +23
- Misses 3515 3536 +21
- Partials 745 751 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| for i, doc := range docs { | ||
| docID := qpr.IDs[i].ID.String() | ||
| if fetchedIDs[docID] == true { | ||
| fmt.Println("bro") |
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.
seems like missed debug print
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.
nice catch, bro
# Conflicts: # proxy/search/search_request.go # storeapi/grpc_search.go
Description
A new way to paginate through logs which is similar to Elasticsearch
search_afterfeature. A user can take doc ID from the last doc on the page and use it as offset for the next page. The field is calledoffset-id: the first partoffsetoutlines that it provides offset feature, the partidpoints that it's a doc ID.Measurements
Our benchmarks
seq-db-paging.js
seq-db-offset-id.js (new)
Elasticsearch
Currently, it's unable to cope with 20 concurrent readers (all CPU is used) but even with a single reader it's slow. Will investigate later.
Results for other data
k8s_pod:payment-backend-* AND level:4, scroll 50 pages 100 logs each (cold run after seq-db restart)
2114 ms (offset) vs 1729 ms (offset-id)
k8s_pod:payment-backend-1 AND level:2, scroll 50 pages 100 logs each (cold run after seq-db restart)
468 ms (offset) vs 166 ms (offset-id)
Fixes #262
If you have used LLM/AI assistance please provide model name and full prompt: