sk0x50 commented on a change in pull request #9352:
URL: https://github.com/apache/ignite/pull/9352#discussion_r762955358



##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
##########
@@ -3311,15 +3311,8 @@ private void body0() throws InterruptedException, 
IgniteCheckedException {
                                 if 
(fut.topologyVersion().equals(lastAffChangedVer))
                                     exchFut = fut;
                                 else if 
(lastAffChangedVer.after(exchId.topologyVersion())) {
-                                    // There is a new exchange which should 
trigger rebalancing.
-                                    // This reassignment request can be 
skipped.
-                                    if (log.isInfoEnabled()) {
-                                        log.info("Partitions reassignment 
request skipped due to affinity was already changed" +
-                                            " [reassignTopVer=" + 
exchId.topologyVersion() +
-                                            ", lastAffChangedTopVer=" + 
lastAffChangedVer + ']');
-                                    }
-
-                                    continue;
+                                    exchFut = lastFut;

Review comment:
       > This modification doesn't look related to a described in the ticket 
counter issue. Better to do it in a separate ticket or modify the ticket 
description.
   
   Ok, you are right. I need to update the description or create a new ticket 
for this.
   
   > I'm not sure it's 100% correct, because lastAffChangedVer implies the 
rebalancing is requred.
   
   > New affinity can contain incompatible assignments, and make the reassign 
obsolete. Can we keep this logic ?
   In my understanding this is not quite correct. Let's consider the following 
scenario:
    a) `event-1` (the type of this event does not matter) triggers `exhange-1`, 
and corresponding rebalance `rebalance-fut-1`
    b) `event-2` triggers a new `exchnage-2` and `rebalance-fut-2` is 
compatible with `rebalance-fut-1`. this means that `rebalance-fut-1` will not 
be cancelled.
    c) supplier fails rebalancing (`rebalance-fut-1`) for some reason and so, 
`RebalanceReassignExchangeTask` will be posted to the exchange queue.
    d) the following code will skip new rebalancing and therefore rebalancing 
will not be completed at all.
    ```
       if (lastAffChangedVer.after(exchId.topologyVersion())) 
           continue.
   ```
   
   > The fut is always null in the assertion above:
   
   Thanks! will fix it.
   
   > I would better rename `markNodeAsInapplicableForRebalance `to 
`copyInapplicableNodesFrom`
   
   Makes sense to me. will rename this method.




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