cancel
Showing results for 
Search instead for 
Did you mean: 

too many droolsRule and sourceRules make the cluster stucked

0 Kudos

we are on hybris 6.7 using drools engine for promotions. we have more then 29000 sourceRules and 59000 droolsRule.

So now when we publish a promotion, it takes a long time. and I noticed that it suck in RuleEngine-module-swapping thread.

Read the source code, I noticed that it has a huge loop in UpdateRulesStatusPostRulesModuleSwappingTask


while(var8.hasNext()) {
AbstractRuleEngineRuleModel deployedVersionRule = (AbstractRuleEngineRuleModel)var8.next();
if (((List)oldVersionRules).stream().anyMatch((r) -> {
return this.rulesAreEqual(r, deployedVersionRule);
})) {
modifiedRuleCodes.remove(deployedVersionRule.getCode());
}
}

it makes the RuleEngine-module-swapping thread in high cpu usage and all cluster node are stucked.

In fact, when publish the promotion. it takes too much time in every step. complied->swapping->publish. So I want to delete all the unuseful rules in the system. but i will make the error on the order which applied the drools

so do I have other way to make the ruleEngine back to the good performance? I found it has a cleanup drools job in the new version of hybris . but I didnt found in my verision

0 Kudos

and I dont understand why UpdateRulesStatusPostRulesModuleSwappingTask need to find all the rules not by rules status.

Accepted Solutions (0)

Answers (0)