on 2023 Jul 06 8:55 AM
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
Request clarification before answering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.