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 2021/04/30 23:00:40 UTC

[GitHub] [geode] DonalEvans commented on a change in pull request #6417: GEODE-9138: Moved debug log message and added tests

DonalEvans commented on a change in pull request #6417:
URL: https://github.com/apache/geode/pull/6417#discussion_r624269250



##########
File path: geode-core/src/main/java/org/apache/geode/internal/cache/event/DistributedEventTracker.java
##########
@@ -363,11 +370,27 @@ public boolean hasSeenEvent(EventID eventID, InternalCacheEvent tagHolder) {
       if (evh.isRemoved() || evh.getLastSequenceNumber() < eventID.getSequenceID()) {
         return false;
       }
-      if (shouldLogPreviouslySeenEvent(tagHolder, evh)) {
+      Pair<Boolean, String> shouldLogPreviouslySeenEvent =
+          shouldLogPreviouslySeenEvent(tagHolder, evh);
+      if (shouldLogPreviouslySeenEvent.getLeft()) {
         logger.info(EVENT_HAS_PREVIOUSLY_BEEN_SEEN, region.getName(),
             tagHolder == null ? "unknown" : ((EntryEventImpl) tagHolder).getKey(),
             tagHolder == null ? "unknown" : tagHolder.getOperation(), eventID.expensiveToString(),
             evh.getLastSequenceNumber());
+      } else {
+        if (logger.isDebugEnabled()) {
+          if (tagHolder == null) {
+            logger.debug(IGNORING_PREVIOUSLY_SEEN_EVENT_PREFIX,
+                shouldLogPreviouslySeenEvent.getRight());
+          } else {
+            logger.debug(IGNORING_PREVIOUSLY_SEEN_EVENT, shouldLogPreviouslySeenEvent.getRight(),
+                region.getName(), ((EntryEventImpl) tagHolder).getKey(), tagHolder.getOperation(),
+                tagHolder.getEventId().expensiveToString(), evh.getLastSequenceNumber());
+          }
+          logger.warn(IGNORING_PREVIOUSLY_SEEN_EVENT, shouldLogPreviouslySeenEvent.getRight(),

Review comment:
       This logging seems to be identical to the logging just above it, but at warn level rather than debug. Given that this is happening inside a block with `if (logger.isDebugEnabled())` this seems like a mistake.




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