Skip to content

Commit

Permalink
fix call get capture by id, pass target capture id instead of the add…
Browse files Browse the repository at this point in the history
…ress.
  • Loading branch information
3AceShowHand committed Oct 18, 2022
1 parent 4675eba commit 433accc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/cluster/api/cdcapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 433accc

Please sign in to comment.