Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nelsoncaoGithub opened this issue May 17, 2024 · 0 comments

Comments

@nelsoncaoGithub
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant