Tiago Marques Godinho created IGNITE-23629:
----------------------------------------------
Summary: Add support for Java Records in the Compute API
Key: IGNITE-23629
URL: https://issues.apache.org/jira/browse/IGNITE-23629
Project: Ignite
Issue Type: Improvement
Components: compute
Reporter: Tiago Marques Godinho
The Compute API requires a few changes to support java records.
The
[POJOConverter|https://github.com/ggprivate/gridgain-9/blob/be25b3d17fa37f17149499a20b7dad3307efe086/modules/client-common/src/main/java/org/apache/ignite/internal/client/proto/ClientComputeJobUnpacker.java#L92],
it assumes argument/result classes have default constructors.
It also uses VarHandles read/write fields, which I'm not sure is compatible
with records.
The ComputeExecutor is using the ComputeUtils as well.
The
[IgniteComputeImpl|https://github.com/ggprivate/gridgain-9/blob/342ada3c36f464f74e1046a7c199215ab005986a/modules/compute/src/main/java/org/apache/ignite/internal/compute/IgniteComputeImpl.java#L124)%20uses%20[UserObjectMarshaller](https://github.com/ggprivate/gridgain-9/blob/098f16b68cbe363f76d4c40c69ab7471d72aa857/modules/network-api/src/main/java/org/apache/ignite/internal/network/serialization/marshal/UserObjectMarshaller.java#L27]
it was not clear by looking at the code that the current implementation will
support records or not. So, we should test that thoroughly as well.
Suggested steps:
* Create tests to check if the current implementation of UserObjectMarshaller
supports records.
* Implement a new
[ClientComputeJobPacker|https://github.com/ggprivate/gridgain-9/blob/be25b3d17fa37f17149499a20b7dad3307efe086/modules/client-common/src/main/java/org/apache/ignite/internal/client/proto/ClientComputeJobPacker.java#L38]
marshaller for Records using a similar for IGNITE-23627.
* Implement the corresponding unpacker in
[ComputeUtils|https://github.com/ggprivate/gridgain-9/blob/342ada3c36f464f74e1046a7c199215ab005986a/modules/compute/src/main/java/org/apache/ignite/internal/compute/ComputeUtils.java#L413]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)