jsinovassin opened a new pull request, #918: URL: https://github.com/apache/unomi/pull/918
## Summary - This pull request lands the change of [apache/unomi#891](https://github.com/apache/unomi/pull/891) on `unomi-3.0.x`. That pull request targeted the head branch of [apache/unomi#892](https://github.com/apache/unomi/pull/892) and merged there after that pull request itself, so its commit never reached `unomi-3.0.x`. - The commit is a clean cherry-pick of `3e64e872c`, with no conflict and no other change. - The MVEL expression cache of `MvelScriptExecutor` was a `ConcurrentHashMap` keyed by the raw script text, with no bound. The cache is now a size-bounded LRU keyed by a SHA-256 hash of the script, and it stores only accepted expressions. - The bound defaults to 1000, and the system property `org.apache.unomi.scripting.mvel.expressions.cache.max.size` overrides it. ## Test plan - [x] `mvn test` in `scripting` on this branch passes: 21 tests, 0 failures. - [x] `testExpressionCacheIsBoundedAndSkipsRejectedScripts` passes. It asserts that rejected scripts leave no entry, that the cache holds 10 entries or fewer, and that every key is 64 characters or fewer. - [ ] CI on this branch. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
