-
Bug
-
Resolution: Done
-
Medium
-
Frankfurt Release
See attached logs for more detail about the exception : cds.log
How to reproduce :
Use this CBA : cba.zip
Set USE_SCRIPT_COMPILE_CACHE to false
USE_SCRIPT_COMPILE_CACHE set to false cleans the Class Loader cache after each kotlin script execution. When several kotlin script are executed in parallel (ie no dependency between them) and USE_SCRIPT_COMPILE_CACHE=false then the class loader from the cache may be deleted before one of those executed kotlin script get the time to finish which to the NoClassDefFoundError.
Removed cleanupInstance method for kotlin script executors that where causing the class loader to be removed prematurely. Now the behaviour is to remove the class loader from the cache only when we publish a new CBA which was already the case when CDS run with a single instance. In cluster mode, a topic has been added to hazelcast to allow the instance publishing the updated CBA to communicate to the other instances by sending a message to clean the class loader for this CBA from their cache.
Added mutex on kotlin script compilation to fix race condition. For concurrent kotlin script execution each process wanted to compile an executable but it was causing a race condition if a process tries to execute while another still compile. Mutex on the execution path prevent this behaviour.
See following file for kotlin compilation race condition : compile.log
- relates to
-
CCSDK-3277 Error when uploading CBA when Hazelcast cluster is not initialized yet
- Closed