albertogpz commented on a change in pull request #6441:
URL: https://github.com/apache/geode/pull/6441#discussion_r645339968



##########
File path: 
geode-core/src/main/java/org/apache/geode/internal/cache/wan/GatewaySenderEventImpl.java
##########
@@ -1094,6 +1096,13 @@ protected void initializeAction(EnumListenerEvent 
operation) {
       // Initialize number of parts
       // Since there is no value, there is one less part
       this.numberOfParts = (this.callbackArgument == null) ? 7 : 8;
+    } else if (operation == 
EnumListenerEvent.AFTER_UPDATE_WITH_GENERATE_CALLBACKS) {
+      if (event.isGenerateCallbacks()) {
+        this.action = UPDATE_ACTION;
+      } else {
+        this.action = UPDATE_ACTION_NO_GENERATE_CALLBACKS;
+      }
+      this.numberOfParts = (this.callbackArgument == null) ? 8 : 9;
     }

Review comment:
       The idea behind this new operation 
(`EnumListenerEvent.AFTER_UPDATE_WITH_GENERATE_CALLBACKS`) is that whenever it 
is used, the value of `event.isGenerateCallbacks()` will be honored. If 
`event.isGenerateCallbacks()` is true we will have the legacy behavior and if 
it is false, we will provoke that the callbacks will not be invoked at the 
receiving side.
   I could have done it differently as follows: when this operation is used, 
then provoke that the callbacks are not invoked at the receiving side no matter 
what the value of event.isGenerateCallbacks() is.
   Do you think it would be more clear to do change it to this other way?




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

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


Reply via email to