You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2022/02/23 17:40:14 UTC

[GitHub] [geode] albertogpz opened a new pull request #7391: GEODE-10077: Avoid callbacks in wan-copy region

albertogpz opened a new pull request #7391:
URL: https://github.com/apache/geode/pull/7391


   The wan-copy region command does not always prevent that callbacks are executed at
   the remote site for the entries copied.
   
   The value set by the wan-copy region command for generateCallbacks to false
   in the events sent via the gateway sender was not being propagated
   by the server that received the events in the remote site (via the gateway
   receiver) when proxying the put by means of a PutMessage or UpdateMessage
   in order to send the event to the server with the primary bucket or to replicate
   the put in case of more than one replica in the region.
   
   The flags in the PutMessage and UpdateMessage have been used to propagate
   the value of generateCallbacks.
   
   <!-- Thank you for submitting a contribution to Apache Geode. -->
   
   <!-- In order to streamline the review of the contribution we ask you
   to ensure the following steps have been taken: 
   -->
   
   ### For all changes:
   - [ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?
   
   - [ ] Has your PR been rebased against the latest commit within the target branch (typically `develop`)?
   
   - [ ] Is your initial contribution a single, squashed commit?
   
   - [ ] Does `gradlew build` run cleanly?
   
   - [ ] Have you written or updated unit tests to verify your changes?
   
   - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
   
   <!-- Note:
   Please ensure that once the PR is submitted, check Concourse for build issues and
   submit an update to your PR as soon as possible. If you need help, please send an
   email to dev@geode.apache.org.
   -->
   


-- 
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-unsubscribe@geode.apache.org

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



[GitHub] [geode] albertogpz commented on pull request #7391: GEODE-10077: Avoid callbacks in wan-copy region

Posted by GitBox <gi...@apache.org>.
albertogpz commented on pull request #7391:
URL: https://github.com/apache/geode/pull/7391#issuecomment-1082213175


   > Has test coverage been added for the changes in this PR? I see that `WanCopyRegionCommandDUnitTest` has been modified, but it's not clear to me if these modifications are just test clean-up or specifically intended to replicate the issue described in the ticket.
   
   @DonalEvans Yes, it has been added. Lines 675-678 in WanCopyRegionCommandDUnitTest are checking that no events are left in B's gateway sender to be sent to C (this is something that was happening before the fix because the gateway sender in B was not started). Now gateway sender is started and so the check at the end of test case `testSuccessfulExecution()` will now correctly verify that callbacks are not invoked in B (which would have been provoked that events had been propagated to C).


-- 
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-unsubscribe@geode.apache.org

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



[GitHub] [geode] albertogpz commented on pull request #7391: GEODE-10077: Avoid callbacks in wan-copy region

Posted by GitBox <gi...@apache.org>.
albertogpz commented on pull request #7391:
URL: https://github.com/apache/geode/pull/7391#issuecomment-1073829814


   > Looks like there are some areas that need more cleanup in this PR before it should move forward. Starting with build failures.
   
   Fixed. Thanks!


-- 
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-unsubscribe@geode.apache.org

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



[GitHub] [geode] DonalEvans commented on pull request #7391: GEODE-10077: Avoid callbacks in wan-copy region

Posted by GitBox <gi...@apache.org>.
DonalEvans commented on pull request #7391:
URL: https://github.com/apache/geode/pull/7391#issuecomment-1082410413


   @albertogpz Thanks for the clarification! I missed those lines in amongst all the other changes.


-- 
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-unsubscribe@geode.apache.org

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



[GitHub] [geode] boglesby commented on pull request #7391: GEODE-10077: Avoid callbacks in wan-copy region

Posted by GitBox <gi...@apache.org>.
boglesby commented on pull request #7391:
URL: https://github.com/apache/geode/pull/7391#issuecomment-1079449538


   Without these changes, I see AbstractGatewaySender.distribute being invoked by a P2P message reader when it is processing either a PutMessage (primary) or UpdateMessage (secondary):
   
   Primary:
   ```
   P2P message reader for 192.168.1.3(ny-1:17684)<v36>:41002 unshared ordered sender uid=9 dom #1 local port=47104 remote port=58047: PutMessage.fromData key=0; generateCallbacks=true
   P2P message reader for 192.168.1.3(ny-1:17684)<v36>:41002 unshared ordered sender uid=9 dom #1 local port=47104 remote port=58047: AbstractGatewaySender.distribute key=0
   ```
   Secondary:
   ```
   P2P message reader for 192.168.1.3(ny-2:17701)<v37>:41003 unshared ordered sender uid=10 dom #2 local port=45569 remote port=58050: UpdateMessage.fromData key=3; generateCallbacks=true
   P2P message reader for 192.168.1.3(ny-2:17701)<v37>:41003 unshared ordered sender uid=10 dom #2 local port=45569 remote port=58050: AbstractGatewaySender.distribute key=3
   ```
   With these changes, generateCallbacks is false in both cases, and AbstractGatewaySender.distribute is not invoked.
   
   Partitioned Region with Parallel Sender
   ---------------------------------------
   A ServerConnection receives the put operation and sends a PutMessage with generateCallbacks=false to the secondary:
   ```
   ServerConnection on port 5397 Thread 2: PutMessage.toData key=0; generateCallbacks=false; extraFlagsByte=1001010
   ```
   A P2P message reader in the secondary reads generateCallbacks=false and does not invoke the AbstractGatewaySender.distribute method:
   ```
   P2P message reader for 192.168.1.3(ny-1:15993)<v20>:41002 unshared ordered sender uid=9 dom #1 local port=50485 remote port=56630: PutMessage.fromData key=0; generateCallbacks=false
   P2P message reader for 192.168.1.3(ny-2:16012)<v21>:41003 unshared ordered sender uid=10 dom #2 local port=44046 remote port=56632: UpdateMessage.fromData key=0; generateCallbacks=false
   ```
   The same behavior occurs with UpdateMessage:
   ```
   ServerConnection on port 5185 Thread 2: UpdateMessage.toData key=1; generateCallbacks=false; extraFlagsByte=101010
   P2P message reader for 192.168.1.3(ny-2:16012)<v21>:41003 unshared ordered sender uid=9 dom #1 local port=44046 remote port=56631: UpdateMessage.fromData key=1; generateCallbacks=false
   ```
   Partitioned Region with Serial Sender
   -------------------------------------
   I see the same correct behavior.
   
   PutMessage from receiver to primary:
   ```
   ServerConnection on port 5489 Thread 2: PutMessage.toData key=4; generateCallbacks=false; extraFlagsByte=1001010
   P2P message reader for 192.168.1.3(ny-1:30559)<v145>:41002 unshared ordered sender uid=9 dom #1 local port=57717 remote port=49677: PutMessage.fromData key=4; generateCallbacks=false
   ```
   UpdateMessage from receiver to secondary:
   ```
   ServerConnection on port 5489 Thread 2: UpdateMessage.toData key=7; generateCallbacks=false; extraFlagsByte=101010
   P2P message reader for 192.168.1.3(ny-1:30559)<v145>:41002 unshared ordered sender uid=9 dom #1 local port=57717 remote port=49677: UpdateMessage.fromData key=7; generateCallbacks=false
   ```
   Replicated Region with Serial Sender
   ------------------------------------
   I see the same correct behavior.
   
   UpdateMessage from receiver to replicate:
   ```
   ServerConnection on port 5078 Thread 2: UpdateMessage.toData key=2; generateCallbacks=false; extraFlagsByte=101010
   P2P message reader for 192.168.1.3(ny-1:18935)<v59>:41002 unshared ordered sender uid=9 dom #1 local port=51500 remote port=59592: UpdateMessage.fromData key=2; generateCallbacks=false
   ```
   


-- 
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-unsubscribe@geode.apache.org

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