You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "NSAmelchev (via GitHub)" <gi...@apache.org> on 2026/10/05 13:44:28 UTC
[PR] IGNITE-19661 In-memory CDC should not produce WAL records when disabled. [ignite]
NSAmelchev opened a new pull request, #13649:
URL: https://github.com/apache/ignite/pull/13649
(no comment)
--
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
Re: [PR] IGNITE-19661 In-memory CDC should not produce WAL records when disabled. [ignite]
Posted by "NSAmelchev (via GitHub)" <gi...@apache.org>.
NSAmelchev commented on code in PR #13649:
URL: https://github.com/apache/ignite/pull/13649#discussion_r4250347989
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/CdcLinkManager.java:
##########
@@ -0,0 +1,156 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.persistence.wal;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.util.Arrays;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.configuration.DataStorageConfiguration;
+import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
+import org.apache.ignite.internal.processors.cache.persistence.filename.NodeFileTree;
+import org.apache.ignite.internal.processors.configuration.distributed.DistributedBooleanProperty;
+import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.internal.util.typedef.internal.U;
+
+import static java.lang.String.format;
+import static org.apache.ignite.internal.processors.cache.persistence.wal.FileWriteAheadLogManager.CDC_DISABLED;
+import static org.apache.ignite.internal.processors.configuration.distributed.DistributedBooleanProperty.detachedBooleanProperty;
+import static org.apache.ignite.internal.util.io.GridFileUtils.ensureHardLinkAvailable;
+
+/**
+ * Links the archived WAL segments to the CDC directory. The links are not created while CDC is disabled by the
+ * {@link FileWriteAheadLogManager#CDC_DISABLED} distributed property. Data regions without persistence do not log the
+ * changes while CDC is disabled, so on the nodes with such regions the segment that is current at the disabling is never
+ * linked either: the CDC application fails on the missed segment after CDC is enabled again.
+ */
+class CdcLinkManager {
+ /** */
+ private final GridCacheSharedContext<?, ?> cctx;
+
+ /** */
+ private final IgniteLogger log;
+
+ /** */
+ private final NodeFileTree ft;
+
+ /** CDC disabled flag. */
+ private final DistributedBooleanProperty cdcDisabled = detachedBooleanProperty(CDC_DISABLED,
+ "CDC disabled flag. Disables CDC in the cluster to avoid disk overflow. " +
+ "Note that cache changes will be lost when CDC is disabled. Useful if the CDC application " +
+ "is down for a long time.");
+
+ /**
+ * Index of the segment that was current at the last CDC disabling. It is never linked, so the CDC application detects
+ * the missed changes as a gap in the segments even if no segment is archived while CDC is disabled. Persistent
+ * regions log the changes anyway, so the gap is made only on the nodes with in-memory CDC regions.
+ */
+ private volatile long disableSgmnt = -1;
+
+ /** */
+ CdcLinkManager(GridCacheSharedContext<?, ?> cctx) throws IgniteCheckedException {
+ this.cctx = cctx;
+
+ log = cctx.logger(CdcLinkManager.class);
+ ft = cctx.kernalContext().pdsFolderResolver().fileTree();
+
+ DataStorageConfiguration dsCfg = cctx.gridConfig().getDataStorageConfiguration();
+
+ // True on a node with persistence too, unlike FileWriteAheadLogManager#inMemoryCdc.
+ boolean inMemoryCdcRegion = F.exist(
+ F.concat(false, dsCfg.getDefaultDataRegionConfiguration(), F.asList(dsCfg.getDataRegionConfigurations())),
+ reg -> reg.isCdcEnabled() && !reg.isPersistenceEnabled());
+
+ U.ensureDirectory(ft.walCdc(), "change data capture directory", log);
+
+ ensureHardLinkAvailable(ft.walArchive().toPath(), ft.walCdc().toPath());
+
+ cctx.kernalContext().internalSubscriptionProcessor().registerDistributedConfigurationListener(dispatcher -> {
+ cdcDisabled.addListener((name, oldVal, newVal) -> {
+ if (log.isInfoEnabled())
+ log.info(format("Distributed property '%s' was changed from '%s' to '%s'.", name, oldVal, newVal));
+
+ if (newVal != null && newVal) {
+ log.warning("CDC was disabled.");
+
+ if (cctx.cdc() != null)
+ cctx.cdc().stop(true);
+
+ if (inMemoryCdcRegion)
+ markDisableSegment();
+ }
+ });
+
+ dispatcher.registerProperty(cdcDisabled);
+ });
+ }
+
+ /** */
+ private void markDisableSegment() {
+ // -1 if the WAL logging is not resumed yet: the node is restarted with CDC disabled, the gap is already made.
+ disableSgmnt = Math.max(disableSgmnt, cctx.wal(true).currentSegment());
+ }
+
+ /** */
+ boolean forceDisabled() {
+ return cdcDisabled.getOrDefault(false);
+ }
+
+ /**
+ * The segment that was current at the CDC disabling is never linked, the changes in it are lost. It is closed before
+ * the next record, so the changes made after CDC is enabled again do not get into it.
+ */
+ boolean shouldRollover(long idx) {
+ return idx == disableSgmnt;
+ }
+
+ /** */
+ void linkSegment(long idx, File segment) throws IOException {
+ if (forceDisabled())
+ log.warning("Creation of segment CDC link skipped. '" + CDC_DISABLED + "' distributed property is 'true'.");
+ else if (idx <= disableSgmnt)
Review Comment:
Done.
##########
modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/IgniteWriteAheadLogManager.java:
##########
@@ -44,6 +44,11 @@ public interface IgniteWriteAheadLogManager extends GridCacheSharedManager, Igni
*/
public boolean isFullSync();
+ /**
+ * @return {@code True} if CDC is disabled by the {@code cdc.disabled} distributed property.
+ */
+ public boolean cdcForceDisabled();
Review Comment:
Fixed.
--
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
Re: [PR] IGNITE-19661 In-memory CDC should not produce WAL records when disabled. [ignite]
Posted by "NSAmelchev (via GitHub)" <gi...@apache.org>.
NSAmelchev commented on code in PR #13649:
URL: https://github.com/apache/ignite/pull/13649#discussion_r4256800836
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/CdcLinkManager.java:
##########
@@ -0,0 +1,175 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.persistence.wal;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.util.Arrays;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.configuration.DataStorageConfiguration;
+import org.apache.ignite.internal.pagemem.wal.IgniteWriteAheadLogManager;
+import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
+import org.apache.ignite.internal.processors.cache.persistence.filename.NodeFileTree;
+import org.apache.ignite.internal.processors.configuration.distributed.DistributedBooleanProperty;
+import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.internal.util.typedef.internal.U;
+
+import static java.lang.String.format;
+import static org.apache.ignite.internal.processors.cache.persistence.wal.FileWriteAheadLogManager.CDC_DISABLED;
+import static org.apache.ignite.internal.processors.configuration.distributed.DistributedBooleanProperty.detachedBooleanProperty;
+import static org.apache.ignite.internal.util.io.GridFileUtils.ensureHardLinkAvailable;
+
+/**
+ * Links the archived WAL segments to the CDC directory. The links are not created while CDC is disabled by the
+ * {@link FileWriteAheadLogManager#CDC_DISABLED} distributed property. Data regions without persistence do not log the
+ * changes while CDC is disabled, so on the nodes with such regions the segment that is current at the disabling is never
+ * linked either: the CDC application fails on the missed segment after CDC is enabled again.
+ */
+class CdcLinkManager {
+ /** */
+ private final GridCacheSharedContext<?, ?> cctx;
+
+ /** */
+ private final IgniteWriteAheadLogManager wal;
+
+ /** */
+ private final IgniteLogger log;
+
+ /** */
+ private final NodeFileTree ft;
+
+ /**
+ * {@code True} if a data region with CDC has no persistence.
+ * Unlike {@code FileWriteAheadLogManager#inMemoryCdc}, {@code true} on a node with persistence too.
+ */
+ private final boolean inMemoryCdcRegion;
+
+ /** CDC disabled flag. */
+ private final DistributedBooleanProperty cdcDisabled = detachedBooleanProperty(CDC_DISABLED,
+ "CDC disabled flag. Disables CDC in the cluster to avoid disk overflow. " +
+ "Note that cache changes will be lost when CDC is disabled. Useful if the CDC application " +
+ "is down for a long time.");
+
+ /**
+ * Index of the segment that was current at the last CDC disabling. It is never linked, so the CDC application detects
+ * the missed changes as a gap in the segments even if no segment is archived while CDC is disabled. Persistent
+ * regions log the changes anyway, so the gap is made only on the nodes with in-memory CDC regions.
+ */
+ private volatile long disableSgmnt = -1;
+
+ /** */
+ CdcLinkManager(GridCacheSharedContext<?, ?> cctx, IgniteWriteAheadLogManager wal) throws IgniteCheckedException {
+ this.cctx = cctx;
+ this.wal = wal;
+
+ log = cctx.logger(CdcLinkManager.class);
+ ft = cctx.kernalContext().pdsFolderResolver().fileTree();
+
+ DataStorageConfiguration dsCfg = cctx.gridConfig().getDataStorageConfiguration();
+
+ inMemoryCdcRegion = F.exist(
Review Comment:
Kept: a null default data region fails node start on master as well, IgniteCacheDatabaseSharedManager.validateConfiguration dereferences it in checkDataRegionConfiguration, the guard would only move the same NPE one step later.
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/CdcLinkManager.java:
##########
@@ -0,0 +1,175 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.persistence.wal;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.util.Arrays;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.configuration.DataStorageConfiguration;
+import org.apache.ignite.internal.pagemem.wal.IgniteWriteAheadLogManager;
+import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
+import org.apache.ignite.internal.processors.cache.persistence.filename.NodeFileTree;
+import org.apache.ignite.internal.processors.configuration.distributed.DistributedBooleanProperty;
+import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.internal.util.typedef.internal.U;
+
+import static java.lang.String.format;
+import static org.apache.ignite.internal.processors.cache.persistence.wal.FileWriteAheadLogManager.CDC_DISABLED;
+import static org.apache.ignite.internal.processors.configuration.distributed.DistributedBooleanProperty.detachedBooleanProperty;
+import static org.apache.ignite.internal.util.io.GridFileUtils.ensureHardLinkAvailable;
+
+/**
+ * Links the archived WAL segments to the CDC directory. The links are not created while CDC is disabled by the
+ * {@link FileWriteAheadLogManager#CDC_DISABLED} distributed property. Data regions without persistence do not log the
+ * changes while CDC is disabled, so on the nodes with such regions the segment that is current at the disabling is never
+ * linked either: the CDC application fails on the missed segment after CDC is enabled again.
+ */
+class CdcLinkManager {
+ /** */
+ private final GridCacheSharedContext<?, ?> cctx;
+
+ /** */
+ private final IgniteWriteAheadLogManager wal;
+
+ /** */
+ private final IgniteLogger log;
+
+ /** */
+ private final NodeFileTree ft;
+
+ /**
+ * {@code True} if a data region with CDC has no persistence.
+ * Unlike {@code FileWriteAheadLogManager#inMemoryCdc}, {@code true} on a node with persistence too.
+ */
+ private final boolean inMemoryCdcRegion;
+
+ /** CDC disabled flag. */
+ private final DistributedBooleanProperty cdcDisabled = detachedBooleanProperty(CDC_DISABLED,
+ "CDC disabled flag. Disables CDC in the cluster to avoid disk overflow. " +
+ "Note that cache changes will be lost when CDC is disabled. Useful if the CDC application " +
+ "is down for a long time.");
+
+ /**
+ * Index of the segment that was current at the last CDC disabling. It is never linked, so the CDC application detects
+ * the missed changes as a gap in the segments even if no segment is archived while CDC is disabled. Persistent
+ * regions log the changes anyway, so the gap is made only on the nodes with in-memory CDC regions.
+ */
+ private volatile long disableSgmnt = -1;
+
+ /** */
+ CdcLinkManager(GridCacheSharedContext<?, ?> cctx, IgniteWriteAheadLogManager wal) throws IgniteCheckedException {
+ this.cctx = cctx;
+ this.wal = wal;
+
+ log = cctx.logger(CdcLinkManager.class);
+ ft = cctx.kernalContext().pdsFolderResolver().fileTree();
+
+ DataStorageConfiguration dsCfg = cctx.gridConfig().getDataStorageConfiguration();
+
+ inMemoryCdcRegion = F.exist(
+ F.concat(false, dsCfg.getDefaultDataRegionConfiguration(), F.asList(dsCfg.getDataRegionConfigurations())),
+ reg -> reg.isCdcEnabled() && !reg.isPersistenceEnabled());
+
+ U.ensureDirectory(ft.walCdc(), "change data capture directory", log);
+
+ ensureHardLinkAvailable(ft.walArchive().toPath(), ft.walCdc().toPath());
+
+ cctx.kernalContext().internalSubscriptionProcessor().registerDistributedConfigurationListener(dispatcher -> {
+ cdcDisabled.addListener((name, oldVal, newVal) -> {
+ if (log.isInfoEnabled())
+ log.info(format("Distributed property '%s' was changed from '%s' to '%s'.", name, oldVal, newVal));
+
+ if (newVal != null && newVal) {
+ log.warning("CDC was disabled.");
+
+ if (cctx.cdc() != null)
+ cctx.cdc().stop(true);
+
+ if (inMemoryCdcRegion)
+ markDisableSegment();
+ }
+ });
+
+ dispatcher.registerProperty(cdcDisabled);
+ });
+ }
+
+ /**
+ * The property listener runs before the WAL logging is resumed on a persistent node restarted with CDC disabled, and
+ * the gap made at the disabling is not guaranteed: the segment can be archived after CDC is enabled again.
+ */
+ void resumeLogging() {
+ if (inMemoryCdcRegion && forceDisabled())
+ markDisableSegment();
+ }
+
+ /** */
+ private void markDisableSegment() {
+ // -1 before the WAL logging is resumed, see #resumeLogging.
+ disableSgmnt = Math.max(disableSgmnt, wal.currentSegment());
+ }
+
+ /** */
+ boolean forceDisabled() {
+ return cdcDisabled.getOrDefault(false);
+ }
+
+ /**
+ * The segment that was current at the CDC disabling is never linked, the changes in it are lost. It is closed before
+ * the next record, so the changes made after CDC is enabled again do not get into it.
+ */
+ boolean shouldRollover(long idx) {
Review Comment:
Kept: it is one comparison with the field, and the two sites answer different questions, “close before the next record” in log() and “never link” in the archiver; the names say that, isDisableSegment() would not, and a shared predicate would tie the two rules together if one of them ever changes.
--
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
Re: [PR] IGNITE-19661 In-memory CDC should not produce WAL records when disabled. [ignite]
Posted by "NSAmelchev (via GitHub)" <gi...@apache.org>.
NSAmelchev commented on code in PR #13649:
URL: https://github.com/apache/ignite/pull/13649#discussion_r4256792778
##########
modules/core/src/main/java/org/apache/ignite/internal/management/cdc/CdcCacheDataResendTask.java:
##########
@@ -198,6 +201,7 @@ private void resendCacheData(IgniteInternalCache<?, ?> cache) throws IgniteCheck
break;
ensureTopologyNotChanged();
+ ensureCdcEnabled();
Review Comment:
Kept: cancellation on a topology change has the same at-least-once effect today.
--
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
Re: [PR] IGNITE-19661 In-memory CDC should not produce WAL records when disabled. [ignite]
Posted by "NSAmelchev (via GitHub)" <gi...@apache.org>.
NSAmelchev commented on code in PR #13649:
URL: https://github.com/apache/ignite/pull/13649#discussion_r4250345909
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/CdcLinkManager.java:
##########
@@ -0,0 +1,156 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.persistence.wal;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.util.Arrays;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.configuration.DataStorageConfiguration;
+import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
+import org.apache.ignite.internal.processors.cache.persistence.filename.NodeFileTree;
+import org.apache.ignite.internal.processors.configuration.distributed.DistributedBooleanProperty;
+import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.internal.util.typedef.internal.U;
+
+import static java.lang.String.format;
+import static org.apache.ignite.internal.processors.cache.persistence.wal.FileWriteAheadLogManager.CDC_DISABLED;
+import static org.apache.ignite.internal.processors.configuration.distributed.DistributedBooleanProperty.detachedBooleanProperty;
+import static org.apache.ignite.internal.util.io.GridFileUtils.ensureHardLinkAvailable;
+
+/**
+ * Links the archived WAL segments to the CDC directory. The links are not created while CDC is disabled by the
+ * {@link FileWriteAheadLogManager#CDC_DISABLED} distributed property. Data regions without persistence do not log the
+ * changes while CDC is disabled, so on the nodes with such regions the segment that is current at the disabling is never
+ * linked either: the CDC application fails on the missed segment after CDC is enabled again.
+ */
+class CdcLinkManager {
+ /** */
+ private final GridCacheSharedContext<?, ?> cctx;
+
+ /** */
+ private final IgniteLogger log;
+
+ /** */
+ private final NodeFileTree ft;
+
+ /** CDC disabled flag. */
+ private final DistributedBooleanProperty cdcDisabled = detachedBooleanProperty(CDC_DISABLED,
+ "CDC disabled flag. Disables CDC in the cluster to avoid disk overflow. " +
+ "Note that cache changes will be lost when CDC is disabled. Useful if the CDC application " +
+ "is down for a long time.");
+
+ /**
+ * Index of the segment that was current at the last CDC disabling. It is never linked, so the CDC application detects
+ * the missed changes as a gap in the segments even if no segment is archived while CDC is disabled. Persistent
+ * regions log the changes anyway, so the gap is made only on the nodes with in-memory CDC regions.
+ */
+ private volatile long disableSgmnt = -1;
+
+ /** */
+ CdcLinkManager(GridCacheSharedContext<?, ?> cctx) throws IgniteCheckedException {
+ this.cctx = cctx;
+
+ log = cctx.logger(CdcLinkManager.class);
+ ft = cctx.kernalContext().pdsFolderResolver().fileTree();
+
+ DataStorageConfiguration dsCfg = cctx.gridConfig().getDataStorageConfiguration();
+
+ // True on a node with persistence too, unlike FileWriteAheadLogManager#inMemoryCdc.
+ boolean inMemoryCdcRegion = F.exist(
+ F.concat(false, dsCfg.getDefaultDataRegionConfiguration(), F.asList(dsCfg.getDataRegionConfigurations())),
+ reg -> reg.isCdcEnabled() && !reg.isPersistenceEnabled());
+
+ U.ensureDirectory(ft.walCdc(), "change data capture directory", log);
+
+ ensureHardLinkAvailable(ft.walArchive().toPath(), ft.walCdc().toPath());
+
+ cctx.kernalContext().internalSubscriptionProcessor().registerDistributedConfigurationListener(dispatcher -> {
+ cdcDisabled.addListener((name, oldVal, newVal) -> {
+ if (log.isInfoEnabled())
+ log.info(format("Distributed property '%s' was changed from '%s' to '%s'.", name, oldVal, newVal));
+
+ if (newVal != null && newVal) {
+ log.warning("CDC was disabled.");
+
+ if (cctx.cdc() != null)
+ cctx.cdc().stop(true);
+
+ if (inMemoryCdcRegion)
+ markDisableSegment();
+ }
+ });
+
+ dispatcher.registerProperty(cdcDisabled);
+ });
+ }
+
+ /** */
+ private void markDisableSegment() {
+ // -1 if the WAL logging is not resumed yet: the node is restarted with CDC disabled, the gap is already made.
+ disableSgmnt = Math.max(disableSgmnt, cctx.wal(true).currentSegment());
Review Comment:
Fixed: markDisableSegment() is re-run from resumeLogging().
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java:
##########
@@ -885,6 +861,12 @@ private boolean checkTimeout(AtomicLong lastEvt, long timeout) {
if (currWrHandle == null || (isDisable != null && isDisable.check()))
return null;
+ if (cdcLinkMgr != null && cdcLinkMgr.shouldRollover(currWrHandle.getSegmentId())) {
Review Comment:
Kept: the application sees the gap only when the next segment is linked, so an async rollover gains nothing, while a rollover from the listener races with the WAL stop on deactivation and needs a guard; the check in log() runs in the writer’s thread.
--
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
Re: [PR] IGNITE-19661 In-memory CDC should not produce WAL records when disabled. [ignite]
Posted by "nizhikov (via GitHub)" <gi...@apache.org>.
nizhikov commented on code in PR #13649:
URL: https://github.com/apache/ignite/pull/13649#discussion_r4255814609
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/CdcLinkManager.java:
##########
@@ -0,0 +1,175 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.persistence.wal;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.util.Arrays;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.configuration.DataStorageConfiguration;
+import org.apache.ignite.internal.pagemem.wal.IgniteWriteAheadLogManager;
+import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
+import org.apache.ignite.internal.processors.cache.persistence.filename.NodeFileTree;
+import org.apache.ignite.internal.processors.configuration.distributed.DistributedBooleanProperty;
+import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.internal.util.typedef.internal.U;
+
+import static java.lang.String.format;
+import static org.apache.ignite.internal.processors.cache.persistence.wal.FileWriteAheadLogManager.CDC_DISABLED;
+import static org.apache.ignite.internal.processors.configuration.distributed.DistributedBooleanProperty.detachedBooleanProperty;
+import static org.apache.ignite.internal.util.io.GridFileUtils.ensureHardLinkAvailable;
+
+/**
+ * Links the archived WAL segments to the CDC directory. The links are not created while CDC is disabled by the
+ * {@link FileWriteAheadLogManager#CDC_DISABLED} distributed property. Data regions without persistence do not log the
+ * changes while CDC is disabled, so on the nodes with such regions the segment that is current at the disabling is never
+ * linked either: the CDC application fails on the missed segment after CDC is enabled again.
+ */
+class CdcLinkManager {
+ /** */
+ private final GridCacheSharedContext<?, ?> cctx;
+
+ /** */
+ private final IgniteWriteAheadLogManager wal;
+
+ /** */
+ private final IgniteLogger log;
+
+ /** */
+ private final NodeFileTree ft;
+
+ /**
+ * {@code True} if a data region with CDC has no persistence.
+ * Unlike {@code FileWriteAheadLogManager#inMemoryCdc}, {@code true} on a node with persistence too.
+ */
+ private final boolean inMemoryCdcRegion;
+
+ /** CDC disabled flag. */
+ private final DistributedBooleanProperty cdcDisabled = detachedBooleanProperty(CDC_DISABLED,
+ "CDC disabled flag. Disables CDC in the cluster to avoid disk overflow. " +
+ "Note that cache changes will be lost when CDC is disabled. Useful if the CDC application " +
+ "is down for a long time.");
+
+ /**
+ * Index of the segment that was current at the last CDC disabling. It is never linked, so the CDC application detects
+ * the missed changes as a gap in the segments even if no segment is archived while CDC is disabled. Persistent
+ * regions log the changes anyway, so the gap is made only on the nodes with in-memory CDC regions.
+ */
+ private volatile long disableSgmnt = -1;
+
+ /** */
+ CdcLinkManager(GridCacheSharedContext<?, ?> cctx, IgniteWriteAheadLogManager wal) throws IgniteCheckedException {
+ this.cctx = cctx;
+ this.wal = wal;
+
+ log = cctx.logger(CdcLinkManager.class);
+ ft = cctx.kernalContext().pdsFolderResolver().fileTree();
+
+ DataStorageConfiguration dsCfg = cctx.gridConfig().getDataStorageConfiguration();
+
+ inMemoryCdcRegion = F.exist(
+ F.concat(false, dsCfg.getDefaultDataRegionConfiguration(), F.asList(dsCfg.getDataRegionConfigurations())),
+ reg -> reg.isCdcEnabled() && !reg.isPersistenceEnabled());
+
+ U.ensureDirectory(ft.walCdc(), "change data capture directory", log);
+
+ ensureHardLinkAvailable(ft.walArchive().toPath(), ft.walCdc().toPath());
+
+ cctx.kernalContext().internalSubscriptionProcessor().registerDistributedConfigurationListener(dispatcher -> {
+ cdcDisabled.addListener((name, oldVal, newVal) -> {
+ if (log.isInfoEnabled())
+ log.info(format("Distributed property '%s' was changed from '%s' to '%s'.", name, oldVal, newVal));
+
+ if (newVal != null && newVal) {
+ log.warning("CDC was disabled.");
+
+ if (cctx.cdc() != null)
+ cctx.cdc().stop(true);
+
+ if (inMemoryCdcRegion)
+ markDisableSegment();
Review Comment:
**[Note, no change needed]** A gap is forced on every disable/enable cycle on a node with an in-memory CDC region, even when no in-memory CDC cache was updated while disabled, so the CDC application always fails with "Found missed segments" after a toggle and `delete_lost_segment_links` is required. We discussed this and agree it is intentional: the gap is the signal that changes may have been lost. Worth one sentence in the docs so operators expect it.
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupContext.java:
##########
@@ -980,7 +980,7 @@ public boolean persistenceEnabled() {
* @return {@code True} if {@link DataRecord} should be loged in the WAL.
*/
public boolean logDataRecords() {
- return walEnabled() && (persistenceEnabled || cdcEnabled());
+ return walEnabled() && (persistenceEnabled || (cdcEnabled() && !ctx.wal(true).cdcForceDisabled()));
Review Comment:
**[Note, no change needed]** The flag is evaluated per entry, so a transaction that straddles the property flip is logged partially (some keys get a `DataRecord`, earlier ones do not). CDC does not guarantee per-transaction atomicity today, so this is consistent with existing behaviour. Leaving this here only so the trade-off is recorded.
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/CdcLinkManager.java:
##########
@@ -0,0 +1,175 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.persistence.wal;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.util.Arrays;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.configuration.DataStorageConfiguration;
+import org.apache.ignite.internal.pagemem.wal.IgniteWriteAheadLogManager;
+import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
+import org.apache.ignite.internal.processors.cache.persistence.filename.NodeFileTree;
+import org.apache.ignite.internal.processors.configuration.distributed.DistributedBooleanProperty;
+import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.internal.util.typedef.internal.U;
+
+import static java.lang.String.format;
+import static org.apache.ignite.internal.processors.cache.persistence.wal.FileWriteAheadLogManager.CDC_DISABLED;
+import static org.apache.ignite.internal.processors.configuration.distributed.DistributedBooleanProperty.detachedBooleanProperty;
+import static org.apache.ignite.internal.util.io.GridFileUtils.ensureHardLinkAvailable;
+
+/**
+ * Links the archived WAL segments to the CDC directory. The links are not created while CDC is disabled by the
+ * {@link FileWriteAheadLogManager#CDC_DISABLED} distributed property. Data regions without persistence do not log the
+ * changes while CDC is disabled, so on the nodes with such regions the segment that is current at the disabling is never
+ * linked either: the CDC application fails on the missed segment after CDC is enabled again.
+ */
+class CdcLinkManager {
+ /** */
+ private final GridCacheSharedContext<?, ?> cctx;
+
+ /** */
+ private final IgniteWriteAheadLogManager wal;
+
+ /** */
+ private final IgniteLogger log;
+
+ /** */
+ private final NodeFileTree ft;
+
+ /**
+ * {@code True} if a data region with CDC has no persistence.
+ * Unlike {@code FileWriteAheadLogManager#inMemoryCdc}, {@code true} on a node with persistence too.
+ */
+ private final boolean inMemoryCdcRegion;
+
+ /** CDC disabled flag. */
+ private final DistributedBooleanProperty cdcDisabled = detachedBooleanProperty(CDC_DISABLED,
+ "CDC disabled flag. Disables CDC in the cluster to avoid disk overflow. " +
+ "Note that cache changes will be lost when CDC is disabled. Useful if the CDC application " +
+ "is down for a long time.");
+
+ /**
+ * Index of the segment that was current at the last CDC disabling. It is never linked, so the CDC application detects
+ * the missed changes as a gap in the segments even if no segment is archived while CDC is disabled. Persistent
+ * regions log the changes anyway, so the gap is made only on the nodes with in-memory CDC regions.
+ */
+ private volatile long disableSgmnt = -1;
+
+ /** */
+ CdcLinkManager(GridCacheSharedContext<?, ?> cctx, IgniteWriteAheadLogManager wal) throws IgniteCheckedException {
+ this.cctx = cctx;
+ this.wal = wal;
+
+ log = cctx.logger(CdcLinkManager.class);
+ ft = cctx.kernalContext().pdsFolderResolver().fileTree();
+
+ DataStorageConfiguration dsCfg = cctx.gridConfig().getDataStorageConfiguration();
+
+ inMemoryCdcRegion = F.exist(
Review Comment:
**[Should fix]** This re-implements the data-region walk from `CU.isCdcEnabled` but drops its null guard on the default region. With `setDefaultDataRegionConfiguration(null)` and a named region with `cdcEnabled=true`, `CU.isCdcEnabled` returns `true` (it checks `dfltReg != null`), `start0` constructs `CdcLinkManager`, `F.concat(false, null, ...)` puts a `null` into the list and `reg.isCdcEnabled()` throws NPE, failing node start.
Suggest a helper next to `isCdcEnabled` (e.g. `CU.hasInMemoryCdcRegion(dsCfg)`) with the same null handling, and use it here.
##########
modules/core/src/main/java/org/apache/ignite/internal/management/cdc/CdcCacheDataResendTask.java:
##########
@@ -198,6 +201,7 @@ private void resendCacheData(IgniteInternalCache<?, ?> cache) throws IgniteCheck
break;
ensureTopologyNotChanged();
+ ensureCdcEnabled();
Review Comment:
**[Minor]** The flag is checked per row, but `wal.log(rec)` below is unconditional, so rows logged between the check and the flip land in a linked segment while the job reports failure. On a rerun the consumer receives those keys twice and has no indication of where the first run stopped.
At minimum, include the number of entries already sent in the exception message, or document the at-least-once semantics of `resend` when CDC is disabled mid-run.
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/CdcLinkManager.java:
##########
@@ -0,0 +1,175 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.persistence.wal;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.util.Arrays;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.configuration.DataStorageConfiguration;
+import org.apache.ignite.internal.pagemem.wal.IgniteWriteAheadLogManager;
+import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
+import org.apache.ignite.internal.processors.cache.persistence.filename.NodeFileTree;
+import org.apache.ignite.internal.processors.configuration.distributed.DistributedBooleanProperty;
+import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.internal.util.typedef.internal.U;
+
+import static java.lang.String.format;
+import static org.apache.ignite.internal.processors.cache.persistence.wal.FileWriteAheadLogManager.CDC_DISABLED;
+import static org.apache.ignite.internal.processors.configuration.distributed.DistributedBooleanProperty.detachedBooleanProperty;
+import static org.apache.ignite.internal.util.io.GridFileUtils.ensureHardLinkAvailable;
+
+/**
+ * Links the archived WAL segments to the CDC directory. The links are not created while CDC is disabled by the
+ * {@link FileWriteAheadLogManager#CDC_DISABLED} distributed property. Data regions without persistence do not log the
+ * changes while CDC is disabled, so on the nodes with such regions the segment that is current at the disabling is never
+ * linked either: the CDC application fails on the missed segment after CDC is enabled again.
+ */
+class CdcLinkManager {
+ /** */
+ private final GridCacheSharedContext<?, ?> cctx;
+
+ /** */
+ private final IgniteWriteAheadLogManager wal;
+
+ /** */
+ private final IgniteLogger log;
+
+ /** */
+ private final NodeFileTree ft;
+
+ /**
+ * {@code True} if a data region with CDC has no persistence.
+ * Unlike {@code FileWriteAheadLogManager#inMemoryCdc}, {@code true} on a node with persistence too.
+ */
+ private final boolean inMemoryCdcRegion;
+
+ /** CDC disabled flag. */
+ private final DistributedBooleanProperty cdcDisabled = detachedBooleanProperty(CDC_DISABLED,
+ "CDC disabled flag. Disables CDC in the cluster to avoid disk overflow. " +
+ "Note that cache changes will be lost when CDC is disabled. Useful if the CDC application " +
+ "is down for a long time.");
+
+ /**
+ * Index of the segment that was current at the last CDC disabling. It is never linked, so the CDC application detects
+ * the missed changes as a gap in the segments even if no segment is archived while CDC is disabled. Persistent
+ * regions log the changes anyway, so the gap is made only on the nodes with in-memory CDC regions.
+ */
+ private volatile long disableSgmnt = -1;
+
+ /** */
+ CdcLinkManager(GridCacheSharedContext<?, ?> cctx, IgniteWriteAheadLogManager wal) throws IgniteCheckedException {
+ this.cctx = cctx;
+ this.wal = wal;
+
+ log = cctx.logger(CdcLinkManager.class);
+ ft = cctx.kernalContext().pdsFolderResolver().fileTree();
+
+ DataStorageConfiguration dsCfg = cctx.gridConfig().getDataStorageConfiguration();
+
+ inMemoryCdcRegion = F.exist(
+ F.concat(false, dsCfg.getDefaultDataRegionConfiguration(), F.asList(dsCfg.getDataRegionConfigurations())),
+ reg -> reg.isCdcEnabled() && !reg.isPersistenceEnabled());
+
+ U.ensureDirectory(ft.walCdc(), "change data capture directory", log);
+
+ ensureHardLinkAvailable(ft.walArchive().toPath(), ft.walCdc().toPath());
+
+ cctx.kernalContext().internalSubscriptionProcessor().registerDistributedConfigurationListener(dispatcher -> {
+ cdcDisabled.addListener((name, oldVal, newVal) -> {
+ if (log.isInfoEnabled())
+ log.info(format("Distributed property '%s' was changed from '%s' to '%s'.", name, oldVal, newVal));
+
+ if (newVal != null && newVal) {
+ log.warning("CDC was disabled.");
+
+ if (cctx.cdc() != null)
+ cctx.cdc().stop(true);
+
+ if (inMemoryCdcRegion)
+ markDisableSegment();
+ }
+ });
+
+ dispatcher.registerProperty(cdcDisabled);
+ });
+ }
+
+ /**
+ * The property listener runs before the WAL logging is resumed on a persistent node restarted with CDC disabled, and
+ * the gap made at the disabling is not guaranteed: the segment can be archived after CDC is enabled again.
+ */
+ void resumeLogging() {
+ if (inMemoryCdcRegion && forceDisabled())
+ markDisableSegment();
+ }
+
+ /** */
+ private void markDisableSegment() {
+ // -1 before the WAL logging is resumed, see #resumeLogging.
+ disableSgmnt = Math.max(disableSgmnt, wal.currentSegment());
+ }
+
+ /** */
+ boolean forceDisabled() {
+ return cdcDisabled.getOrDefault(false);
+ }
+
+ /**
+ * The segment that was current at the CDC disabling is never linked, the changes in it are lost. It is closed before
+ * the next record, so the changes made after CDC is enabled again do not get into it.
+ */
+ boolean shouldRollover(long idx) {
+ return idx == disableSgmnt;
+ }
+
+ /** */
+ void linkSegment(long idx, File segment) throws IOException {
+ if (forceDisabled())
+ log.warning("Creation of segment CDC link skipped. '" + CDC_DISABLED + "' distributed property is 'true'.");
+ else if (idx == disableSgmnt)
Review Comment:
**[Blocker]** On a node with both a persistent CDC region and an in-memory CDC region, the segment that was current at the disabling is never linked, but it also holds persistent-region `DataRecord`s written *before* the disabling, while CDC was enabled and the consumer expected them. Before this PR they were delivered once the segment was archived after re-enable.
Example: segment 7 is current, 10k updates to persistent region P land in 7, `cdc.disabled=true` (disableSgmnt=7), then `false`; the next record rolls 7 -> 8; the archiver reaches 7 and `linkSegment` skips it. The 10k pre-disable P updates never reach the CDC application. Same on restart: node stopped with CDC enabled, property flipped while it was down, after join the listener marks the restored segment that contains pre-shutdown P records.
An alternative that keeps the gap but not the pre-disable data: force a rollover at the disabling (the existing `closeBufAndRollover` path) and mark / skip the *next* segment.
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupContext.java:
##########
@@ -980,7 +980,7 @@ public boolean persistenceEnabled() {
* @return {@code True} if {@link DataRecord} should be loged in the WAL.
*/
public boolean logDataRecords() {
- return walEnabled() && (persistenceEnabled || cdcEnabled());
+ return walEnabled() && (persistenceEnabled || (cdcEnabled() && !ctx.wal(true).cdcForceDisabled()));
Review Comment:
**[Minor]** Every update of an in-memory CDC cache now pays `ctx.wal(true)` (assert + branch), a virtual `cdcForceDisabled()` call and a boxed-`Boolean` `getOrDefault` on the entry-update path (`GridCacheMapEntry.innerUpdate` / `logTxUpdate`, 1-2x per put). For in-memory CDC regions the `persistenceEnabled` short-circuit never fires, so this runs on 100% of writes, for a flag that changes only on a distributed-property event.
Cheaper: a `volatile boolean` on `GridCacheSharedContext` (or `CacheGroupContext`) flipped by the `CDC_DISABLED` listener, read directly here.
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java:
##########
@@ -885,6 +864,12 @@ private boolean checkTimeout(AtomicLong lastEvt, long timeout) {
if (currWrHandle == null || (isDisable != null && isDisable.check()))
return null;
+ if (cdcLinkMgr != null && cdcLinkMgr.shouldRollover(currWrHandle.getSegmentId())) {
Review Comment:
**[Should fix]** The forced CDC rollover runs before `rolloverType` is handled. If the first record after re-enable is logged with `RolloverType.NEXT_SEGMENT` (e.g. the `CheckpointRecord` under checkpoint lock) while `shouldRollover()` is `true`, there are two consecutive rollovers: this line rolls N -> N+1, then `closeBufAndRollover` rolls N+1 -> N+2 with the record. N+1 holds only a header, is archived, hard-linked into `walCdc`, counts toward `cdcWalDirectoryMaxSize` and is read by the CDC app as an empty segment.
Skip the forced rollover when `rolloverType == NEXT_SEGMENT`, the record rolls over anyway.
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/CdcLinkManager.java:
##########
@@ -0,0 +1,175 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.persistence.wal;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.util.Arrays;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.configuration.DataStorageConfiguration;
+import org.apache.ignite.internal.pagemem.wal.IgniteWriteAheadLogManager;
+import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
+import org.apache.ignite.internal.processors.cache.persistence.filename.NodeFileTree;
+import org.apache.ignite.internal.processors.configuration.distributed.DistributedBooleanProperty;
+import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.internal.util.typedef.internal.U;
+
+import static java.lang.String.format;
+import static org.apache.ignite.internal.processors.cache.persistence.wal.FileWriteAheadLogManager.CDC_DISABLED;
+import static org.apache.ignite.internal.processors.configuration.distributed.DistributedBooleanProperty.detachedBooleanProperty;
+import static org.apache.ignite.internal.util.io.GridFileUtils.ensureHardLinkAvailable;
+
+/**
+ * Links the archived WAL segments to the CDC directory. The links are not created while CDC is disabled by the
+ * {@link FileWriteAheadLogManager#CDC_DISABLED} distributed property. Data regions without persistence do not log the
+ * changes while CDC is disabled, so on the nodes with such regions the segment that is current at the disabling is never
+ * linked either: the CDC application fails on the missed segment after CDC is enabled again.
+ */
+class CdcLinkManager {
+ /** */
+ private final GridCacheSharedContext<?, ?> cctx;
+
+ /** */
+ private final IgniteWriteAheadLogManager wal;
+
+ /** */
+ private final IgniteLogger log;
+
+ /** */
+ private final NodeFileTree ft;
+
+ /**
+ * {@code True} if a data region with CDC has no persistence.
+ * Unlike {@code FileWriteAheadLogManager#inMemoryCdc}, {@code true} on a node with persistence too.
+ */
+ private final boolean inMemoryCdcRegion;
+
+ /** CDC disabled flag. */
+ private final DistributedBooleanProperty cdcDisabled = detachedBooleanProperty(CDC_DISABLED,
+ "CDC disabled flag. Disables CDC in the cluster to avoid disk overflow. " +
+ "Note that cache changes will be lost when CDC is disabled. Useful if the CDC application " +
+ "is down for a long time.");
+
+ /**
+ * Index of the segment that was current at the last CDC disabling. It is never linked, so the CDC application detects
+ * the missed changes as a gap in the segments even if no segment is archived while CDC is disabled. Persistent
+ * regions log the changes anyway, so the gap is made only on the nodes with in-memory CDC regions.
+ */
+ private volatile long disableSgmnt = -1;
+
+ /** */
+ CdcLinkManager(GridCacheSharedContext<?, ?> cctx, IgniteWriteAheadLogManager wal) throws IgniteCheckedException {
+ this.cctx = cctx;
+ this.wal = wal;
+
+ log = cctx.logger(CdcLinkManager.class);
+ ft = cctx.kernalContext().pdsFolderResolver().fileTree();
+
+ DataStorageConfiguration dsCfg = cctx.gridConfig().getDataStorageConfiguration();
+
+ inMemoryCdcRegion = F.exist(
+ F.concat(false, dsCfg.getDefaultDataRegionConfiguration(), F.asList(dsCfg.getDataRegionConfigurations())),
+ reg -> reg.isCdcEnabled() && !reg.isPersistenceEnabled());
+
+ U.ensureDirectory(ft.walCdc(), "change data capture directory", log);
+
+ ensureHardLinkAvailable(ft.walArchive().toPath(), ft.walCdc().toPath());
+
+ cctx.kernalContext().internalSubscriptionProcessor().registerDistributedConfigurationListener(dispatcher -> {
+ cdcDisabled.addListener((name, oldVal, newVal) -> {
+ if (log.isInfoEnabled())
+ log.info(format("Distributed property '%s' was changed from '%s' to '%s'.", name, oldVal, newVal));
+
+ if (newVal != null && newVal) {
+ log.warning("CDC was disabled.");
+
+ if (cctx.cdc() != null)
+ cctx.cdc().stop(true);
+
+ if (inMemoryCdcRegion)
+ markDisableSegment();
+ }
+ });
+
+ dispatcher.registerProperty(cdcDisabled);
+ });
+ }
+
+ /**
+ * The property listener runs before the WAL logging is resumed on a persistent node restarted with CDC disabled, and
+ * the gap made at the disabling is not guaranteed: the segment can be archived after CDC is enabled again.
+ */
+ void resumeLogging() {
+ if (inMemoryCdcRegion && forceDisabled())
+ markDisableSegment();
+ }
+
+ /** */
+ private void markDisableSegment() {
+ // -1 before the WAL logging is resumed, see #resumeLogging.
+ disableSgmnt = Math.max(disableSgmnt, wal.currentSegment());
+ }
+
+ /** */
+ boolean forceDisabled() {
+ return cdcDisabled.getOrDefault(false);
+ }
+
+ /**
+ * The segment that was current at the CDC disabling is never linked, the changes in it are lost. It is closed before
+ * the next record, so the changes made after CDC is enabled again do not get into it.
+ */
+ boolean shouldRollover(long idx) {
Review Comment:
**[Minor]** `linkSegment()` re-spells this predicate as `idx == disableSgmnt`. Reuse one method in both places (e.g. rename to `isDisableSegment(idx)`), so a future change to how the disable segment is tracked is made once.
--
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
Re: [PR] IGNITE-19661 In-memory CDC should not produce WAL records when disabled. [ignite]
Posted by "NSAmelchev (via GitHub)" <gi...@apache.org>.
NSAmelchev commented on code in PR #13649:
URL: https://github.com/apache/ignite/pull/13649#discussion_r4250349935
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/CdcLinkManager.java:
##########
@@ -0,0 +1,156 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.persistence.wal;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.util.Arrays;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.configuration.DataStorageConfiguration;
+import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
+import org.apache.ignite.internal.processors.cache.persistence.filename.NodeFileTree;
+import org.apache.ignite.internal.processors.configuration.distributed.DistributedBooleanProperty;
+import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.internal.util.typedef.internal.U;
+
+import static java.lang.String.format;
+import static org.apache.ignite.internal.processors.cache.persistence.wal.FileWriteAheadLogManager.CDC_DISABLED;
+import static org.apache.ignite.internal.processors.configuration.distributed.DistributedBooleanProperty.detachedBooleanProperty;
+import static org.apache.ignite.internal.util.io.GridFileUtils.ensureHardLinkAvailable;
+
+/**
+ * Links the archived WAL segments to the CDC directory. The links are not created while CDC is disabled by the
+ * {@link FileWriteAheadLogManager#CDC_DISABLED} distributed property. Data regions without persistence do not log the
+ * changes while CDC is disabled, so on the nodes with such regions the segment that is current at the disabling is never
+ * linked either: the CDC application fails on the missed segment after CDC is enabled again.
+ */
+class CdcLinkManager {
+ /** */
+ private final GridCacheSharedContext<?, ?> cctx;
+
+ /** */
+ private final IgniteLogger log;
+
+ /** */
+ private final NodeFileTree ft;
+
+ /** CDC disabled flag. */
+ private final DistributedBooleanProperty cdcDisabled = detachedBooleanProperty(CDC_DISABLED,
+ "CDC disabled flag. Disables CDC in the cluster to avoid disk overflow. " +
+ "Note that cache changes will be lost when CDC is disabled. Useful if the CDC application " +
+ "is down for a long time.");
+
+ /**
+ * Index of the segment that was current at the last CDC disabling. It is never linked, so the CDC application detects
+ * the missed changes as a gap in the segments even if no segment is archived while CDC is disabled. Persistent
+ * regions log the changes anyway, so the gap is made only on the nodes with in-memory CDC regions.
+ */
+ private volatile long disableSgmnt = -1;
+
+ /** */
+ CdcLinkManager(GridCacheSharedContext<?, ?> cctx) throws IgniteCheckedException {
+ this.cctx = cctx;
+
+ log = cctx.logger(CdcLinkManager.class);
+ ft = cctx.kernalContext().pdsFolderResolver().fileTree();
+
+ DataStorageConfiguration dsCfg = cctx.gridConfig().getDataStorageConfiguration();
+
+ // True on a node with persistence too, unlike FileWriteAheadLogManager#inMemoryCdc.
+ boolean inMemoryCdcRegion = F.exist(
+ F.concat(false, dsCfg.getDefaultDataRegionConfiguration(), F.asList(dsCfg.getDataRegionConfigurations())),
+ reg -> reg.isCdcEnabled() && !reg.isPersistenceEnabled());
+
+ U.ensureDirectory(ft.walCdc(), "change data capture directory", log);
+
+ ensureHardLinkAvailable(ft.walArchive().toPath(), ft.walCdc().toPath());
+
+ cctx.kernalContext().internalSubscriptionProcessor().registerDistributedConfigurationListener(dispatcher -> {
+ cdcDisabled.addListener((name, oldVal, newVal) -> {
+ if (log.isInfoEnabled())
+ log.info(format("Distributed property '%s' was changed from '%s' to '%s'.", name, oldVal, newVal));
+
+ if (newVal != null && newVal) {
+ log.warning("CDC was disabled.");
+
+ if (cctx.cdc() != null)
+ cctx.cdc().stop(true);
+
+ if (inMemoryCdcRegion)
+ markDisableSegment();
+ }
+ });
+
+ dispatcher.registerProperty(cdcDisabled);
+ });
+ }
+
+ /** */
+ private void markDisableSegment() {
Review Comment:
Fixed.
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupContext.java:
##########
@@ -980,7 +980,7 @@ public boolean persistenceEnabled() {
* @return {@code True} if {@link DataRecord} should be loged in the WAL.
*/
public boolean logDataRecords() {
- return walEnabled() && (persistenceEnabled || cdcEnabled());
+ return walEnabled() && (persistenceEnabled || (cdcEnabled() && !wal().cdcForceDisabled()));
Review Comment:
Fixed.
##########
modules/core/src/test/java/org/apache/ignite/cdc/CdcSelfTest.java:
##########
@@ -915,6 +951,12 @@ public void testCdcDirectoryMaxSize() throws Exception {
f.cancel();
}
+ /** */
+ private static List<Long> linkedSegments(NodeFileTree ft) {
+ return Arrays.stream(ft.walCdcSegments()).map(File::toPath).map(ft::walSegmentIndex).sorted()
Review Comment:
Fixed.
--
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
Re: [PR] IGNITE-19661 In-memory CDC should not produce WAL records when disabled. [ignite]
Posted by "NSAmelchev (via GitHub)" <gi...@apache.org>.
NSAmelchev commented on code in PR #13649:
URL: https://github.com/apache/ignite/pull/13649#discussion_r4256613693
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/CdcLinkManager.java:
##########
@@ -0,0 +1,175 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.persistence.wal;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.util.Arrays;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.configuration.DataStorageConfiguration;
+import org.apache.ignite.internal.pagemem.wal.IgniteWriteAheadLogManager;
+import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
+import org.apache.ignite.internal.processors.cache.persistence.filename.NodeFileTree;
+import org.apache.ignite.internal.processors.configuration.distributed.DistributedBooleanProperty;
+import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.internal.util.typedef.internal.U;
+
+import static java.lang.String.format;
+import static org.apache.ignite.internal.processors.cache.persistence.wal.FileWriteAheadLogManager.CDC_DISABLED;
+import static org.apache.ignite.internal.processors.configuration.distributed.DistributedBooleanProperty.detachedBooleanProperty;
+import static org.apache.ignite.internal.util.io.GridFileUtils.ensureHardLinkAvailable;
+
+/**
+ * Links the archived WAL segments to the CDC directory. The links are not created while CDC is disabled by the
+ * {@link FileWriteAheadLogManager#CDC_DISABLED} distributed property. Data regions without persistence do not log the
+ * changes while CDC is disabled, so on the nodes with such regions the segment that is current at the disabling is never
+ * linked either: the CDC application fails on the missed segment after CDC is enabled again.
+ */
+class CdcLinkManager {
+ /** */
+ private final GridCacheSharedContext<?, ?> cctx;
+
+ /** */
+ private final IgniteWriteAheadLogManager wal;
+
+ /** */
+ private final IgniteLogger log;
+
+ /** */
+ private final NodeFileTree ft;
+
+ /**
+ * {@code True} if a data region with CDC has no persistence.
+ * Unlike {@code FileWriteAheadLogManager#inMemoryCdc}, {@code true} on a node with persistence too.
+ */
+ private final boolean inMemoryCdcRegion;
+
+ /** CDC disabled flag. */
+ private final DistributedBooleanProperty cdcDisabled = detachedBooleanProperty(CDC_DISABLED,
+ "CDC disabled flag. Disables CDC in the cluster to avoid disk overflow. " +
+ "Note that cache changes will be lost when CDC is disabled. Useful if the CDC application " +
+ "is down for a long time.");
+
+ /**
+ * Index of the segment that was current at the last CDC disabling. It is never linked, so the CDC application detects
+ * the missed changes as a gap in the segments even if no segment is archived while CDC is disabled. Persistent
+ * regions log the changes anyway, so the gap is made only on the nodes with in-memory CDC regions.
+ */
+ private volatile long disableSgmnt = -1;
+
+ /** */
+ CdcLinkManager(GridCacheSharedContext<?, ?> cctx, IgniteWriteAheadLogManager wal) throws IgniteCheckedException {
+ this.cctx = cctx;
+ this.wal = wal;
+
+ log = cctx.logger(CdcLinkManager.class);
+ ft = cctx.kernalContext().pdsFolderResolver().fileTree();
+
+ DataStorageConfiguration dsCfg = cctx.gridConfig().getDataStorageConfiguration();
+
+ inMemoryCdcRegion = F.exist(
+ F.concat(false, dsCfg.getDefaultDataRegionConfiguration(), F.asList(dsCfg.getDataRegionConfigurations())),
+ reg -> reg.isCdcEnabled() && !reg.isPersistenceEnabled());
+
+ U.ensureDirectory(ft.walCdc(), "change data capture directory", log);
+
+ ensureHardLinkAvailable(ft.walArchive().toPath(), ft.walCdc().toPath());
+
+ cctx.kernalContext().internalSubscriptionProcessor().registerDistributedConfigurationListener(dispatcher -> {
+ cdcDisabled.addListener((name, oldVal, newVal) -> {
+ if (log.isInfoEnabled())
+ log.info(format("Distributed property '%s' was changed from '%s' to '%s'.", name, oldVal, newVal));
+
+ if (newVal != null && newVal) {
+ log.warning("CDC was disabled.");
+
+ if (cctx.cdc() != null)
+ cctx.cdc().stop(true);
+
+ if (inMemoryCdcRegion)
+ markDisableSegment();
+ }
+ });
+
+ dispatcher.registerProperty(cdcDisabled);
+ });
+ }
+
+ /**
+ * The property listener runs before the WAL logging is resumed on a persistent node restarted with CDC disabled, and
+ * the gap made at the disabling is not guaranteed: the segment can be archived after CDC is enabled again.
+ */
+ void resumeLogging() {
+ if (inMemoryCdcRegion && forceDisabled())
+ markDisableSegment();
+ }
+
+ /** */
+ private void markDisableSegment() {
+ // -1 before the WAL logging is resumed, see #resumeLogging.
+ disableSgmnt = Math.max(disableSgmnt, wal.currentSegment());
+ }
+
+ /** */
+ boolean forceDisabled() {
+ return cdcDisabled.getOrDefault(false);
+ }
+
+ /**
+ * The segment that was current at the CDC disabling is never linked, the changes in it are lost. It is closed before
+ * the next record, so the changes made after CDC is enabled again do not get into it.
+ */
+ boolean shouldRollover(long idx) {
+ return idx == disableSgmnt;
+ }
+
+ /** */
+ void linkSegment(long idx, File segment) throws IOException {
+ if (forceDisabled())
+ log.warning("Creation of segment CDC link skipped. '" + CDC_DISABLED + "' distributed property is 'true'.");
+ else if (idx == disableSgmnt)
Review Comment:
Kept. On master the segment is delivered only if it happens to be archived after CDC is re-enabled; during a real maintenance window the persistent region keeps logging, the segment is archived while CDC is still disabled and master skips it too. The difference exists only for a toggle shorter than the life of one segment. The loss is bounded to one segment and documented, and on a node with an in-memory CDC region a resend is required after any manual disabling anyway, since in-memory changes made meanwhile are not logged; the same resend restores the tail. The exact boundary without any loss is the follow-up with a CDC disable record.
--
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
Re: [PR] IGNITE-19661 In-memory CDC should not produce WAL records when disabled. [ignite]
Posted by "NSAmelchev (via GitHub)" <gi...@apache.org>.
NSAmelchev commented on code in PR #13649:
URL: https://github.com/apache/ignite/pull/13649#discussion_r4256625546
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/CdcLinkManager.java:
##########
@@ -0,0 +1,175 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.persistence.wal;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.util.Arrays;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.configuration.DataStorageConfiguration;
+import org.apache.ignite.internal.pagemem.wal.IgniteWriteAheadLogManager;
+import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
+import org.apache.ignite.internal.processors.cache.persistence.filename.NodeFileTree;
+import org.apache.ignite.internal.processors.configuration.distributed.DistributedBooleanProperty;
+import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.internal.util.typedef.internal.U;
+
+import static java.lang.String.format;
+import static org.apache.ignite.internal.processors.cache.persistence.wal.FileWriteAheadLogManager.CDC_DISABLED;
+import static org.apache.ignite.internal.processors.configuration.distributed.DistributedBooleanProperty.detachedBooleanProperty;
+import static org.apache.ignite.internal.util.io.GridFileUtils.ensureHardLinkAvailable;
+
+/**
+ * Links the archived WAL segments to the CDC directory. The links are not created while CDC is disabled by the
+ * {@link FileWriteAheadLogManager#CDC_DISABLED} distributed property. Data regions without persistence do not log the
+ * changes while CDC is disabled, so on the nodes with such regions the segment that is current at the disabling is never
+ * linked either: the CDC application fails on the missed segment after CDC is enabled again.
+ */
+class CdcLinkManager {
+ /** */
+ private final GridCacheSharedContext<?, ?> cctx;
+
+ /** */
+ private final IgniteWriteAheadLogManager wal;
+
+ /** */
+ private final IgniteLogger log;
+
+ /** */
+ private final NodeFileTree ft;
+
+ /**
+ * {@code True} if a data region with CDC has no persistence.
+ * Unlike {@code FileWriteAheadLogManager#inMemoryCdc}, {@code true} on a node with persistence too.
+ */
+ private final boolean inMemoryCdcRegion;
+
+ /** CDC disabled flag. */
+ private final DistributedBooleanProperty cdcDisabled = detachedBooleanProperty(CDC_DISABLED,
+ "CDC disabled flag. Disables CDC in the cluster to avoid disk overflow. " +
+ "Note that cache changes will be lost when CDC is disabled. Useful if the CDC application " +
+ "is down for a long time.");
+
+ /**
+ * Index of the segment that was current at the last CDC disabling. It is never linked, so the CDC application detects
+ * the missed changes as a gap in the segments even if no segment is archived while CDC is disabled. Persistent
+ * regions log the changes anyway, so the gap is made only on the nodes with in-memory CDC regions.
+ */
+ private volatile long disableSgmnt = -1;
+
+ /** */
+ CdcLinkManager(GridCacheSharedContext<?, ?> cctx, IgniteWriteAheadLogManager wal) throws IgniteCheckedException {
+ this.cctx = cctx;
+ this.wal = wal;
+
+ log = cctx.logger(CdcLinkManager.class);
+ ft = cctx.kernalContext().pdsFolderResolver().fileTree();
+
+ DataStorageConfiguration dsCfg = cctx.gridConfig().getDataStorageConfiguration();
+
+ inMemoryCdcRegion = F.exist(
+ F.concat(false, dsCfg.getDefaultDataRegionConfiguration(), F.asList(dsCfg.getDataRegionConfigurations())),
+ reg -> reg.isCdcEnabled() && !reg.isPersistenceEnabled());
+
+ U.ensureDirectory(ft.walCdc(), "change data capture directory", log);
+
+ ensureHardLinkAvailable(ft.walArchive().toPath(), ft.walCdc().toPath());
+
+ cctx.kernalContext().internalSubscriptionProcessor().registerDistributedConfigurationListener(dispatcher -> {
+ cdcDisabled.addListener((name, oldVal, newVal) -> {
+ if (log.isInfoEnabled())
+ log.info(format("Distributed property '%s' was changed from '%s' to '%s'.", name, oldVal, newVal));
+
+ if (newVal != null && newVal) {
+ log.warning("CDC was disabled.");
+
+ if (cctx.cdc() != null)
+ cctx.cdc().stop(true);
+
+ if (inMemoryCdcRegion)
+ markDisableSegment();
Review Comment:
Done, added to the docs.
--
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
Re: [PR] IGNITE-19661 In-memory CDC should not produce WAL records when disabled. [ignite]
Posted by "nizhikov (via GitHub)" <gi...@apache.org>.
nizhikov commented on code in PR #13649:
URL: https://github.com/apache/ignite/pull/13649#discussion_r4248620547
##########
modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/IgniteWriteAheadLogManager.java:
##########
@@ -44,6 +44,11 @@ public interface IgniteWriteAheadLogManager extends GridCacheSharedManager, Igni
*/
public boolean isFullSync();
+ /**
+ * @return {@code True} if CDC is disabled by the {@code cdc.disabled} distributed property.
+ */
+ public boolean cdcForceDisabled();
Review Comment:
**[Should fix]** A new abstract method on a plugin-facing interface. `GridCacheProcessor` obtains the WAL manager via `ctx.plugins().createComponent(IgniteWriteAheadLogManager.class)`, so any plugin implementation that does not extend `FileWriteAheadLogManager` stops compiling.
`default boolean cdcForceDisabled() { return false; }` keeps compatibility and also removes the `NoOpWALManager` edit.
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/CdcLinkManager.java:
##########
@@ -0,0 +1,156 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.persistence.wal;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.util.Arrays;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.configuration.DataStorageConfiguration;
+import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
+import org.apache.ignite.internal.processors.cache.persistence.filename.NodeFileTree;
+import org.apache.ignite.internal.processors.configuration.distributed.DistributedBooleanProperty;
+import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.internal.util.typedef.internal.U;
+
+import static java.lang.String.format;
+import static org.apache.ignite.internal.processors.cache.persistence.wal.FileWriteAheadLogManager.CDC_DISABLED;
+import static org.apache.ignite.internal.processors.configuration.distributed.DistributedBooleanProperty.detachedBooleanProperty;
+import static org.apache.ignite.internal.util.io.GridFileUtils.ensureHardLinkAvailable;
+
+/**
+ * Links the archived WAL segments to the CDC directory. The links are not created while CDC is disabled by the
+ * {@link FileWriteAheadLogManager#CDC_DISABLED} distributed property. Data regions without persistence do not log the
+ * changes while CDC is disabled, so on the nodes with such regions the segment that is current at the disabling is never
+ * linked either: the CDC application fails on the missed segment after CDC is enabled again.
+ */
+class CdcLinkManager {
+ /** */
+ private final GridCacheSharedContext<?, ?> cctx;
+
+ /** */
+ private final IgniteLogger log;
+
+ /** */
+ private final NodeFileTree ft;
+
+ /** CDC disabled flag. */
+ private final DistributedBooleanProperty cdcDisabled = detachedBooleanProperty(CDC_DISABLED,
+ "CDC disabled flag. Disables CDC in the cluster to avoid disk overflow. " +
+ "Note that cache changes will be lost when CDC is disabled. Useful if the CDC application " +
+ "is down for a long time.");
+
+ /**
+ * Index of the segment that was current at the last CDC disabling. It is never linked, so the CDC application detects
+ * the missed changes as a gap in the segments even if no segment is archived while CDC is disabled. Persistent
+ * regions log the changes anyway, so the gap is made only on the nodes with in-memory CDC regions.
+ */
+ private volatile long disableSgmnt = -1;
+
+ /** */
+ CdcLinkManager(GridCacheSharedContext<?, ?> cctx) throws IgniteCheckedException {
+ this.cctx = cctx;
+
+ log = cctx.logger(CdcLinkManager.class);
+ ft = cctx.kernalContext().pdsFolderResolver().fileTree();
+
+ DataStorageConfiguration dsCfg = cctx.gridConfig().getDataStorageConfiguration();
+
+ // True on a node with persistence too, unlike FileWriteAheadLogManager#inMemoryCdc.
+ boolean inMemoryCdcRegion = F.exist(
+ F.concat(false, dsCfg.getDefaultDataRegionConfiguration(), F.asList(dsCfg.getDataRegionConfigurations())),
+ reg -> reg.isCdcEnabled() && !reg.isPersistenceEnabled());
+
+ U.ensureDirectory(ft.walCdc(), "change data capture directory", log);
+
+ ensureHardLinkAvailable(ft.walArchive().toPath(), ft.walCdc().toPath());
+
+ cctx.kernalContext().internalSubscriptionProcessor().registerDistributedConfigurationListener(dispatcher -> {
+ cdcDisabled.addListener((name, oldVal, newVal) -> {
+ if (log.isInfoEnabled())
+ log.info(format("Distributed property '%s' was changed from '%s' to '%s'.", name, oldVal, newVal));
+
+ if (newVal != null && newVal) {
+ log.warning("CDC was disabled.");
+
+ if (cctx.cdc() != null)
+ cctx.cdc().stop(true);
+
+ if (inMemoryCdcRegion)
+ markDisableSegment();
+ }
+ });
+
+ dispatcher.registerProperty(cdcDisabled);
+ });
+ }
+
+ /** */
+ private void markDisableSegment() {
+ // -1 if the WAL logging is not resumed yet: the node is restarted with CDC disabled, the gap is already made.
+ disableSgmnt = Math.max(disableSgmnt, cctx.wal(true).currentSegment());
+ }
+
+ /** */
+ boolean forceDisabled() {
+ return cdcDisabled.getOrDefault(false);
+ }
+
+ /**
+ * The segment that was current at the CDC disabling is never linked, the changes in it are lost. It is closed before
+ * the next record, so the changes made after CDC is enabled again do not get into it.
+ */
+ boolean shouldRollover(long idx) {
+ return idx == disableSgmnt;
+ }
+
+ /** */
+ void linkSegment(long idx, File segment) throws IOException {
+ if (forceDisabled())
+ log.warning("Creation of segment CDC link skipped. '" + CDC_DISABLED + "' distributed property is 'true'.");
+ else if (idx <= disableSgmnt)
Review Comment:
**[Blocker]** `idx <= disableSgmnt` also drops segments *older* than the disable segment that were still waiting in the WAL work dir for the archiver, even though they hold changes made while CDC was enabled. Example: archiver lags, N-3..N-1 are not archived yet, CDC is disabled at N and quickly re-enabled. The old code linked N-3..N-1 once archived; this code refuses them with "was not archived before CDC was disabled". Up to `walSegments - 1` segments of pre-disable data are lost beyond the one documented skipped segment.
Only `idx == disableSgmnt` is needed for the gap; `forceDisabled()` above already covers the still-disabled case.
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/CdcLinkManager.java:
##########
@@ -0,0 +1,156 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.persistence.wal;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.util.Arrays;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.configuration.DataStorageConfiguration;
+import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
+import org.apache.ignite.internal.processors.cache.persistence.filename.NodeFileTree;
+import org.apache.ignite.internal.processors.configuration.distributed.DistributedBooleanProperty;
+import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.internal.util.typedef.internal.U;
+
+import static java.lang.String.format;
+import static org.apache.ignite.internal.processors.cache.persistence.wal.FileWriteAheadLogManager.CDC_DISABLED;
+import static org.apache.ignite.internal.processors.configuration.distributed.DistributedBooleanProperty.detachedBooleanProperty;
+import static org.apache.ignite.internal.util.io.GridFileUtils.ensureHardLinkAvailable;
+
+/**
+ * Links the archived WAL segments to the CDC directory. The links are not created while CDC is disabled by the
+ * {@link FileWriteAheadLogManager#CDC_DISABLED} distributed property. Data regions without persistence do not log the
+ * changes while CDC is disabled, so on the nodes with such regions the segment that is current at the disabling is never
+ * linked either: the CDC application fails on the missed segment after CDC is enabled again.
+ */
+class CdcLinkManager {
+ /** */
+ private final GridCacheSharedContext<?, ?> cctx;
+
+ /** */
+ private final IgniteLogger log;
+
+ /** */
+ private final NodeFileTree ft;
+
+ /** CDC disabled flag. */
+ private final DistributedBooleanProperty cdcDisabled = detachedBooleanProperty(CDC_DISABLED,
+ "CDC disabled flag. Disables CDC in the cluster to avoid disk overflow. " +
+ "Note that cache changes will be lost when CDC is disabled. Useful if the CDC application " +
+ "is down for a long time.");
+
+ /**
+ * Index of the segment that was current at the last CDC disabling. It is never linked, so the CDC application detects
+ * the missed changes as a gap in the segments even if no segment is archived while CDC is disabled. Persistent
+ * regions log the changes anyway, so the gap is made only on the nodes with in-memory CDC regions.
+ */
+ private volatile long disableSgmnt = -1;
+
+ /** */
+ CdcLinkManager(GridCacheSharedContext<?, ?> cctx) throws IgniteCheckedException {
+ this.cctx = cctx;
+
+ log = cctx.logger(CdcLinkManager.class);
+ ft = cctx.kernalContext().pdsFolderResolver().fileTree();
+
+ DataStorageConfiguration dsCfg = cctx.gridConfig().getDataStorageConfiguration();
+
+ // True on a node with persistence too, unlike FileWriteAheadLogManager#inMemoryCdc.
+ boolean inMemoryCdcRegion = F.exist(
+ F.concat(false, dsCfg.getDefaultDataRegionConfiguration(), F.asList(dsCfg.getDataRegionConfigurations())),
+ reg -> reg.isCdcEnabled() && !reg.isPersistenceEnabled());
+
+ U.ensureDirectory(ft.walCdc(), "change data capture directory", log);
+
+ ensureHardLinkAvailable(ft.walArchive().toPath(), ft.walCdc().toPath());
+
+ cctx.kernalContext().internalSubscriptionProcessor().registerDistributedConfigurationListener(dispatcher -> {
+ cdcDisabled.addListener((name, oldVal, newVal) -> {
+ if (log.isInfoEnabled())
+ log.info(format("Distributed property '%s' was changed from '%s' to '%s'.", name, oldVal, newVal));
+
+ if (newVal != null && newVal) {
+ log.warning("CDC was disabled.");
+
+ if (cctx.cdc() != null)
+ cctx.cdc().stop(true);
+
+ if (inMemoryCdcRegion)
+ markDisableSegment();
+ }
+ });
+
+ dispatcher.registerProperty(cdcDisabled);
+ });
+ }
+
+ /** */
+ private void markDisableSegment() {
+ // -1 if the WAL logging is not resumed yet: the node is restarted with CDC disabled, the gap is already made.
+ disableSgmnt = Math.max(disableSgmnt, cctx.wal(true).currentSegment());
Review Comment:
**[Blocker]** `markDisableSegment()` is called from the property listener, which fires at node start (`onReadyForRead`) before logging is resumed, so `currentSegment()` returns `-1` and nothing is marked. The comment says "the gap is already made", but that does not hold for an in-memory-only node: CDC disabled at segment N, nothing is logged afterwards, node restarted. `resumeLogging` continues in N, `disableSgmnt` stays `-1`, CDC is re-enabled, records go into N, and N is archived and linked right after N-1. The consumer sees consecutive segments and every change made while disabled is silently lost. Same for a persistent node with an in-memory CDC region that restarts or joins while the property is already `true`.
Suggest re-running `markDisableSegment()` from `resumeLogging` (or after `restoreWriteHandle`) when `forceDisabled() && inMemoryCdcRegion`.
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupContext.java:
##########
@@ -980,7 +980,7 @@ public boolean persistenceEnabled() {
* @return {@code True} if {@link DataRecord} should be loged in the WAL.
*/
public boolean logDataRecords() {
- return walEnabled() && (persistenceEnabled || cdcEnabled());
+ return walEnabled() && (persistenceEnabled || (cdcEnabled() && !wal().cdcForceDisabled()));
Review Comment:
**[Minor]** `wal()` is `ctx.wal(cdcEnabled())`, so `dataRegion.config().isCdcEnabled()` is now evaluated twice on this per-entry path. The branch is only reached when `cdcEnabled()` is already `true`, so `ctx.wal(true).cdcForceDisabled()` is enough.
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java:
##########
@@ -885,6 +861,12 @@ private boolean checkTimeout(AtomicLong lastEvt, long timeout) {
if (currWrHandle == null || (isDisable != null && isDisable.check()))
return null;
+ if (cdcLinkMgr != null && cdcLinkMgr.shouldRollover(currWrHandle.getSegmentId())) {
Review Comment:
**[Should fix]** This adds a volatile read and a branch to every `log()` call on every CDC-configured node, including persistent nodes where CDC is never disabled. The gap also only materialises when a later record arrives: on an in-memory-only node nothing is logged while CDC is disabled, so the disable segment stays open until CDC is re-enabled and something is written, and the archive / CDC dir does not reflect the disable until then.
Rolling the disable segment over asynchronously from the listener (the same way `TimeoutRollover` / `closeBufAndRollover` do it) keeps `log()` untouched and makes the gap independent of future writes.
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/CdcLinkManager.java:
##########
@@ -0,0 +1,156 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.processors.cache.persistence.wal;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.util.Arrays;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.configuration.DataStorageConfiguration;
+import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
+import org.apache.ignite.internal.processors.cache.persistence.filename.NodeFileTree;
+import org.apache.ignite.internal.processors.configuration.distributed.DistributedBooleanProperty;
+import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.internal.util.typedef.internal.U;
+
+import static java.lang.String.format;
+import static org.apache.ignite.internal.processors.cache.persistence.wal.FileWriteAheadLogManager.CDC_DISABLED;
+import static org.apache.ignite.internal.processors.configuration.distributed.DistributedBooleanProperty.detachedBooleanProperty;
+import static org.apache.ignite.internal.util.io.GridFileUtils.ensureHardLinkAvailable;
+
+/**
+ * Links the archived WAL segments to the CDC directory. The links are not created while CDC is disabled by the
+ * {@link FileWriteAheadLogManager#CDC_DISABLED} distributed property. Data regions without persistence do not log the
+ * changes while CDC is disabled, so on the nodes with such regions the segment that is current at the disabling is never
+ * linked either: the CDC application fails on the missed segment after CDC is enabled again.
+ */
+class CdcLinkManager {
+ /** */
+ private final GridCacheSharedContext<?, ?> cctx;
+
+ /** */
+ private final IgniteLogger log;
+
+ /** */
+ private final NodeFileTree ft;
+
+ /** CDC disabled flag. */
+ private final DistributedBooleanProperty cdcDisabled = detachedBooleanProperty(CDC_DISABLED,
+ "CDC disabled flag. Disables CDC in the cluster to avoid disk overflow. " +
+ "Note that cache changes will be lost when CDC is disabled. Useful if the CDC application " +
+ "is down for a long time.");
+
+ /**
+ * Index of the segment that was current at the last CDC disabling. It is never linked, so the CDC application detects
+ * the missed changes as a gap in the segments even if no segment is archived while CDC is disabled. Persistent
+ * regions log the changes anyway, so the gap is made only on the nodes with in-memory CDC regions.
+ */
+ private volatile long disableSgmnt = -1;
+
+ /** */
+ CdcLinkManager(GridCacheSharedContext<?, ?> cctx) throws IgniteCheckedException {
+ this.cctx = cctx;
+
+ log = cctx.logger(CdcLinkManager.class);
+ ft = cctx.kernalContext().pdsFolderResolver().fileTree();
+
+ DataStorageConfiguration dsCfg = cctx.gridConfig().getDataStorageConfiguration();
+
+ // True on a node with persistence too, unlike FileWriteAheadLogManager#inMemoryCdc.
+ boolean inMemoryCdcRegion = F.exist(
+ F.concat(false, dsCfg.getDefaultDataRegionConfiguration(), F.asList(dsCfg.getDataRegionConfigurations())),
+ reg -> reg.isCdcEnabled() && !reg.isPersistenceEnabled());
+
+ U.ensureDirectory(ft.walCdc(), "change data capture directory", log);
+
+ ensureHardLinkAvailable(ft.walArchive().toPath(), ft.walCdc().toPath());
+
+ cctx.kernalContext().internalSubscriptionProcessor().registerDistributedConfigurationListener(dispatcher -> {
+ cdcDisabled.addListener((name, oldVal, newVal) -> {
+ if (log.isInfoEnabled())
+ log.info(format("Distributed property '%s' was changed from '%s' to '%s'.", name, oldVal, newVal));
+
+ if (newVal != null && newVal) {
+ log.warning("CDC was disabled.");
+
+ if (cctx.cdc() != null)
+ cctx.cdc().stop(true);
+
+ if (inMemoryCdcRegion)
+ markDisableSegment();
+ }
+ });
+
+ dispatcher.registerProperty(cdcDisabled);
+ });
+ }
+
+ /** */
+ private void markDisableSegment() {
Review Comment:
**[Minor]** `CdcLinkManager` is created by `FileWriteAheadLogManager` but reaches back to its owner through `cctx.wal(true)` (with its assert) just to read `currentSegment()`. Correctness here depends on `cctx.wal(true)` resolving to the same instance that owns this manager. Passing the owning manager or a `LongSupplier` for the current segment into the constructor removes the hidden dependency and makes it testable.
##########
modules/core/src/test/java/org/apache/ignite/cdc/CdcSelfTest.java:
##########
@@ -915,6 +951,12 @@ public void testCdcDirectoryMaxSize() throws Exception {
f.cancel();
}
+ /** */
+ private static List<Long> linkedSegments(NodeFileTree ft) {
+ return Arrays.stream(ft.walCdcSegments()).map(File::toPath).map(ft::walSegmentIndex).sorted()
Review Comment:
**[Minor]** This "linked CDC segment indices" computation is now copy-pasted in three test classes (`CdcSelfTest.linkedSegments`, `WalForCdcTest`, `CdcCommandTest.checkLinks`) with small variations (sorted vs unsorted, `List` vs stream). One helper on `NodeFileTree` (e.g. `walCdcSegmentIndexes()`) or in `AbstractCdcTest` would cover all three.
--
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
Re: [PR] IGNITE-19661 In-memory CDC should not produce WAL records when disabled. [ignite]
Posted by "NSAmelchev (via GitHub)" <gi...@apache.org>.
NSAmelchev commented on code in PR #13649:
URL: https://github.com/apache/ignite/pull/13649#discussion_r4256775329
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/FileWriteAheadLogManager.java:
##########
@@ -885,6 +864,12 @@ private boolean checkTimeout(AtomicLong lastEvt, long timeout) {
if (currWrHandle == null || (isDisable != null && isDisable.check()))
return null;
+ if (cdcLinkMgr != null && cdcLinkMgr.shouldRollover(currWrHandle.getSegmentId())) {
Review Comment:
Kept: no record is logged with NEXT_SEGMENT in core, and an extra empty linked segment would be harmless.
--
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
Re: [PR] IGNITE-19661 In-memory CDC should not produce WAL records when disabled. [ignite]
Posted by "NSAmelchev (via GitHub)" <gi...@apache.org>.
NSAmelchev commented on code in PR #13649:
URL: https://github.com/apache/ignite/pull/13649#discussion_r4256787775
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupContext.java:
##########
@@ -980,7 +980,7 @@ public boolean persistenceEnabled() {
* @return {@code True} if {@link DataRecord} should be loged in the WAL.
*/
public boolean logDataRecords() {
- return walEnabled() && (persistenceEnabled || cdcEnabled());
+ return walEnabled() && (persistenceEnabled || (cdcEnabled() && !ctx.wal(true).cdcForceDisabled()));
Review Comment:
F. Kept: getOrDefault is a volatile read without allocation and the assert is off in production; a flag on the context would duplicate the property state.
--
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