func (tcc *Controller) processNextWorkItem() bool {
	key, quit := tcc.queue.Get()
	if quit {
		return false
	}
	defer tcc.queue.Done(key)
	if err := tcc.sync(key.(string)); err != nil {
		if perrors.Find(err, controller.IsRequeueError) != nil {
			klog.Infof("TikvCluster: %v, still need sync: %v, requeuing", key.(string), err)
		} else {
			utilruntime.HandleError(fmt.Errorf("TikvCluster: %v, sync failed %v, requeuing", key.(string), err))
		}
		tcc.queue.AddRateLimited(key)
	} else {
		tcc.queue.Forget(key)
	}
	return true
}
// processNextWorkItem dequeues items, processes them, and marks them done. It enforces that the syncHandler is never
// invoked concurrently with the same key.
processNextWorkItem dequeues items, processes them, and marks them done. It enforces that the syncHandler is never
invoked concurrently with the same key.
// processNextWorkItem dequeues items processes them and marks them done . It enforces that the syncHandler is never // invoked concurrently with the same key .
func (tcc *Controller) processNextWorkItem() bool {
	key, quit := tcc.queue.Get()
	if quit {
		return false
	}
	defer tcc.queue.Done(key)
	if err := tcc.sync(key.(string)); err != nil {
		if perrors.Find(err, controller.IsRequeueError) != nil {
			klog.Infof("TikvCluster: %v, still need sync: %v, requeuing", key.(string), err)
		} else {
			utilruntime.HandleError(fmt.Errorf("TikvCluster: %v, sync failed %v, requeuing", key.(string), err))
		}
		tcc.queue.AddRateLimited(key)
	} else {
		tcc.queue.Forget(key)
	}
	return true
}
func ( tcc * Controller ) processNextWorkItem ( ) bool { key , quit := tcc . queue . Get ( ) if quit { return false } defer tcc . queue . Done ( key ) if err := tcc . sync ( key . ( string ) ) ; err != nil { if perrors . Find ( err , controller . IsRequeueError ) != nil { klog . Infof ( " " , key . ( string ) , err ) } else { utilruntime . HandleError ( fmt . Errorf ( " " , key . ( string ) , err ) ) } tcc . queue . AddRateLimited ( key ) } else { tcc . queue . Forget ( key ) } return true }
processNextWorkItem dequeues items, processes them, and marks them done.
processNextWorkItem dequeues items processes them and marks them done .