You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2020/12/10 09:43:01 UTC

[GitHub] [ignite] tkalkirill commented on a change in pull request #8550: IGNITE-12892 Clarify WAL archive size configuration

tkalkirill commented on a change in pull request #8550:
URL: https://github.com/apache/ignite/pull/8550#discussion_r540017727



##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/checkpoint/CheckpointHistory.java
##########
@@ -67,8 +67,11 @@
     /** The maximal number of checkpoints hold in memory. */
     private final int maxCpHistMemSize;
 
-    /** If WalHistorySize was setted by user will use old way for removing checkpoints. */
-    private final boolean isWalHistorySizeParameterEnabled;
+    /** Should WAL be truncated */
+    private final boolean isWalTruncationEnabled;
+
+    /** Maximum size of WAL archive (in bytes) */
+    private final long maxWalArchiveSize;

Review comment:
       It seems that this field is not used anywhere other than the constructor.

##########
File path: modules/core/src/main/java/org/apache/ignite/configuration/DataStorageConfiguration.java
##########
@@ -594,21 +597,29 @@ public boolean isWalHistorySizeParameterUsed() {
     /**
      * Gets a max allowed size(in bytes) of WAL archives.
      *
-     * @return max size(in bytes) of WAL archive directory(always greater than 0).
+     * @return max size(in bytes) of WAL archive directory(greater than 0, or {@link #UNLIMITED_WAL_ARCHIVE} if
+     * WAL archive size is unlimited).
      */
     public long getMaxWalArchiveSize() {
+        if (maxWalArchiveSize == UNLIMITED_WAL_ARCHIVE)

Review comment:
       It seems that only the field value should be returned here, and the invariants should be checked in the setter.




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