# US 11,907,162 B2 · Minimizing data volume growth under encryption changes

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 11,907,162 B2
- Document ID: US11907162B2
- Status: Granted
- Kind: B2
- Application number: 17/333,484
- Filed: 2021-05-28
- Published: 2022-12-01
- Granted: 2024-02-20
- Earliest claimed: 2021-05-28
- Assignees: Sap SE
- Applicants: Sap SE
- Inventors: Dirk Thomsen; Axel Schroeder
- Web page: https://patentgrep.com/patent/US11907162B2

## CPC

- G06F 16/128: {Details of file system snapshots on the file-level, e.g. snapshot creation, administration, deletion (error detection or correction of the data by redundancy in operations or in hardware G06F11/14, G06F11/16)}
- G06F 21/602: {Providing cryptographic facilities or services}
- H04L 9/0891: {Revocation or update of secret information, e.g. encryption key update or rekeying}
- H04L 9/0894: {Escrow, recovery or storing of secret information, e.g. secret key escrow or cryptographic key storage}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

Computer-readable media, methods, and systems are disclosed for minimizing data volume growth in a database system under changes to an encryption status of a plurality of data pages persisted to a database. Initially, a request is received to update an encryption parameter associated with the database. Next, it is determined whether a candidate page requires encryption changes. In response to determining that the candidate page is not currently in use by one or more active database snapshots and not currently loaded in main memory, the candidate page is loaded into main memory. Next, an encryption operation is performed on the candidate page, and the encrypted page is designated for persistence. Finally, based on a current number of candidate pages already encrypted during a current save point cycle, the selective iteration is paused until a subsequent save point cycle.

## Claims

### Claim 1

One or more non-transitory computer-readable media storing computer-executable instructions that, when executed by a processor, perform a method for minimizing data volume growth of a data volume in a database system under changes to an encryption status of a plurality of data pages associated with one or more databases in the database system, the method comprising:
receiving a request to update an encryption parameter associated with the one or more databases;
selectively iterating metadata associated with the plurality of pages to determine that a candidate page requires encryption changes in connection with the request to update the encryption parameter;
in response to determining that the candidate page is not currently in use by one or more active database snapshots:
in response to determining that the candidate page is not currently loaded in main memory loading the candidate page into main memory;
performing an encryption operation on the candidate page based on the updated encryption parameter to render an encrypted page; and
designating the encrypted page for persistence;
based on a current number of candidate pages already encrypted during a current save point cycle, pausing the selective iteration until a subsequent save point cycle; and
for each candidate page in the selective iteration:
determining, based on a size of the candidate page, the candidate page to be copied to a superblock page;
in response to determining the size of the candidate page is below a threshold, copying the candidate page into the superblock page;
generating a control superblock associated with the candidate page, wherein the control superblock includes the encryption parameter;
performing the encryption operation for each candidate page of the superblock page based on the encryption parameter within the control superblock; and
flushing the superblock page to disk storage.

### Claim 2 (depends on 1)

The non-transitory computer-readable media of claim 1, the method further comprising:
upon performing an encryption operation on the candidate page, flagging the encrypted candidate page as modified.

### Claim 3 (depends on 2)

The non-transitory computer-readable media of claim 2, the method further comprising:
upon flagging the encrypted candidate page as modified, designating a corresponding shadow page in the data volume as available to be freed in a next save point cycle.

### Claim 4 (depends on 1)

The non-transitory computer-readable media of claim 1, the method further comprising:
in response to determining that the candidate page is currently in use by one or more active database snapshots:
adding a page identifier associated the candidate page to a list of in use pages.

### Claim 5 (depends on 4)

The non-transitory computer-readable media of claim 4, the method further comprising:
in response to determining that one or more snapshots have been dropped:
iterating through the list of in use pages to identify any pages that are no longer in use.

### Claim 6 (depends on 1)

The non-transitory computer-readable media of claim 1, the method further comprising:
based on the current number of candidate pages encrypted during the current save point cycle, continuing the selective iteration until a threshold number of pages have been encrypted.

### Claim 7 (depends on 6)

The non-transitory computer-readable media of claim 6, wherein the threshold number of pages relates to a size of the data volume stored by a disk storage of the database system.

### Claim 8 (depends on 1)

The non-transitory computer readable media of claim 1, the method further comprising:
in response to determining that the candidate page is currently in use by one or more active database snapshots, refraining from performing the encryption operation on the candidate page and continuing to the next selective iteration step.

### Claim 9 (depends on 1)

The non-transitory computer readable media of claim 1, wherein performing the encryption operation for each candidate page of the superblock comprises:
performing the encryption operation for each candidate page of the superblock in parallel based on the encryption parameter within the control superblock.

### Claim 10 (depends on 1)

The non-transitory computer readable media of claim 1, wherein the threshold corresponds to a size smaller than a size of the superblock page.

### Claim 11

A method for minimizing data volume growth of a data volume in a database system under changes to an encryption status of a plurality of data pages associated with one or more databases in the database system, the method comprising:
receiving a request to update an encryption parameter associated with the one or more databases;
selectively iterating metadata associated with the plurality of pages to determine that a candidate page requires encryption changes in connection with the request to update the encryption parameter;
in response to determining that the candidate page is not currently in use by one or more active database snapshots:
in response to determining that the candidate page is not currently loaded in main memory loading the candidate page into main memory;
performing an encryption operation on the candidate page based on the updated encryption parameter to render an encrypted page; and
designating the encrypted page for persistence;
based on a current number of candidate pages already encrypted during a current save point cycle, pausing the selective iteration until a subsequent save point cycle; and
for each candidate page in the selective iteration:
determining, based on a size of the candidate page, the candidate page to be copied to a superblock page;
in response to determining the size of the candidate page is below a threshold, copying the candidate page into the superblock page;
generating a control superblock associated with the candidate page, wherein the control superblock includes the encryption parameter;
performing the encryption operation for each candidate page of the superblock page based on the encryption parameter within the control superblock; and
flushing the superblock page to disk storage.

### Claim 12 (depends on 11)

The method of claim 11, the method further comprising:
upon performing an encryption operation on the candidate page, flagging the encrypted candidate page as modified.

### Claim 13 (depends on 12)

The method of claim 12, the method further comprising:
upon flagging the encrypted candidate page as modified, designating a corresponding shadow page in the data volume as available to be freed in a next save point cycle.

### Claim 14 (depends on 11)

The method of claim 11 further comprising:
in response to determining that determining that the candidate page is currently in use by one or more active database snapshots:
adding a page identifier associated the candidate page to a list of in use pages.

### Claim 15 (depends on 14)

The method of claim 14, the method further comprising:
in response to determining that one or more snapshots have been dropped:
iterating through the list of in use pages to identify any pages that are no longer in use.

### Claim 16

A system for minimizing data volume growth of a data volume in a database system under changes to an encryption status of a plurality of data pages associated with one or more databases in the database system, the system comprising at least one processor and at least one non-transitory memory storing computer executable instructions that when executed by the processor cause the system to carry out actions comprising:
receiving a request to update an encryption parameter associated with the one or more databases;
selectively iterating metadata associated with the plurality of pages to determine that a candidate page requires encryption changes in connection with the request to update the encryption parameter;
in response to determining that the candidate page is not currently in use by one or more active database snapshots:
in response to determining that the candidate page is not currently loaded in main memory, loading the candidate page into main memory;
performing an encryption operation on the candidate page based on the updated encryption parameter to render an encrypted page; and
designating the encrypted page for persistence;
based on a current number of candidate pages already encrypted during a current save point cycle, pausing the selective iteration until a subsequent save point cycle; and
for each candidate page in the selective iteration:
determining, based on a size of the candidate page, the candidate page to be copied to a superblock page;
in response to determining the size of the candidate page is below a threshold, copying the candidate page into the superblock page;
generating a control superblock associated with the candidate page, wherein the control superblock includes the encryption parameter;
performing the encryption operation for each candidate page of the superblock page based on the encryption parameter within the control superblock; and
flushing the superblock page to disk storage.

### Claim 17 (depends on 16)

The system of claim 16, the actions further comprising:
upon performing an encryption operation on the candidate page, flagging the encrypted candidate page as modified.

### Claim 18 (depends on 17)

The system of claim 17, the actions further comprising:
upon flagging the encrypted candidate page as modified, designating a corresponding shadow page as available to be freed in a next save point cycle.

### Claim 19 (depends on 16)

The system of claim 16, the actions comprising:
in response to determining that determining that the candidate page is currently in use by one or more active database snapshots:
adding a page identifier associated the candidate page to a list of in use pages.

### Claim 20 (depends on 19)

The system of claim 19, the actions further comprising:
in response to determining that one or more snapshots have been dropped:
iterating through the list of in use pages to identify any pages that are no longer in use.
