Intel-bigdata / SSM

Smart Storage Management for Big Data, a comprehensive hot/cold data optimized solution
Apache License 2.0
134 stars 67 forks source link

Maintain a set to avoid too many repeatedly submitted cmdlets #2180

Closed PHILO-HE closed 4 years ago

PHILO-HE commented 4 years ago

For rule with small check time interval set, many repeated task will be produced unnecessarily. This make user difficult to track tasks and also increases SSM cluster's load. Thanks @lipppppp for bringing the thought that we can try to improve such behavior.

In this proposed patch, a set is used to track CmdletDesctiptor with rule ID and cmd string contained, from the submitted time to the finished time. In the submitting of another CmdletDesctiptor, SSM will judge whether a same task is running by checking the set. And refuse the submission if true.

lipppppp commented 4 years ago

Thanks @PHILO-HE support as always. This patch can make rule running better.

PHILO-HE commented 4 years ago

@lipppppp, the patch has been refined in the latest two commits. I will commit the patch soon. To avoid any regression issue, you can do some more tests on your side.