[
https://issues.apache.org/jira/browse/IGNITE-28271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18101888#comment-18101888
]
Anton Vinogradov commented on IGNITE-28271:
-------------------------------------------
Reworked the patch after a second look at where the failure policy belongs.
The first version kept it on the message: a static
{{GridJobExecuteResponse.marshalled(resp, ctx, log)}} that marshalled the
response eagerly and returned a different instance when the payload could not
be written. Two problems with that. The message ended up knowing about
{{GridKernalContext}} and {{IgniteLogger}}. And, worse, the send path marshals
the {{GridIoMessage}} wrapper anyway, and the generated code of the wrapper
recurses into the payload - so the payload was marshalled twice, against the
contract stated right there in {{GridIoManager#marshal}}: "marshalling is not
idempotent, see MessageMarshalOnceTest". It did not misbehave only because
{{@Marshalled}} fields are guarded by a {{bytes == null}} check.
The policy now sits where the response is sent. Both senders got a small
{{sendJobResponse(...)}} with the three send branches, wrapped in the {{catch}}
they already had: if the failure is not topology related, send once more with a
response that carries only the error. The message keeps a single pure
{{withError(IgniteException)}}.
So nothing marshals ahead of time any more - the send path marshals once, as
the contract requires.
Two costs, stated plainly: the policy is written twice, once per sender, and at
that level a marshalling failure cannot be told apart from a send failure, so a
network failure costs one extra attempt that fails again and is logged.
> Investigate possibity to use ErrorMessage for
> GridJobExecuteResponse#gridExBytes
> --------------------------------------------------------------------------------
>
> Key: IGNITE-28271
> URL: https://issues.apache.org/jira/browse/IGNITE-28271
> Project: Ignite
> Issue Type: Task
> Reporter: Ilya Shishkov
> Assignee: Anton Vinogradov
> Priority: Minor
> Labels: ise, wire-format
> Fix For: 2.19
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> {{#gridExBytes}} serde via {{ErrorMessage}} was implemented in IGNITE-26817
> and reverted back to JDK serde in IGNITE-26890. Possibility to use
> {{ErrorMessage}} should be investigated.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)