anton-vinogradov opened a new pull request, #13440:
URL: https://github.com/apache/ignite/pull/13440

   The node filter in `StartRequestData` was marshalled by hand, and the 
receiver
   had to build the deployment class loader itself before reading the filter.
   
   ### Why the code looked like that
   
   A message that carries peer-deployed classes said nothing about it. It held 
the
   deployment as four or five flat fields, so every receiver rebuilt the 
deployment
   from those fields and passed the resulting loader into the unmarshal call. 
Eight
   places did exactly that. `StartRequestData` also repeated a "peer class 
loading
   is off" branch, although `GridDeploymentManager` already covers that case: 
with
   peer class loading off it looks the deployment up locally.
   
   ### Change
   
   * `DeploymentAware` lets a message state that its classes come with a 
deployment,
     the same way `CacheIdAware` states the need for a cache object context.
   * `GridDeploymentManager.classLoader(DeploymentAware)` is now the single 
place
     that turns a carried deployment into a class loader.
   * The generated marshaller asks for that loader when the caller passes none, 
so
     receivers no longer resolve it by hand.
   * Messages carry `GridDeploymentInfoBean` as a whole instead of the flat 
fields.
     This changes the wire format.
   
   `DeploymentAware` and `DeferredUnmarshalMessage` answer different questions 
and
   stay independent: the first says which class loader reads the message, the
   second says who starts the read. This matters for messages whose owner 
reports a
   missing deployment back to the sender, and for messages read outside the
   receiving path.
   
   A message read by its owner also keeps its serialized bytes, because it can 
be
   sent on: a discovery message travels the whole ring, and re-marshalling a 
user
   object on that path is what those bytes are there to avoid.
   
   ### Verified
   
   `GridEventStorageCheckAllEventsSelfTest`, `GridEventStorageManagerSelfTest`,
   `GridEventConsumeSelfTest`, `GridMessageListenSelfTest`,
   `GridP2PContinuousDeploymentSelfTest`, `P2PClassLoadingFailureHandlingTest`,
   `IgniteNoCustomEventsOnNodeStart`.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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]

Reply via email to