easy-rules
easy-rules copied to clipboard
ConcurrentModificationException under load
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.
Could you please share a sample test/git repo to re-produce this