AyoubOm commented on PR #15607:
URL: https://github.com/apache/kafka/pull/15607#issuecomment-2088456658

   > Can we update existing test to not use `Map` but `List` (as I mentioned on 
the duplicate ticket https://issues.apache.org/jira/browse/KAFKA-16644) which 
should expose the bug?
   > 
   > Need to think about the fix a little more (need to refresh my memory on 
the different "subscription types").
   
   Ok, will check the integration test and update it accordingly.
   
   For the subscription types, I've kept a summary that helped me write the 
unit tests and implement the fix. It can make it easier to review it first if I 
missed something before checking the code ;)
   
   ```
          // All cases of SubscriptionSendProcessor
   
          /*  LEFT JOIN Tests Summary
   
               old record  ->  new record                  result Instruction
   
               (pk1, null) -> (pk1, null)              -> NOTHING
               (pk1, null) -> (pk1, (null, ...))       -> 
PROPAGATE_IF_NO_FK_AVAILABLE
               (pk1, null) -> (pk1, (fk1, ...))        -> 
PROPAGATE_IF_NO_FK_AVAILABLE
   
               (pk1, (null, ..)) -> (pk1, null)        -> 
PROPAGATE_IF_NO_FK_AVAILABLE
               (pk1, (null, ..)) -> (pk1, (null, ...)) -> 
PROPAGATE_IF_NO_FK_AVAILABLE
               (pk1, (null, ..)) -> (pk1, (fk1, ...))  -> 
PROPAGATE_IF_NO_FK_AVAILABLE
   
               (pk1, (fk1, ..)) -> (pk1, null)         -> DELETE_AND_PROPAGATE
               (pk1, (fk1, ..)) -> (pk1, (null, ...))  -> DELETE_AND_PROPAGATE
               (pk1, (fk1, ..)) -> (pk1, (fk1, ...))   -> 
PROPAGATE_IF_NO_FK_AVAILABLE
               (pk1, (fk1, ..)) -> (pk1, (fk2, ...))   -> DELETE_NO_PROPAGATE + 
PROPAGATE_IF_NO_FK_AVAILABLE
            */
   ```
   I represent each record with (pk, (fk, ...)) where pk is the key, and the 
value is composed of the foreign key fk and the other fields represented by the 
dots (which do not impact the resulting instruction type)


-- 
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: jira-unsubscr...@kafka.apache.org

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

Reply via email to