From 75354bb722d1613d1c6d3aa58c92780aa1deb649 Mon Sep 17 00:00:00 2001 From: c36512 <2932477476@qq.com> Date: Sat, 10 May 2025 16:24:46 +0800 Subject: [PATCH] =?UTF-8?q?watch=E5=88=B0kvs=E6=9B=B4=E6=96=B0=E6=97=B6,?= =?UTF-8?q?=20=E9=9C=80=E8=A6=81=E5=AE=A2=E6=88=B7=E7=AB=AF=E9=87=8D?= =?UTF-8?q?=E6=96=B0=E8=8E=B7=E5=8F=96,=20=E9=81=BF=E5=85=8D=E8=B6=85?= =?UTF-8?q?=E6=97=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/resource/v1/kv_resource.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/resource/v1/kv_resource.go b/server/resource/v1/kv_resource.go index 5a163fb4..c5d54c6f 100644 --- a/server/resource/v1/kv_resource.go +++ b/server/resource/v1/kv_resource.go @@ -263,7 +263,7 @@ func isLegalWaitRequest(rctx *restful.Context, request *model.ListKVRequest) boo return true } func watch(rctx *restful.Context, request *model.ListKVRequest, wait string) bool { - changed, topic, err := eventHappened(wait, &pubsub.Topic{ + changed, _, err := eventHappened(wait, &pubsub.Topic{ Labels: request.Labels, Project: request.Project, MatchType: request.Match, @@ -274,7 +274,7 @@ func watch(rctx *restful.Context, request *model.ListKVRequest, wait string) boo return true } if changed { - queryFromCache(rctx, topic) + WriteErrResponse(rctx, config.ErrHasModified, "has modified") return true } return false