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 2020/09/14 16:08:16 UTC

[GitHub] [geode] albertogpz commented on a change in pull request #5509: GEODE-8491: Do not store dropped events in stopped primary gateway se…

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



##########
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 recordDroppedEvent(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
+      // tmpDroppedEvents it takes as little space as possible.
+      // No need to have all the contents of the event for a dropped one.
+      EntryEventImpl emptyEvent = new EntryEventImpl(event.getKey(), false);

Review comment:
       ok. I will remove it.
   Anyway, if the gateway sender is created with manualStart=true then the eventProcessor will not be yet instantiated. In that case, and until the gateway sender is started we could see dropped events put in tmpDroppedEvents. It cannot be guaranteed that it will be a small time window.




----------------------------------------------------------------
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:
users@infra.apache.org