@@ -267,10 +267,6 @@ func (c *ResourceGroupsController) Start(ctx context.Context) {
267267 stateUpdateTicker .Reset (time .Millisecond * 100 )
268268 })
269269
270- _ , metaRevision , err := c .provider .LoadResourceGroups (ctx )
271- if err != nil {
272- log .Warn ("load resource group revision failed" , zap .Error (err ))
273- }
274270 resp , err := c .provider .Get (ctx , []byte (controllerConfigPath ))
275271 if err != nil {
276272 log .Warn ("load resource group revision failed" , zap .Error (err ))
@@ -279,7 +275,7 @@ func (c *ResourceGroupsController) Start(ctx context.Context) {
279275 var watchMetaChannel , watchConfigChannel chan []* meta_storagepb.Event
280276 if ! c .ruConfig .isSingleGroupByKeyspace {
281277 // Use WithPrevKV() to get the previous key-value pair when get Delete Event.
282- watchMetaChannel , err = c .provider .Watch (ctx , pd .GroupSettingsPathPrefixBytes , pd .WithRev ( metaRevision ), pd . WithPrefix (), pd .WithPrevKV ())
278+ watchMetaChannel , err = c .provider .Watch (ctx , pd .GroupSettingsPathPrefixBytes , pd .WithPrefix (), pd .WithPrevKV ())
283279 if err != nil {
284280 log .Warn ("watch resource group meta failed" , zap .Error (err ))
285281 }
@@ -306,7 +302,7 @@ func (c *ResourceGroupsController) Start(ctx context.Context) {
306302 case <- watchRetryTimer .C :
307303 if ! c .ruConfig .isSingleGroupByKeyspace && watchMetaChannel == nil {
308304 // Use WithPrevKV() to get the previous key-value pair when get Delete Event.
309- watchMetaChannel , err = c .provider .Watch (ctx , pd .GroupSettingsPathPrefixBytes , pd .WithRev ( metaRevision ), pd . WithPrefix (), pd .WithPrevKV ())
305+ watchMetaChannel , err = c .provider .Watch (ctx , pd .GroupSettingsPathPrefixBytes , pd .WithPrefix (), pd .WithPrevKV ())
310306 if err != nil {
311307 log .Warn ("watch resource group meta failed" , zap .Error (err ))
312308 watchRetryTimer .Reset (watchRetryInterval )
@@ -360,7 +356,6 @@ func (c *ResourceGroupsController) Start(ctx context.Context) {
360356 continue
361357 }
362358 for _ , item := range resp {
363- metaRevision = item .Kv .ModRevision
364359 group := & rmpb.ResourceGroup {}
365360 switch item .Type {
366361 case meta_storagepb .Event_PUT :
0 commit comments