anton-vinogradov commented on PR #13440:
URL: https://github.com/apache/ignite/pull/13440#issuecomment-5234247732
Good catch, and it was a symptom of the same thing your inline question
uncovered - that generated code cannot pick the class loader for a message.
Overwriting the parameter was deliberate but wrong. It came from
`DeploymentAware`: a message declared that it carries its own deployment, and
the generated marshaller resolved the loader from it. I made the assignment
unconditional because the convenience overloads pass a loader rather than
`null`:
```java
default void unmarshal(M msg, GridKernalContext kctx) {
unmarshal(msg, kctx, null, U.resolveClassLoader(kctx.config()));
}
```
so a caller using them would silently read peer-deployed classes with the
local loader. Ignoring the argument fixed that symptom and hid a worse problem:
the resolution needs the sending node, which the generated code has no way to
know, and the sender is not always the owner of the class loader.
So the whole thing is gone now. `DeploymentAware`, the resolution in the
generator and its test are removed - `modules/codegen` is no longer part of
this PR at all - and the resolution takes the node as a parameter, passed by
the callers that know it.
What is left is what the ticket asked for: the deployment travels as one
descriptor instead of four flat fields, and the eight places that used to
assemble it by hand now make a single call. The diff went from 35 files to 25,
and from +577/-497 to +248/-475.
Since the change is materially different from what the last RunAll saw, a
fresh run is needed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]