timoninmaxim commented on code in PR #11726:
URL: https://github.com/apache/ignite/pull/11726#discussion_r1882728363


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java:
##########
@@ -1192,8 +1192,6 @@ public boolean checkNodeLeft(UUID nodeId, 
IgniteCheckedException sndErr, boolean
      * @throws ClusterTopologyCheckedException If receiver left.
      */
     public void send(ClusterNode node, GridCacheMessage msg, byte plc) throws 
IgniteCheckedException {
-        assert !node.isLocal() : node;

Review Comment:
   There are two reasons:
   1. To invoke all handlers registered for the message. For example, handler 
for `AtomicApplicationAttributesAwareRequest` (GridDhtAtomicCache#L218);
   
   2. Remove code duplication - handler and sender. For example, there was 
duplicated code:
   - GridNearAtomicAbstractUpdateFuture#sendSingleRequest - it invokes 
`updateAllAsyncInternal` with local closure.
   - But in `GridDhtAtomicCache#processNearAtomicUpdateRequest` this closure is 
already defined - it uses the duplicated code for closure (3rd param of the 
`updateAllAsyncInternal` method)
   
   The `send` method also have special handling of local node messages - it 
invokes handler directly. So, there is no need the assert at all.
   



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to