func (tcc *Controller) sync(key string) error {
	startTime := time.Now()
	defer func() {
		klog.V(4).Infof("Finished syncing TikvCluster %q (%v)", key, time.Since(startTime))
	}()

	ns, name, err := cache.SplitMetaNamespaceKey(key)
	if err != nil {
		return err
	}
	tc, err := tcc.tcLister.TikvClusters(ns).Get(name)
	if errors.IsNotFound(err) {
		klog.Infof("TikvCluster has been deleted %v", key)
		return nil
	}
	if err != nil {
		return err
	}

	return tcc.syncTikvCluster(tc.DeepCopy())
}
// sync syncs the given tikvcluster.
sync syncs the given tikvcluster.
// sync syncs the given tikvcluster .
func (tcc *Controller) sync(key string) error {
	startTime := time.Now()
	defer func() {
		klog.V(4).Infof("Finished syncing TikvCluster %q (%v)", key, time.Since(startTime))
	}()
	ns, name, err := cache.SplitMetaNamespaceKey(key)
	if err != nil {
		return err
	}
	tc, err := tcc.tcLister.TikvClusters(ns).Get(name)
	if errors.IsNotFound(err) {
		klog.Infof("TikvCluster has been deleted %v", key)
		return nil
	}
	if err != nil {
		return err
	}
	return tcc.syncTikvCluster(tc.DeepCopy())
}
func ( tcc * Controller ) sync ( key string ) error { startTime := time . Now ( ) defer func ( ) { klog . V ( 4 ) . Infof ( " " , key , time . Since ( startTime ) ) } ( ) ns , name , err := cache . SplitMetaNamespaceKey ( key ) if err != nil { return err } tc , err := tcc . tcLister . TikvClusters ( ns ) . Get ( name ) if errors . IsNotFound ( err ) { klog . Infof ( " " , key ) return nil } if err != nil { return err } return tcc . syncTikvCluster ( tc . DeepCopy ( ) ) }
sync syncs the given tikvcluster.
sync syncs the given tikvcluster .