enhance: [2.5] Use mvcc timestamp as guarantee ts if set (#38980) (#39019)

Cherry pick from master
pr: #38980
When MvccTimestamp is set, it could be used as guarantee timestamp
directly instead of new ts allocated by scheduler reducing the waiting
time when delegator has tsafe lag

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
pull/39054/head
congqixia 2025-01-07 19:18:57 +08:00 committed by GitHub
parent 6f1febe881
commit 4b62dfd11f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -570,6 +570,7 @@ func (t *queryTask) queryShard(ctx context.Context, nodeID int64, qn types.Query
retrieveReq.GetBase().TargetID = nodeID
if needOverrideMvcc && mvccTs > 0 {
retrieveReq.MvccTimestamp = mvccTs
retrieveReq.GuaranteeTimestamp = mvccTs
}
req := &querypb.QueryRequest{