easy-rules icon indicating copy to clipboard operation
easy-rules copied to clipboard

ConcurrentModificationException under load

Open ab0159w opened this issue 2 years ago • 1 comments

Hi,

We are seeing this error under load.

java.util.ConcurrentModificationException: null
	at java.base/java.util.TreeMap$PrivateEntryIterator.nextEntry(Unknown Source)
	at java.base/java.util.TreeMap$KeyIterator.next(Unknown Source)
	at org.jeasy.rules.core.RuleProxy.appendActionMethodsNames(RuleProxy.java:353)
	at org.jeasy.rules.core.RuleProxy.getRuleDescription(RuleProxy.java:334)
	at org.jeasy.rules.core.RuleProxy.invoke(RuleProxy.java:101)
	at com.sun.proxy.$Proxy218.getDescription(Unknown Source)
	at org.jeasy.rules.core.DefaultRulesEngine.log(DefaultRulesEngine.java:146)
	at org.jeasy.rules.core.DefaultRulesEngine.doFire(DefaultRulesEngine.java:80)
	at org.jeasy.rules.core.DefaultRulesEngine.fire(DefaultRulesEngine.java:70)

```	
In RuleProxy line 279
private Set<ActionMethodOrderBean> getActionMethodBeans() {
    if (this.actionMethods == null) {
        this.actionMethods = new TreeSet<>();

Consider using ConcurrentSkipListSet.

ab0159w avatar Dec 08 '22 14:12 ab0159w

Could you please share a sample test/git repo to re-produce this

dvgaba avatar Dec 13 '22 15:12 dvgaba