Shadow paging based log segment directory
AssigneeSap SE
InventorIvan Schreter
Life of this patent
Estimating the term…
Abstract
Replay of data transactions is initiated in a data storage application. Pages of a log segment directory characterizing metadata for a plurality of log segment are loaded into memory. Thereafter, redundant pages within the log segment directory are removed. It is then determined, based on the log segment directory, which log segments need to be accessed. These log segments are accessed to execute the log replay. Related apparatus, systems, techniques and articles are also described.
Claims14
A non-transitory computer program product storing instructions that, when executed by at least one programmable processor, cause the at least one programmable processor to perform operations comprising:
- initiating replay of data transactions in a data storage application comprising an in-memory database;
- loading pages of a log segment directory into memory of the in-memory database, the log segment directory maintaining metadata for each of a plurality of log segments in the log segment directory and each page of the log segment directory comprising an index of a first log segment addressed by the page, a page generation value, and a checksum value, and a fixed number of log segment metadata, the metadata for each log segment comprising a log sequence number of a first entry and a last entry in the corresponding log segment and data characterizing a current state of the corresponding log segment;
- removing redundant pages within the log segment directory, the removing comprising:
- removing pages having a same index as another page and correct checksum value but with a lower page generation value;
- determining, based on the log segment directory, which log segments need to be accessed;
- and
- accessing the log segments that need to be accessed to execute the log replay.
A method comprising:
- initiating replay of data transactions in a data storage application comprising an in-memory database;
- loading pages of a log segment directory into memory of the in-memory database, the log segment directory maintaining metadata for each of a plurality of log segments in the log segment directory and each page of the log segment directory comprising an index of a first log segment addressed by the page, a page generation value, and a checksum value, and a fixed number of log segment metadata, the metadata for each log segment comprising a log sequence number of a first entry and a last entry in the corresponding log segment and data characterizing a current state of the corresponding log segment;
- removing redundant pages within the log segment directory, the removing comprising:
- removing pages having a same index as another page and correct checksum value but with a lower page generation value;
- determining, based on the log segment directory, which log segments need to be accessed;
- and
- accessing the log segments that need to be accessed to execute the log replay.
A non-transitory computer program product storing instructions that, when executed by at least one programmable processor, cause the at least one programmable processor to perform operations comprising:
- initiating replay of data transactions in a data storage application comprising an in-memory database;
- loading pages of a log segment directory into memory of an in-memory database forming part of a data storage application, the log segment directory maintaining metadata for a plurality of log segments in the log segment directory, wherein each page of the log segment directory comprises an index of a first log segment addressed by the page, a page generation value, a checksum value and a fixed number of log segment metadata, the metadata for each log segment comprising a log sequence number of a first entry and a last entry in the corresponding log segment and data characterizing a current state of the corresponding log segment;
- removing redundant pages within the log segment directory, the removing comprising:
- removing pages having a same index as another page and correct checksum value but with a lower page generation value;
- modifying metadata of a first log segment in memory;
- increasing, in response to the modifying, a value for a current page generation counter for the first log segment;
- setting the page generation value for the log segment to the current generation counter value;
- assigning a new physical secondary storage location for a new page for the log segment to a physical secondary storage position taken from a free list data structure;
- computing a new checksum for the log segment;
- writing the modified page to the new physical secondary storage location;
- and
- adding a previous physical secondary storage location for a shadow page for the log segment to the free list data structure.
Dependencies are inferred from the claim text.