Asynchronous Garbage Collection in Database Redo Log Replay

US2018239676A1 · US · A1

Patent metadata
FieldValue
Publication numberUS-2018239676-A1
Application numberUS-201715436535-A
CountryUS
Kind codeA1
Filing dateFeb 17, 2017
Priority dateFeb 17, 2017
Publication dateAug 23, 2018
Grant date

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

Recovery of a database system by taking the database system offline is initiated. Thereafter, recovery operations specified by a redo log of the database system are replayed. A cleanup log is generated that identifies cleanup operations occurring during the replay of the recovery operations for garbage collection. Concurrent with the startup of the database, garbage collection of the cleanup operations as specified in the database savepoint is initiated. In addition, concurrent with the replay of the recovery operations, garbage collection of the cleanup operations specified by the cleanup log is initiated. The database system is later brought online after all of the recovery operations are replayed.

First claim

Opening claim text (preview).

What is claimed is: 1 . A computer-implemented method comprising: initiating recovery of a database system by taking the database system offline; replaying recovery operations specified by a redo log of the database system; generating a cleanup log identifying cleanup operations occurring during the replay of the recovery operations for garbage collection; initiating, concurrent with the startup of the database, garbage collection of the cleanup operations as specified in the database savepoint; initiating, concurrent with the replay of the recovery operations, garbage collection of the cleanup operations specified by the cleanup log; and bringing the database system online after all of the recovery operations are replayed. 2 . The method of claim 1 , wherein the cleanup log is passed to a history manager after it is generated and the history manager subsequently initiates the garbage collection of the cleanup operations specified by the cleanup log. 3 . The method of claim 1 , wherein the garbage collection of the cleanup operations continues subsequent to the database system being brought online. 4 . The method of claim 1 , wherein the replay operations are executed by recovery threads and the cleanup operations are executed by garbage collection threads. 5 . The method of claim 4 , wherein the database comprises a plurality of programmable processor cores and the threads are striped such that each core executes a maximum of one recovery thread and one garbage collection thread. 6 . The method of claim 5 , wherein at least one core prioritizes execution of the corresponding recovery thread over the corresponding garbage collection thread. 7 . The method of claim 1 , wherein the database system comprises an in-memory database storing data in main memory. 8 . A computer-implemented method comprising: initiating replication of a primary database system by having an associated secondary database system mirroring data stored in the primary database system and sending the most recent savepoint of the primary system to the secondary; replaying, by the secondary database system, recovery operations specified by a redo log of the primary database system and sent to the secondary system; initiating, concurrent to subsequent recovery operations, garbage collection of cleanup operations which are part of the savepoint sent from the primary; generating, by the secondary database system, a cleanup log identifying cleanup operations occurring during the replay of the recovery operations for garbage collection; initiating, by the secondary database system concurrent with the replay of the recovery operations, garbage collection of the cleanup operations; and redirecting readonly transactions for execution by the primary database system to the secondary database system which are able to block the asynchronous garbage collection in the secondary database system to get a stable view of data replicated on the secondary as required by certain transaction isolation levels. 9 . The method of claim 8 , wherein the cleanup log is passed to a history manager after it is generated and the history manager subsequently initiates the garbage collection of the cleanup operations specified by the cleanup log. 10 . The method of claim 9 further comprising: determining whether garbage collection can be initiated based on a snapshot timestamp of an oldest reader of the primary database system relative to a commit timestamp of a transaction that generated the cleanup log. 12 . The method of claim 10 , wherein the garbage collection is initiated if the commit timestamp of the cleanup log is older than the snapshot timestamp of the oldest reader. 13 . The method of claim 10 further comprising: delaying initiation of the garbage collection of the cleanup operations if the commit timestamp of the cleanup log is more recent than the snapshot timestamp of the oldest reader. 14 . The method of claim 8 , wherein the garbage collection of the cleanup operations continues subsequent to the primary database system being brought online. 15 . The method of claim 8 , wherein the garbage collection of the cleanup operations continues subsequent to the secondary database system executing the redirected transactions. 16 . The method of claim 8 , wherein the replay operations are executed by recovery threads and the cleanup operations are executed by garbage collection threads. 17 . The method of claim 16 , wherein the database comprises a plurality of programmable processor cores and the threads are striped such that each core executes a maximum of one recovery thread and one garbage collection thread. 18 . The method of claim 17 , wherein at least one core prioritizes execution of the corresponding recovery thread over the corresponding garbage collection thread. 19 . The method of claim 8 , wherein the database system comprises an in-memory database storing data in main memory. 20 . A database system comprising: at least one programmable data processor; and memory storing instructions which, when executed by the at least one programmable data processor, result in operations comprising: initiating recovery of the database system by taking the database system offline; replaying recovery operations specified by a redo log of the database system; generating a cleanup log identifying cleanup operations occurring during the replay of the recovery operations for garbage collection; initiating, concurrent with the replay of the recovery operations, garbage collection of the cleanup operations specified by the cleanup log or specified in the savepoint; and bringing the database system online after all of the recovery operations are replayed.

Assignees

Inventors

Classifications

  • Backup restoration techniques · CPC title

  • Garbage collection, i.e. reclamation of unreferenced memory · CPC title

  • Resource optimization · CPC title

  • Using snapshots, i.e. a logical point-in-time copy of the data · CPC title

  • Database-specific techniques · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US2018239676A1 cover?
Recovery of a database system by taking the database system offline is initiated. Thereafter, recovery operations specified by a redo log of the database system are replayed. A cleanup log is generated that identifies cleanup operations occurring during the replay of the recovery operations for garbage collection. Concurrent with the startup of the database, garbage collection of the cleanup op…
Who is the assignee on this patent?
Sap Se
What technology area does this patent fall under?
Primary CPC classification G06F11/1469. Mapped technology areas include Physics.
When was this patent published?
Publication date Thu Aug 23 2018 00:00:00 GMT+0000 (Coordinated Universal Time) (A1). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 8 related publications on this page (citations in our corpus or others sharing the same primary CPC).