From 433accc7798e7546cd966aac2cb647d56c0ebe45 Mon Sep 17 00:00:00 2001 From: 3AceShowHand Date: Tue, 18 Oct 2022 22:00:56 +0800 Subject: [PATCH] fix call get capture by id, pass target capture id instead of the address. --- pkg/cluster/api/cdcapi.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cluster/api/cdcapi.go b/pkg/cluster/api/cdcapi.go index ce24660b80..51dc6cd32b 100644 --- a/pkg/cluster/api/cdcapi.go +++ b/pkg/cluster/api/cdcapi.go @@ -110,7 +110,7 @@ func drainCapture(client *CDCOpenAPIClient, target string) (int, error) { // DrainCapture request cdc owner move all tables on the target capture to other captures. func (c *CDCOpenAPIClient) DrainCapture(addr, target string, apiTimeoutSeconds int) error { - if _, err := c.getCaptureByID(addr); err != nil { + if _, err := c.getCaptureByID(target); err != nil { c.l().Debugf("cdc drain capture failed, cannot find the capture, address: %s, target: %s, err: %+v", addr, target, err) return err }