nizhikov commented on code in PR #10766:
URL: https://github.com/apache/ignite/pull/10766#discussion_r1256025145


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java:
##########
@@ -1818,6 +1837,37 @@ public long maxWalSegmentSize() {
         return maxWalSegmentSize;
     }
 
+    /** @return {@code True} if log record should be skipped when CDC is 
disabled. */
+    private boolean skipIfCdcDisabled(WALRecord rec) {
+        if (!inMemoryCdc || rec instanceof CdcDisableRecord || 
!cdcDisabled.getOrDefault(false))
+            return false;
+
+        LT.warn(log, "Logging CDC data records to WAL skipped. The '" + 
CDC_DISABLED +

Review Comment:
   LT.warn effectively creates an object to check timeout of logging on every 
invocation
   
   ```
           IgniteBiTuple<Class<? extends Throwable>, String> tup =
               e != null && !byMsg ? F.<Class<? extends Throwable>, 
String>t(e.getClass(), e.getMessage()) :
                   F.<Class<? extends Throwable>, String>t(null, longMsg);
   ```
   
   So we shouldn't call it for every DataRecord that will be logged on every 
entry change.
   Let's log changes of cdcDisabled state only.



-- 
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-unsubscr...@ignite.apache.org

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

Reply via email to