DarkAssassinator commented on PR #12050:
URL: 
https://github.com/apache/dolphinscheduler/pull/12050#issuecomment-1256159671

   > > > When we delete a workerGroup, the TaskInstance should dispatch failed, 
I think this is our expected. Can we only clear the `workerGroupNodes` map?
   > > 
   > > 
   > > @ruanwenjun but if we just clear the `workerGroupNodes`, it will affect 
other normal taskInstance. and i think it will better that keep the memory same 
as the db and registry center. WDYT
   > 
   > Yes, we are talking about how to make the data in memory is the same with 
db and registry, currently remove the worker which is deleted, just replace the 
worker group exist. I think we can replace the workerGroup data in memory when 
sync.
   
    `WorkerGroup` in the current memory is composed of two parts of data, one 
of which is synchronized from the database every 10 seconds(just add but never 
delete), and the other is obtained from the registry center( also just add and 
never delete).
   But we cannot make sure this WorkerGroup from DB or Registry center, so 
cannot make sure which record has been deleted from db or registry center, 
unless only `Default` keep on registry center. Then my PR just **replace all 
worker group from DB when sync, and remove this worker group when this record 
was delete from registry center**, then combing these two part and refresh 
`workerGroupNodes`.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to