From 0aeef4c694d6b362b0a6754b0d4401fef0d8f77f Mon Sep 17 00:00:00 2001 From: kevindiu Date: Mon, 25 Sep 2023 06:15:56 +0000 Subject: [PATCH] update logic Signed-off-by: kevindiu --- pkg/gateway/lb/handler/grpc/handler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/gateway/lb/handler/grpc/handler.go b/pkg/gateway/lb/handler/grpc/handler.go index 6c1da5a4853..e5b77f46c33 100644 --- a/pkg/gateway/lb/handler/grpc/handler.go +++ b/pkg/gateway/lb/handler/grpc/handler.go @@ -1837,8 +1837,8 @@ func (s *server) Update(ctx context.Context, req *payload.Update_Request) (res * return nil, err } if conv.F32stos(vec.GetVector()) == conv.F32stos(req.GetVector().GetVector()) { - if req.GetConfig().GetUpdateTimestampIfExists() && vec.Timestamp == req.GetConfig().GetTimestamp() { - // if the vector is the same, broadcast update request to update index timestamp + if req.GetConfig().GetUpdateTimestampIfExists() && vec.Timestamp < req.GetConfig().GetTimestamp() { + // if the request vector timestamp is lager than existed one, broadcast update request to update index timestamp return broadcastUpdate() } if err == nil {