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



##########
File path: 
geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySender.java
##########
@@ -1118,6 +1115,24 @@ public void distribute(EnumListenerEvent operation, 
EntryEventImpl event,
     }
   }
 
+  private void dropEvent(EntryEventImpl event) {
+    final boolean isDebugEnabled = logger.isDebugEnabled();
+    if (this.eventProcessor != null) {
+      this.eventProcessor.registerEventDroppedInPrimaryQueue(event);
+    } else {
+      // Add empty event so that in case the event stays for long in

Review comment:
       I am ok with not cloning again the event. Anyway, if you look at the 
cloned event it would contain the newValue while the newly cloned event will 
not. If the value is big, tmpDroppedEvents will take much more memory.
   
   Apart from the above, do you agree with this proposal to be implemented in a 
pull request?

##########
File path: 
geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySender.java
##########
@@ -1138,7 +1153,7 @@ int getTmpDroppedEventSize() {
   public void enqueueTempEvents() {
     if (this.eventProcessor != null) {// Fix for defect #47308
       // process tmpDroppedEvents
-      EntryEventImpl droppedEvent = null;
+      EntryEventImpl droppedEvent;

Review comment:
       The original statement is redundant (as pointed by the IDE) as the 
variable will be reassigned in the next statement (while) 
   anyway.

##########
File path: 
geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySender.java
##########
@@ -1118,6 +1115,24 @@ public void distribute(EnumListenerEvent operation, 
EntryEventImpl event,
     }
   }
 
+  private void dropEvent(EntryEventImpl event) {
+    final boolean isDebugEnabled = logger.isDebugEnabled();
+    if (this.eventProcessor != null) {
+      this.eventProcessor.registerEventDroppedInPrimaryQueue(event);
+    } else {
+      // Add empty event so that in case the event stays for long in

Review comment:
       I am ok with not cloning again the event. Anyway, if you look at the 
cloned event it would contain the newValue while the newly cloned event will 
not. If the value is big, tmpDroppedEvents will take much more memory.
   
   Apart from the above, do you agree with this proposal to be implemented in a 
pull request?

##########
File path: 
geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySender.java
##########
@@ -1138,7 +1153,7 @@ int getTmpDroppedEventSize() {
   public void enqueueTempEvents() {
     if (this.eventProcessor != null) {// Fix for defect #47308
       // process tmpDroppedEvents
-      EntryEventImpl droppedEvent = null;
+      EntryEventImpl droppedEvent;

Review comment:
       The original statement is redundant (as pointed by the IDE) as the 
variable will be reassigned in the next statement (while) 
   anyway.




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