You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "skorotkov (via GitHub)" <gi...@apache.org> on 2024/12/04 06:03:33 UTC

[PR] IGNITE-23815 Fix assertion during RotatedIdPartRecord read from WAL [ignite]

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

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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

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


Re: [PR] IGNITE-23815 Fix assertion during RotatedIdPartRecord read from WAL [ignite]

Posted by "ivandasch (via GitHub)" <gi...@apache.org>.
ivandasch commented on code in PR #11695:
URL: https://github.com/apache/ignite/pull/11695#discussion_r1872732534


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/serializer/RecordDataV1Serializer.java:
##########
@@ -1177,7 +1177,7 @@ WALRecord readPlainRecord(RecordType type, ByteBufferBackedDataInput in,
 
                 byte rotatedIdPart = in.readByte();
 
-                res = new RotatedIdPartRecord(cacheId, pageId, rotatedIdPart);
+                res = new RotatedIdPartRecord(cacheId, pageId, ((int)rotatedIdPart) & 0xFF);

Review Comment:
   Byte#toUnsignedInt



-- 
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-23815 Fix assertion during RotatedIdPartRecord read from WAL [ignite]

Posted by "ivandasch (via GitHub)" <gi...@apache.org>.
ivandasch commented on code in PR #11695:
URL: https://github.com/apache/ignite/pull/11695#discussion_r1872732534


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/serializer/RecordDataV1Serializer.java:
##########
@@ -1177,7 +1177,7 @@ WALRecord readPlainRecord(RecordType type, ByteBufferBackedDataInput in,
 
                 byte rotatedIdPart = in.readByte();
 
-                res = new RotatedIdPartRecord(cacheId, pageId, rotatedIdPart);
+                res = new RotatedIdPartRecord(cacheId, pageId, ((int)rotatedIdPart) & 0xFF);

Review Comment:
   May be consider `Byte#toUnsignedInt`?



-- 
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-23815 Fix assertion during RotatedIdPartRecord read from WAL [ignite]

Posted by "skorotkov (via GitHub)" <gi...@apache.org>.
skorotkov commented on code in PR #11695:
URL: https://github.com/apache/ignite/pull/11695#discussion_r1872912072


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/serializer/RecordDataV1Serializer.java:
##########
@@ -1177,7 +1177,7 @@ WALRecord readPlainRecord(RecordType type, ByteBufferBackedDataInput in,
 
                 byte rotatedIdPart = in.readByte();
 
-                res = new RotatedIdPartRecord(cacheId, pageId, rotatedIdPart);
+                res = new RotatedIdPartRecord(cacheId, pageId, ((int)rotatedIdPart) & 0xFF);

Review Comment:
   Yes, 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-23815 Fix assertion during RotatedIdPartRecord read from WAL [ignite]

Posted by "alex-plekhanov (via GitHub)" <gi...@apache.org>.
alex-plekhanov commented on code in PR #11695:
URL: https://github.com/apache/ignite/pull/11695#discussion_r1875525405


##########
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/WalRotatedIdPartRecordTest.java:
##########
@@ -0,0 +1,184 @@
+/*
+ * 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.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+import javax.cache.expiry.Duration;
+import javax.cache.expiry.TouchedExpiryPolicy;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.cache.CacheAtomicityMode;
+import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
+import org.apache.ignite.cache.query.ScanQuery;
+import org.apache.ignite.cluster.ClusterState;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.DataRegionConfiguration;
+import org.apache.ignite.configuration.DataStorageConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.GridKernalContext;
+import org.apache.ignite.internal.IgniteEx;
+import org.apache.ignite.internal.IgniteInternalFuture;
+import org.apache.ignite.internal.pagemem.wal.IgniteWriteAheadLogManager;
+import org.apache.ignite.internal.pagemem.wal.record.WALRecord;
+import org.apache.ignite.internal.pagemem.wal.record.delta.RotatedIdPartRecord;
+import org.apache.ignite.internal.processors.cache.GridCacheMapEntry;
+import org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager;
+import org.apache.ignite.plugin.AbstractTestPluginProvider;
+import org.apache.ignite.plugin.PluginContext;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.core.config.Configurator;
+import org.jetbrains.annotations.Nullable;
+import org.junit.Test;
+
+import static org.apache.ignite.testframework.GridTestUtils.runAsync;
+
+/** */
+public class WalRotatedIdPartRecordTest extends GridCommonAbstractTest {
+    /** */
+    private static final int KEYS = 1000;
+
+    /** */
+    AtomicBoolean stop = new AtomicBoolean();
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
+        IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
+
+        if (!cfg.isClientMode()) {
+            cfg.setDataStorageConfiguration(new DataStorageConfiguration()
+                    .setDefaultDataRegionConfiguration(new DataRegionConfiguration()
+                        .setPersistenceEnabled(true)))
+                .setCacheConfiguration(new CacheConfiguration<>(DEFAULT_CACHE_NAME)
+                    .setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL)
+                    .setBackups(1)
+                    .setAffinity(new RendezvousAffinityFunction().setPartitions(2))
+                    .setExpiryPolicyFactory(TouchedExpiryPolicy.factoryOf(new Duration(TimeUnit.MINUTES, 60))));
+
+            // Plugin that creates a testing WAL manager.
+            cfg.setPluginProviders(new AbstractTestPluginProvider() {
+                /** {@inheritDoc} */
+                @Override public String name() {
+                    return "testPlugin";
+                }
+
+                /** {@inheritDoc} */
+                @Override public <T> @Nullable T createComponent(PluginContext ctx, Class<T> cls) {
+                    if (IgniteWriteAheadLogManager.class.equals(cls))
+                        return (T)new TestFileWriteAheadLogManager(((IgniteEx)ctx.grid()).context(), stop);
+
+                    return null;
+                }
+            });
+
+            cfg.setMetricsLogFrequency(1000);

Review Comment:
   Why do we need to change metrics log freq?



##########
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/WalRotatedIdPartRecordTest.java:
##########
@@ -0,0 +1,184 @@
+/*
+ * 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.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+import javax.cache.expiry.Duration;
+import javax.cache.expiry.TouchedExpiryPolicy;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.cache.CacheAtomicityMode;
+import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
+import org.apache.ignite.cache.query.ScanQuery;
+import org.apache.ignite.cluster.ClusterState;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.DataRegionConfiguration;
+import org.apache.ignite.configuration.DataStorageConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.GridKernalContext;
+import org.apache.ignite.internal.IgniteEx;
+import org.apache.ignite.internal.IgniteInternalFuture;
+import org.apache.ignite.internal.pagemem.wal.IgniteWriteAheadLogManager;
+import org.apache.ignite.internal.pagemem.wal.record.WALRecord;
+import org.apache.ignite.internal.pagemem.wal.record.delta.RotatedIdPartRecord;
+import org.apache.ignite.internal.processors.cache.GridCacheMapEntry;
+import org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager;
+import org.apache.ignite.plugin.AbstractTestPluginProvider;
+import org.apache.ignite.plugin.PluginContext;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.core.config.Configurator;
+import org.jetbrains.annotations.Nullable;
+import org.junit.Test;
+
+import static org.apache.ignite.testframework.GridTestUtils.runAsync;
+
+/** */
+public class WalRotatedIdPartRecordTest extends GridCommonAbstractTest {
+    /** */
+    private static final int KEYS = 1000;
+
+    /** */
+    AtomicBoolean stop = new AtomicBoolean();
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
+        IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
+
+        if (!cfg.isClientMode()) {
+            cfg.setDataStorageConfiguration(new DataStorageConfiguration()
+                    .setDefaultDataRegionConfiguration(new DataRegionConfiguration()
+                        .setPersistenceEnabled(true)))
+                .setCacheConfiguration(new CacheConfiguration<>(DEFAULT_CACHE_NAME)
+                    .setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL)
+                    .setBackups(1)
+                    .setAffinity(new RendezvousAffinityFunction().setPartitions(2))
+                    .setExpiryPolicyFactory(TouchedExpiryPolicy.factoryOf(new Duration(TimeUnit.MINUTES, 60))));
+
+            // Plugin that creates a testing WAL manager.
+            cfg.setPluginProviders(new AbstractTestPluginProvider() {
+                /** {@inheritDoc} */
+                @Override public String name() {
+                    return "testPlugin";
+                }
+
+                /** {@inheritDoc} */
+                @Override public <T> @Nullable T createComponent(PluginContext ctx, Class<T> cls) {
+                    if (IgniteWriteAheadLogManager.class.equals(cls))
+                        return (T)new TestFileWriteAheadLogManager(((IgniteEx)ctx.grid()).context(), stop);
+
+                    return null;
+                }
+            });
+
+            cfg.setMetricsLogFrequency(1000);
+        }
+
+        return cfg;
+    }
+
+    /** WAL manager that signals once meet the RotatedIdPartRecord with rotatedIdPart more than 127. */
+    private static class TestFileWriteAheadLogManager extends FileWriteAheadLogManager {
+        /** */
+        private final AtomicBoolean stop;
+
+        /** Constructor. */
+        public TestFileWriteAheadLogManager(GridKernalContext ctx, AtomicBoolean stop) {
+            super(ctx);
+
+            this.stop = stop;
+        }
+
+        /** {@inheritDoc} */
+        @Override public WALPointer log(WALRecord rec) throws IgniteCheckedException {
+            WALPointer res = super.log(rec);
+
+            if (rec instanceof RotatedIdPartRecord) {
+                byte rotatedIdPart = ((RotatedIdPartRecord)rec).rotatedIdPart();
+
+                if (Byte.toUnsignedInt(rotatedIdPart) > 127)
+                    stop.set(true);
+            }
+
+            return res;
+        }
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void beforeTest() throws Exception {
+        super.beforeTest();
+
+        cleanPersistenceDir();
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void afterTest() throws Exception {
+        super.afterTest();
+
+        stopAllGrids();
+
+        cleanPersistenceDir();
+    }
+
+    /** */
+    @Test
+    public void testRotatedIdMoreThan127() throws Exception {
+        startGrids(2).cluster().state(ClusterState.ACTIVE);
+
+        IgniteEx cln = startClientGrid(2);
+
+        for (int i = 0; i < KEYS; i++)
+            cln.cache(DEFAULT_CACHE_NAME).put(i, i);
+
+        forceCheckpoint();
+
+        disableCheckpoints(grid(0));
+        disableCheckpoints(grid(1));
+
+        IgniteInternalFuture<?> touchFut = runAsync(() -> {
+            while (!stop.get())
+                cln.cache(DEFAULT_CACHE_NAME).query(new ScanQuery<>()).forEach((v) -> {});
+        }, "touch");
+
+        try {
+            touchFut.get(120, TimeUnit.SECONDS);

Review Comment:
   Perhaps getTestTimeout() milliseconds?



##########
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/WalRotatedIdPartRecordTest.java:
##########
@@ -0,0 +1,184 @@
+/*
+ * 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.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+import javax.cache.expiry.Duration;
+import javax.cache.expiry.TouchedExpiryPolicy;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.cache.CacheAtomicityMode;
+import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
+import org.apache.ignite.cache.query.ScanQuery;
+import org.apache.ignite.cluster.ClusterState;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.DataRegionConfiguration;
+import org.apache.ignite.configuration.DataStorageConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.GridKernalContext;
+import org.apache.ignite.internal.IgniteEx;
+import org.apache.ignite.internal.IgniteInternalFuture;
+import org.apache.ignite.internal.pagemem.wal.IgniteWriteAheadLogManager;
+import org.apache.ignite.internal.pagemem.wal.record.WALRecord;
+import org.apache.ignite.internal.pagemem.wal.record.delta.RotatedIdPartRecord;
+import org.apache.ignite.internal.processors.cache.GridCacheMapEntry;
+import org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager;
+import org.apache.ignite.plugin.AbstractTestPluginProvider;
+import org.apache.ignite.plugin.PluginContext;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.core.config.Configurator;
+import org.jetbrains.annotations.Nullable;
+import org.junit.Test;
+
+import static org.apache.ignite.testframework.GridTestUtils.runAsync;
+
+/** */
+public class WalRotatedIdPartRecordTest extends GridCommonAbstractTest {
+    /** */
+    private static final int KEYS = 1000;
+
+    /** */
+    AtomicBoolean stop = new AtomicBoolean();
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
+        IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
+
+        if (!cfg.isClientMode()) {
+            cfg.setDataStorageConfiguration(new DataStorageConfiguration()
+                    .setDefaultDataRegionConfiguration(new DataRegionConfiguration()
+                        .setPersistenceEnabled(true)))
+                .setCacheConfiguration(new CacheConfiguration<>(DEFAULT_CACHE_NAME)
+                    .setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL)
+                    .setBackups(1)
+                    .setAffinity(new RendezvousAffinityFunction().setPartitions(2))
+                    .setExpiryPolicyFactory(TouchedExpiryPolicy.factoryOf(new Duration(TimeUnit.MINUTES, 60))));
+
+            // Plugin that creates a testing WAL manager.
+            cfg.setPluginProviders(new AbstractTestPluginProvider() {
+                /** {@inheritDoc} */
+                @Override public String name() {
+                    return "testPlugin";
+                }
+
+                /** {@inheritDoc} */
+                @Override public <T> @Nullable T createComponent(PluginContext ctx, Class<T> cls) {
+                    if (IgniteWriteAheadLogManager.class.equals(cls))
+                        return (T)new TestFileWriteAheadLogManager(((IgniteEx)ctx.grid()).context(), stop);
+
+                    return null;
+                }
+            });
+
+            cfg.setMetricsLogFrequency(1000);
+        }
+
+        return cfg;
+    }
+
+    /** WAL manager that signals once meet the RotatedIdPartRecord with rotatedIdPart more than 127. */
+    private static class TestFileWriteAheadLogManager extends FileWriteAheadLogManager {

Review Comment:
   Let's move this class to the end of the file



-- 
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-23815 Fix assertion during RotatedIdPartRecord read from WAL [ignite]

Posted by "skorotkov (via GitHub)" <gi...@apache.org>.
skorotkov commented on code in PR #11695:
URL: https://github.com/apache/ignite/pull/11695#discussion_r1875532766


##########
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/wal/WalRotatedIdPartRecordTest.java:
##########
@@ -0,0 +1,184 @@
+/*
+ * 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.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+import javax.cache.expiry.Duration;
+import javax.cache.expiry.TouchedExpiryPolicy;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.cache.CacheAtomicityMode;
+import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
+import org.apache.ignite.cache.query.ScanQuery;
+import org.apache.ignite.cluster.ClusterState;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.DataRegionConfiguration;
+import org.apache.ignite.configuration.DataStorageConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.GridKernalContext;
+import org.apache.ignite.internal.IgniteEx;
+import org.apache.ignite.internal.IgniteInternalFuture;
+import org.apache.ignite.internal.pagemem.wal.IgniteWriteAheadLogManager;
+import org.apache.ignite.internal.pagemem.wal.record.WALRecord;
+import org.apache.ignite.internal.pagemem.wal.record.delta.RotatedIdPartRecord;
+import org.apache.ignite.internal.processors.cache.GridCacheMapEntry;
+import org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager;
+import org.apache.ignite.plugin.AbstractTestPluginProvider;
+import org.apache.ignite.plugin.PluginContext;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.core.config.Configurator;
+import org.jetbrains.annotations.Nullable;
+import org.junit.Test;
+
+import static org.apache.ignite.testframework.GridTestUtils.runAsync;
+
+/** */
+public class WalRotatedIdPartRecordTest extends GridCommonAbstractTest {
+    /** */
+    private static final int KEYS = 1000;
+
+    /** */
+    AtomicBoolean stop = new AtomicBoolean();
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
+        IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
+
+        if (!cfg.isClientMode()) {
+            cfg.setDataStorageConfiguration(new DataStorageConfiguration()
+                    .setDefaultDataRegionConfiguration(new DataRegionConfiguration()
+                        .setPersistenceEnabled(true)))
+                .setCacheConfiguration(new CacheConfiguration<>(DEFAULT_CACHE_NAME)
+                    .setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL)
+                    .setBackups(1)
+                    .setAffinity(new RendezvousAffinityFunction().setPartitions(2))
+                    .setExpiryPolicyFactory(TouchedExpiryPolicy.factoryOf(new Duration(TimeUnit.MINUTES, 60))));
+
+            // Plugin that creates a testing WAL manager.
+            cfg.setPluginProviders(new AbstractTestPluginProvider() {
+                /** {@inheritDoc} */
+                @Override public String name() {
+                    return "testPlugin";
+                }
+
+                /** {@inheritDoc} */
+                @Override public <T> @Nullable T createComponent(PluginContext ctx, Class<T> cls) {
+                    if (IgniteWriteAheadLogManager.class.equals(cls))
+                        return (T)new TestFileWriteAheadLogManager(((IgniteEx)ctx.grid()).context(), stop);
+
+                    return null;
+                }
+            });
+
+            cfg.setMetricsLogFrequency(1000);

Review Comment:
   I added it to look for size of striped pool queue size during test debug.
   
   Will remove



-- 
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-23815 Fix assertion during RotatedIdPartRecord read from WAL [ignite]

Posted by "asfgit (via GitHub)" <gi...@apache.org>.
asfgit closed pull request #11695: IGNITE-23815 Fix assertion during RotatedIdPartRecord read from WAL
URL: https://github.com/apache/ignite/pull/11695


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