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 2022/12/15 13:25:58 UTC

[GitHub] [ignite] NSAmelchev opened a new pull request, #10444: IGNITE-14350 Added distributed property to force disable CDC.

NSAmelchev opened a new pull request, #10444:
URL: https://github.com/apache/ignite/pull/10444

   Thank you for submitting the pull request to the Apache Ignite.
   
   In order to streamline the review of the contribution 
   we ask you to ensure the following steps have been taken:
   
   ### The Contribution Checklist
   - [ ] There is a single JIRA ticket related to the pull request. 
   - [ ] The web-link to the pull request is attached to the JIRA ticket.
   - [ ] The JIRA ticket has the _Patch Available_ state.
   - [ ] The pull request body describes changes that have been made. 
   The description explains _WHAT_ and _WHY_ was made instead of _HOW_.
   - [ ] The pull request title is treated as the final commit message. 
   The following pattern must be used: `IGNITE-XXXX Change summary` where `XXXX` - number of JIRA issue.
   - [ ] A reviewer has been mentioned through the JIRA comments 
   (see [the Maintainers list](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute#HowtoContribute-ReviewProcessandMaintainers)) 
   - [ ] The pull request has been checked by the Teamcity Bot and 
   the `green visa` attached to the JIRA ticket (see [TC.Bot: Check PR](https://mtcga.gridgain.com/prs.html))
   
   ### Notes
   - [How to Contribute](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute)
   - [Coding abbreviation rules](https://cwiki.apache.org/confluence/display/IGNITE/Abbreviation+Rules)
   - [Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines)
   - [Apache Ignite Teamcity Bot](https://cwiki.apache.org/confluence/display/IGNITE/Apache+Ignite+Teamcity+Bot)
   
   If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com _#ignite_ channel.
   


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

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


[GitHub] [ignite] NSAmelchev commented on a diff in pull request #10444: IGNITE-14350 Added distributed property to disable CDC.

Posted by GitBox <gi...@apache.org>.
NSAmelchev commented on code in PR #10444:
URL: https://github.com/apache/ignite/pull/10444#discussion_r1052129809


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java:
##########
@@ -2118,7 +2141,7 @@ public SegmentArchiveResult archiveSegment(long absIdx) throws StorageException
 
                 Files.move(dstTmpFile.toPath(), dstFile.toPath());
 
-                if (walCdcDir != null)
+                if (walCdcDir != null && !cdcForceDisable.getOrDefault(false))

Review Comment:
   Done.



##########
modules/core/src/main/java/org/apache/ignite/internal/cluster/DistributedConfigurationUtils.java:
##########
@@ -33,8 +33,10 @@
  * Distributed configuration utilities methods.
  */
 public final class DistributedConfigurationUtils {
-    /**
-     */
+    /** Distributed property update message. */
+    public static final String PROPERTY_UPDATE_MSG = "Distributed property '%s' was changed from '%s' to '%s'.";

Review Comment:
   Done.



##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java:
##########
@@ -220,6 +224,9 @@ public class FileWriteAheadLogManager extends GridCacheSharedManagerAdapter impl
     /** @see IgniteSystemProperties#IGNITE_THRESHOLD_WAIT_TIME_NEXT_WAL_SEGMENT */
     public static final long DFLT_THRESHOLD_WAIT_TIME_NEXT_WAL_SEGMENT = 1000L;
 
+    /** CDC force disable distributed property name. */
+    public static final String CDC_FORCE_DISABLE = "cdc.forceDisable";

Review Comment:
   Done.



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

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


[GitHub] [ignite] nizhikov commented on a diff in pull request #10444: IGNITE-14350 Added distributed property to force disable CDC.

Posted by GitBox <gi...@apache.org>.
nizhikov commented on code in PR #10444:
URL: https://github.com/apache/ignite/pull/10444#discussion_r1052110369


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java:
##########
@@ -2118,7 +2141,7 @@ public SegmentArchiveResult archiveSegment(long absIdx) throws StorageException
 
                 Files.move(dstTmpFile.toPath(), dstFile.toPath());
 
-                if (walCdcDir != null)
+                if (walCdcDir != null && !cdcForceDisable.getOrDefault(false))

Review Comment:
   Let's rewrite a bit and warn user every time we skip link creation.
   
   ```
   if (walCdcDir != null) {
       if (!cdcForceDisable.getOrDefault(false))
           Files.createLink(walCdcDir.toPath().resolve(dstFile.getName()), **dstFile.toPath());
       else 
           log.warning("Creation of segment CDC link skiped. `cdc.disabled` distributed property is false."); 
   }
   ```



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

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


[GitHub] [ignite] nizhikov commented on a diff in pull request #10444: IGNITE-14350 Added distributed property to force disable CDC.

Posted by GitBox <gi...@apache.org>.
nizhikov commented on code in PR #10444:
URL: https://github.com/apache/ignite/pull/10444#discussion_r1052108858


##########
modules/core/src/main/java/org/apache/ignite/internal/cluster/DistributedConfigurationUtils.java:
##########
@@ -33,8 +33,10 @@
  * Distributed configuration utilities methods.
  */
 public final class DistributedConfigurationUtils {
-    /**
-     */
+    /** Distributed property update message. */
+    public static final String PROPERTY_UPDATE_MSG = "Distributed property '%s' was changed from '%s' to '%s'.";

Review Comment:
   One usage. Let's inline.



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

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


[GitHub] [ignite] nizhikov merged pull request #10444: IGNITE-14350 Added distributed property to disable CDC.

Posted by "nizhikov (via GitHub)" <gi...@apache.org>.
nizhikov merged PR #10444:
URL: https://github.com/apache/ignite/pull/10444


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

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


[GitHub] [ignite] nizhikov commented on a diff in pull request #10444: IGNITE-14350 Added distributed property to force disable CDC.

Posted by GitBox <gi...@apache.org>.
nizhikov commented on code in PR #10444:
URL: https://github.com/apache/ignite/pull/10444#discussion_r1052108071


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java:
##########
@@ -409,6 +416,9 @@ public class FileWriteAheadLogManager extends GridCacheSharedManagerAdapter impl
     /** Pointer to the last successful checkpoint until which WAL segments can be safely deleted. */
     private volatile WALPointer lastCheckpointPtr = new WALPointer(0, 0, 0);
 
+    /** Force disable CDC. */
+    private final DistributedBooleanProperty cdcForceDisable = detachedBooleanProperty(CDC_FORCE_DISABLE);

Review Comment:
   Let's rename to `cdcDisabled`



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

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


[GitHub] [ignite] nizhikov commented on a diff in pull request #10444: IGNITE-14350 Added distributed property to force disable CDC.

Posted by GitBox <gi...@apache.org>.
nizhikov commented on code in PR #10444:
URL: https://github.com/apache/ignite/pull/10444#discussion_r1052108369


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java:
##########
@@ -220,6 +224,9 @@ public class FileWriteAheadLogManager extends GridCacheSharedManagerAdapter impl
     /** @see IgniteSystemProperties#IGNITE_THRESHOLD_WAIT_TIME_NEXT_WAL_SEGMENT */
     public static final long DFLT_THRESHOLD_WAIT_TIME_NEXT_WAL_SEGMENT = 1000L;
 
+    /** CDC force disable distributed property name. */
+    public static final String CDC_FORCE_DISABLE = "cdc.forceDisable";

Review Comment:
   Let's rename to `cdc.disabled`



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

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


[GitHub] [ignite] NSAmelchev commented on a diff in pull request #10444: IGNITE-14350 Added distributed property to disable CDC.

Posted by GitBox <gi...@apache.org>.
NSAmelchev commented on code in PR #10444:
URL: https://github.com/apache/ignite/pull/10444#discussion_r1052130016


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java:
##########
@@ -409,6 +416,9 @@ public class FileWriteAheadLogManager extends GridCacheSharedManagerAdapter impl
     /** Pointer to the last successful checkpoint until which WAL segments can be safely deleted. */
     private volatile WALPointer lastCheckpointPtr = new WALPointer(0, 0, 0);
 
+    /** Force disable CDC. */
+    private final DistributedBooleanProperty cdcForceDisable = detachedBooleanProperty(CDC_FORCE_DISABLE);

Review Comment:
   Done.



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

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