ignite icon indicating copy to clipboard operation
ignite copied to clipboard

In ignite2.16.0 and jdk21, run task with lambda expression, it can not run.

Open codeWorldRookie opened this issue 3 months ago • 0 comments

run task code is public <T> Future<T> submit(Callable<T> task) { ClusterGroup scheduler = ignite.cluster().forPredicate(SCHEDULE_SELECTOR); return CompletableFuture.supplyAsync(() -> ignite.compute(scheduler) .call(task::call)); }

exception: ava.util.concurrent.ExecutionException: class org.apache.ignite.IgniteException: Remote job threw user exception (override or implement ComputeTask.result(..) method if you would like to have automatic failover for this exception): Task was not deployed or was redeployed since task execution [taskName=IgniteCluster$$Lambda/0x000001fea2626ca0, taskClsName=IgniteCluster$$Lambda/0x000001fea2626ca0, codeVer=0, clsLdrId=06c5fc07f81-837412f5-916c-4d3e-acf7-7706853a9be5, seqNum=1715584588896, depMode=SHARED, dep=null]

Ignite relies on the class name of the corresponding anonymous inner class when executing Lambda expressions.

image

In JDK 21, the class name of corresponding anonymous inner class is changed java 17 Main$$Lambda$14/0x0000000800066840 java 21 Main$$Lambda/0x0000023d4e003400

so IgniteUtils#lambdaEnclosingClassName() logic should adjust.

codeWorldRookie avatar May 17 '24 01:05 codeWorldRookie