-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[Enhancement]: Pass mvccTS rather than BeginTS for Iterators #37158
Comments
what is beginTS? why does that has impact on performance? |
@xiaofan-luan the background of this issue was to use same mvcc timestamp for each sub requests of milvus/internal/proxy/task_search.go Lines 744 to 749 in fd72151
|
The current implementation is returning the Ideally, we could use mvcc ts in the first request, so that the following requests does not need to catch up |
/assign @MrPresent-Han |
For detailed explanation, see #37180 |
issue: #37158 Return the GuaranteeTS so that the subsequent requests following the correct TS. BeginTS is the current timestamp when the task is created. The GuaranteeTS is the one parsed based on both consistency level and beginTS, in PreExecute of the task on Proxy. The delegator will wait until GuaranteeTS is met. In PostExecute of the task on Proxy, the TS of the first iterator request will be returned to the SDK and add it to the subsequent requests. Hence, if the default consistency level is Eventually or Bounded, the order of TS will be > Guarantee TS < BeginTS If it returns the BeginTS, the second request will need to catch up and result in extra 200ms max of latency, which results in something like | Call | Latency | | --- | --- | | first call on `Next()` | 30ms | | second call on `Next()` | 210ms | | third call on `Next()` | 10ms | | fourth call on `Next()` | 11 ms | | ... | ... | where we expect | Call | Latency | | --- | --- | | first call on `Next()` | 30ms | | second call on `Next()` | 10ms | | third call on `Next()` | 10ms | | fourth call on `Next()` | 11 ms | | ... | ... | Signed-off-by: Patrick Weizhi Xu <[email protected]>
issue: #37158 pr: #37180 Signed-off-by: Patrick Weizhi Xu <[email protected]> (cherry picked from commit 80b0acd)
Consistency Level |
Copy from
BeginTS is the current timestamp when the task is created. Hence, if the default consistency level is Eventually or Bounded, the order of TS will be
If it returns the BeginTS, the second request will need to catch up and result in extra 200ms max of latency, which results in something like
where we expect
|
Hence, we return the MvccTs (tsafe) from the first request. Will deal with multiple shards in a separate issue/PR. |
issue: #37158 Signed-off-by: Patrick Weizhi Xu <[email protected]>
issue: #37158 pr: #37247 Signed-off-by: Patrick Weizhi Xu <[email protected]> (cherry picked from commit 5ed7230)
Is there a difference between multi shards and single shard or simply some extra work? |
/unassign |
/assign PwzXxm |
Is there an existing issue for this?
What would you like to be added?
Use mvccTS rather than BeginTS in the first search call of the Iterator, affecting seach/query iterators.
Why is this needed?
The second next() becomes slower than the first and the third.
One or two magnitude slower.
Anything else?
No response
The text was updated successfully, but these errors were encountered: