You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2022/01/31 14:04:21 UTC
[GitHub] [ignite] xtern commented on a change in pull request #9736: IGNITE-16264 tryToRestorePage does not mark the page as dirty.
xtern commented on a change in pull request #9736:
URL: https://github.com/apache/ignite/pull/9736#discussion_r795699696
##########
File path: modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/IgnitePdsRecoveryAfterFileCorruptionTest.java
##########
@@ -175,8 +190,42 @@ public void testPageRecoveryAfterFileCorruption() throws Exception {
stopAllGrids();
ig = startGrid(0);
+ ig.cluster().state(ClusterState.ACTIVE);
+
+ checkRestore(ig, pages);
+
+ // It is necessary to clear the current WAL history to make sure that the restored pages have been saved.
+ GridCacheSharedContext<Object, Object> cctx = ig.context().cache().context();
+ GridCacheDatabaseSharedManager dbMgr = (GridCacheDatabaseSharedManager)cctx.database();
+ FileWriteAheadLogManager wal = (FileWriteAheadLogManager)cctx.wal();
+
+ dbMgr.enableCheckpoints(true).get(getTestTimeout());
+
+ WALPointer trucateWalPtr = dbMgr.checkpointHistory().lastCheckpoint().checkpointMark();
+
+ IgniteCache<Object, Object> dummyCache = ig.cache(dummyCacheName);
- ig.cluster().active(true);
+ byte[] dummyData = new byte[WAL_SEGMENT_SIZE / 2];
+
+ // Try to move current WAL segment into archive.
+ for (int i = 0; i < WAL_SEGMENTS_CNT * 2; i++) {
+ dummyCache.put(i, dummyData);
Review comment:
Done, thank you!
--
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