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 Jul 20, 2022
1 parent 7bd34f0 commit 8360cb0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/manager/member/ticdc_member_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ func (m *ticdcMemberManager) Sync(tc *v1alpha1.TidbCluster) error {
ns := tc.GetNamespace()
tcName := tc.GetName()

// 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() {
return controller.RequeueErrorf("TidbCluster: [%s/%s], TiCDC is waiting for PD cluster running", ns, tcName)
}
Expand Down Expand Up @@ -350,8 +352,8 @@ func getNewTiCDCStatefulSet(tc *v1alpha1.TidbCluster, cm *corev1.ConfigMap) (*ap
stsAnnotations := getStsAnnotations(tc.Annotations, label.TiCDCLabelVal)
headlessSvcName := controller.TiCDCPeerMemberName(tcName)

// NB: TiCDC control relies the format.
// TODO move advertise addr format to package controller.
// TiCDC control relays the format.
advertiseAddr := fmt.Sprintf("${POD_NAME}.${HEADLESS_SERVICE_NAME}.${NAMESPACE}.svc%s:8301",
controller.FormatClusterDomain(tc.Spec.ClusterDomain))
cmdArgs := []string{"/cdc server", "--addr=0.0.0.0:8301", fmt.Sprintf("--advertise-addr=%s", advertiseAddr)}
Expand Down

0 comments on commit 8360cb0

Please sign in to comment.