fuweng11 commented on PR #12105:
URL: https://github.com/apache/inlong/pull/12105#issuecomment-4095959430

   > > The status check is essential and cannot be removed, as the deletion 
process involves asynchronous operations that interact with the Agent and sort. 
If the deletion command is executed repeatedly during this process, due to 
asynchronous operations, the Agent or sort task may make incorrect judgments. 
For instance, if a deletion is performed immediately after the Agent has just 
been issued a collection task, the requests received by the Agent may originate 
from different managers, temporarily causing data inconsistency. At this time, 
the order in which the Agent receives task deletion or addition commands may be 
inconsistent, leading to task anomalies.
   > 
   > Then, when executing these deletion functions, can we check the current 
status and skip the status validation if it's already 
"GroupStatus.CONFIG_DELETING"? Or is there a better solution?
   Given that the following code is only referenced by group.delete, you can 
add "GroupStatus.CONFIG_DELETING" to this status check, or it is better to 
modify the group status to "GroupStatus.CONFIG_DELETED" before performing this 
status check
   `if 
(GroupStatus.allowedDeleteSubInfos(GroupStatus.forCode(entity.getStatus()))) {
               streamService.logicDeleteAll(groupId, operator);
           }`


-- 
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