alex-plekhanov commented on a change in pull request #7941:
URL: https://github.com/apache/ignite/pull/7941#discussion_r494546092



##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/pagemem/wal/record/delta/MetaPageUpdateIndexDataRecord.java
##########
@@ -0,0 +1,105 @@
+/*
+ * 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.pagemem.wal.record.delta;
+
+import java.io.DataInput;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.internal.pagemem.PageIdUtils;
+import org.apache.ignite.internal.pagemem.PageMemory;
+import 
org.apache.ignite.internal.processors.cache.persistence.tree.io.PageIndexMetaIO;
+import org.apache.ignite.internal.util.typedef.internal.S;
+
+/**
+ * Meta page delta record, includes encryption status data.
+ */
+public class MetaPageUpdateIndexDataRecord extends PageDeltaRecord {
+    /** Index of the last reencrypted page. */
+    private int encryptPageIdx;
+
+    /** Total pages to be reencrypted. */
+    private int encryptPageCnt;
+
+    /**
+     * @param grpId  Cache group ID.
+     * @param pageId Page ID.
+     * @param encryptPageIdx Index of the last reencrypted page.
+     * @param encryptPageCnt Total pages to be reencrypted.
+     */
+    public MetaPageUpdateIndexDataRecord(int grpId, long pageId, int 
encryptPageIdx, int encryptPageCnt) {
+        super(grpId, pageId);
+
+        this.encryptPageIdx = encryptPageIdx;
+        this.encryptPageCnt = encryptPageCnt;
+    }
+
+    /** {@inheritDoc} */
+    @Override public void applyDelta(PageMemory pageMem, long pageAddr) throws 
IgniteCheckedException {
+        PageIndexMetaIO io = PageIndexMetaIO.VERSIONS.forPage(pageAddr);

Review comment:
       Perhaps here we can face with a not upgraded page (in case node failed 
after page upgrade and before first checkpoint)




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to