[ 
https://issues.apache.org/jira/browse/IGNITE-11129?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16757283#comment-16757283
 ] 

Stepachev Maksim commented on IGNITE-11129:
-------------------------------------------

This case is wrong. The method "needEncryption" contains a condition, which 
encrypts only records with data.

> Incorrect size calculation for SWITCH_SEGMENT_RECORD for TDE
> ------------------------------------------------------------
>
>                 Key: IGNITE-11129
>                 URL: https://issues.apache.org/jira/browse/IGNITE-11129
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Andrey Gura
>            Assignee: Stepachev Maksim
>            Priority: Major
>
> Size of {{SWITCH_SEGMENT_RECORD}} will be invalid in case of encryption 
> switched on. Size for this record type must be constant.
> See 
> {{org.apache.ignite.internal.processors.cache.persistence.wal.serializer.RecordDataV1Serializer#size}}:
> {code:java}
>     @Override public int size(WALRecord record) throws IgniteCheckedException 
> {
>         int clSz = plainSize(record);
>         if (needEncryption(record))
>             return encSpi.encryptedSize(clSz) + 4 /* groupId */ + 4 /* data 
> size */ + REC_TYPE_SIZE;
>         return clSz;
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to