Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
Signed-off-by: Neil Shen <[email protected]>
  • Loading branch information
overvenus committed Sep 9, 2022
1 parent 5d9fa00 commit 177a161
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkg/manager/member/ticdc_member_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,17 @@ func (m *ticdcMemberManager) Sync(tc *v1alpha1.TidbCluster) error {
ns := tc.GetNamespace()
tcName := tc.GetName()

// skip sync if ticdc is suspended
component := v1alpha1.TiCDCMemberType
needSuspend, err := m.suspender.SuspendComponent(tc, component)
if err != nil {
return fmt.Errorf("suspend %s failed: %v", component, err)
}
if needSuspend {
klog.Infof("component %s for cluster %s/%s is suspended, skip syncing", component, ns, tcName)
return nil
}

// NB: All TiCDC operations, e.g. creation, scale, upgrade will be blocked.
// if PD or TiKV is not available.
if tc.Spec.PD != nil && !tc.PDIsAvailable() {
Expand Down

0 comments on commit 177a161

Please sign in to comment.