[
https://issues.apache.org/jira/browse/IGNITE-27780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dmitry Werner updated IGNITE-27780:
-----------------------------------
Description:
During the refactoring of the messages GridNearAtomicSingleUpdateInvokeRequest,
GridDhtAtomicUpdateRequest, and GridNearAtomicFullUpdateRequest, the type of
the field invokeArgsBytes was changed from byte[][] to List<byte[]>.
Currently:
# In GridDhtAtomicUpdateRequest, if invokeArgs = null, during serialization
invokeArgsBytes is initialized with Collections.emptyList() instead of null,
leading to an unnecessary memory allocation.
# In GridNearAtomicSingleUpdateInvokeRequest, during serialization, there is a
duplicate check 'F.isEmpty(invokeArgs)' — one of them is redundant and should
be removed.
It is necessary to unify the serialization logic of invokeArgsBytes in
accordance with GridNearAtomicFullUpdateRequest the other two messages:
{code:java}
if (!F.isEmpty(invokeArgs) && invokeArgsBytes == null)
invokeArgsBytes = Arrays.asList(marshalInvokeArguments(invokeArgs, cctx));
{code}
was:
During the refactoring of the messages GridNearAtomicSingleUpdateInvokeRequest,
GridDhtAtomicUpdateRequest, and GridNearAtomicFullUpdateRequest, the type of
the field invokeArgsBytes was changed from byte[][] to List<byte[]>.
It is necessary to unify the serialization logic of invokeArgsBytes in
accordance with GridNearAtomicFullUpdateRequest the other two messages:
{code:java}
if (!F.isEmpty(invokeArgs) && invokeArgsBytes == null)
invokeArgsBytes = Arrays.asList(marshalInvokeArguments(invokeArgs, cctx));
{code}
> Unify the serialization logic of invokeArgsBytes
> ------------------------------------------------
>
> Key: IGNITE-27780
> URL: https://issues.apache.org/jira/browse/IGNITE-27780
> Project: Ignite
> Issue Type: Task
> Reporter: Dmitry Werner
> Assignee: Dmitry Werner
> Priority: Minor
> Labels: IEP-132, ise
> Time Spent: 10m
> Remaining Estimate: 0h
>
> During the refactoring of the messages
> GridNearAtomicSingleUpdateInvokeRequest, GridDhtAtomicUpdateRequest, and
> GridNearAtomicFullUpdateRequest, the type of the field invokeArgsBytes was
> changed from byte[][] to List<byte[]>.
> Currently:
> # In GridDhtAtomicUpdateRequest, if invokeArgs = null, during serialization
> invokeArgsBytes is initialized with Collections.emptyList() instead of null,
> leading to an unnecessary memory allocation.
> # In GridNearAtomicSingleUpdateInvokeRequest, during serialization, there is
> a duplicate check 'F.isEmpty(invokeArgs)' — one of them is redundant and
> should be removed.
> It is necessary to unify the serialization logic of invokeArgsBytes in
> accordance with GridNearAtomicFullUpdateRequest the other two messages:
> {code:java}
> if (!F.isEmpty(invokeArgs) && invokeArgsBytes == null)
> invokeArgsBytes = Arrays.asList(marshalInvokeArguments(invokeArgs,
> cctx)); {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)