feat(StreamSearch): add stream search on stores - #496
Conversation
|
❌ PR Title Validation Failed |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #496 +/- ##
==========================================
- Coverage 71.55% 71.39% -0.16%
==========================================
Files 239 249 +10
Lines 20145 21359 +1214
==========================================
+ Hits 14415 15250 +835
- Misses 4649 4961 +312
- Partials 1081 1148 +67 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🔴 Performance DegradationSome benchmarks have degraded compared to the previous run. Show table
|
d37021e to
cc4aa61
Compare
🔴 Performance DegradationSome benchmarks have degraded compared to the previous run. Show table
|
cc4aa61 to
c407209
Compare
0225e10 to
b64b851
Compare
🔴 Performance DegradationSome benchmarks have degraded compared to the previous run. Show table
|
ddeba26 to
71187db
Compare
2d709f3 to
ea640c6
Compare
🔴 Performance DegradationSome benchmarks have degraded compared to the previous run. Show table
|
ea640c6 to
0d42fed
Compare
dkharms
left a comment
There was a problem hiding this comment.
In overall I like the idea. Would be interesting to see how it will evolve :)
| } | ||
|
|
||
| message ResponseHeader { | ||
| repeated Typing typing = 1; |
There was a problem hiding this comment.
Do I understand correctly that ResponseHeader (and therefore type information) describes all values that are returned from store as Record?
So, for example, if result of aggregation, like (I am using PRQL syntax here):
filter foo == "bar"
group {service, handler} (
aggregate {avg_duration = average duration}
)
header will contain [(avg_duration, FLOAT64); (service, STRING); (handler, STRING)]? And each record must satisfy this constraint, right?
| ControlAction action = 1; | ||
| } | ||
|
|
||
| enum ControlAction { |
There was a problem hiding this comment.
IIRC, we were thinking about pull-based model where seqproxy will pull data from store in blocks so it could have more control on memory usage. Should we add PULL control action here as well? Or we rely on gRPC protocol and stream.Recv?
P.S. Sorry, I am just starting reviewing this PR so I may ask stupid questions.
There was a problem hiding this comment.
yes, stream.Recv acts as a pull command
| repeated Typing typing = 1; | ||
| } | ||
|
|
||
| message Typing { |
There was a problem hiding this comment.
Also I believe we should add (maybe even here) encoding we've used for this type (or block of records). What do you think? Of course, it is out of scope of this PR.
There was a problem hiding this comment.
we will need it if there will be multiple ways to encode the same data, which is possible
| } | ||
|
|
||
| message Record { | ||
| repeated bytes raw_data = 1; |
There was a problem hiding this comment.
Why Record consists of array of byte arrays? Why not just single byte array?
There was a problem hiding this comment.
each inner array represents single "field" of a "table". it's easier to pack and unpack this way
and we get partial unpacking of a record out-of-the-box
| done bool | ||
| } | ||
|
|
||
| func NewMerger( |
There was a problem hiding this comment.
I do not think that this should be part of public API -- NewNMergedProducers is enough.
| } | ||
| } | ||
|
|
||
| func NewNMergedProducers( |
There was a problem hiding this comment.
We might want to move each individual fraction to a producer (when we implement timestamp binning) and merge them into a single stream at the store using the same executor.
| import ( | ||
| "cmp" | ||
|
|
||
| insaneJSON "github.com/ozontech/insane-json" |
There was a problem hiding this comment.
I think usage of insane-json for now is just a overcomplication -- it brings to the table a lot of unnecessary memory-management.
There was a problem hiding this comment.
maybe we'll replace insane-json with something else
| DataTypeUint32 | ||
| DataTypeUint64 | ||
| DataTypeInt32 | ||
| DataTypeInt64 |
There was a problem hiding this comment.
Maybe we can reduce to UINT, INT and FLOAT? And make them 64 bits by default.
Description
Add StreamSearch method on stores
Add Executors
Serve StreamSearch with executors
Fixes #483
If you have used LLM/AI assistance please provide model name and full prompt: