Method and apparatus for processing write-ahead log

US11526495B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-11526495-B2
Application numberUS-202016909429-A
CountryUS
Kind codeB2
Filing dateJun 23, 2020
Priority dateDec 29, 2017
Publication dateDec 13, 2022
Grant dateDec 13, 2022

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.

A method and apparatus for processing a write-ahead log (WAL) in a storage device that records a WAL set key-value pair and a status key-value pair include determining a status of the WAL set key-value pair based on the status key-value pair, replaying all uncompleted WALs in the WAL set key-value pair when the status of the WAL set key-value pair is in a sealed state, modifying, in the status key-value pair, the status of the WAL set key-value from the sealed state to a completed state, and deleting the WAL set key-value pair in the completed state.

First claim

Opening claim text (preview).

What is claimed is: 1. A method for processing a write-ahead log (WAL) in a storage device, wherein the method comprises: recording a WAL set key-value pair and a status key-value pair, wherein the status key-value pair records a status of a plurality of WAL set key-value pairs such that WAL set key-value pairs in different statuses can be directly searched by querying the status key-value pair, and wherein the status comprises a sealed state, a complete state, a working state, or a deleted state; replaying all uncompleted WALs in the WAL set key-value pair when the status of the WAL set key-value pair is in the sealed state, wherein the WAL set key-value pair in the sealed state is forbidden to record a new WAL, and wherein the WAL set key-value pair records a plurality of WALs; modifying, in the status key-value pair, the status of the WAL set key-value pair from the sealed state to the completed state; and deleting the WAL set key-value pair in the completed state. 2. The method of claim 1 , wherein a value of the status key-value pair comprises a key of the WAL set key-value pair and the status of the WAL set key-value pair corresponding to the key of the WAL set key-value pair. 3. The method of claim 1 , further comprising storing a first cursor key-value pair, wherein the status of the WAL set key-value pair recorded in the status key-value pair corresponding to the first cursor key-value pair comprises the sealed state. 4. The method of claim 1 , further comprising storing a second cursor key-value pair, wherein the status of the WAL set key-value pair recorded in the status key-value pair corresponding to the second cursor key-value pair comprises the completed state. 5. The method of claim 1 , wherein the WAL set key-value pair in the working state records a new WAL. 6. The method of claim 5 , wherein a quantity of WALs stored in the WAL set key-value pair in the working state is less than a maximum quantity of WALs. 7. The method of claim 1 , wherein a quantity of WALs stored in the WAL set key-value pair in the sealed state is equal to a maximum quantity of WALs. 8. An apparatus for processing a write-ahead log (WAL) in a storage device, wherein the apparatus comprises: a memory configured to store instructions; and a processor coupled to the memory, wherein the instructions cause the processor to be configured to: record a WAL set key-value pair and a status key-value pair, wherein the status key-value pair records a status of a plurality of WAL set key-value pairs such that WAL set key-value pairs in different statuses can be directly searched by querying the status key-value pair, and wherein the status comprises a sealed state, a complete state, a working state, or a deleted state; replay all uncompleted WALs in the WAL set key-value pair when the status of the WAL set key-value pair is in the sealed state, wherein the WAL set key-value pair in the sealed state is forbidden to record a new WAL, and wherein the WAL set key-value pair records a plurality of WALs; modify, in the status key-value pair, the status of the WAL set key-value from the sealed state to the completed state; and delete the WAL set key-value pair in the completed state. 9. The apparatus of claim 8 , wherein a value of the status key-value pair comprises a key of the WAL set key-value pair and the status of the WAL set key-value pair corresponding to the key of the WAL set key-value pair. 10. The apparatus of claim 8 , wherein the instructions further cause the processor to be configured to store a first cursor key-value pair, and wherein the status of the WAL set key-value pair recorded in the status key-value pair corresponding to the first cursor key-value pair comprises the sealed state. 11. The apparatus of claim 8 , wherein the instructions further cause the processor to be configured to store a second cursor key-value pair, and wherein the status of the WAL set key-value pair recorded in the status key-value pair corresponding to the second cursor key-value pair comprises the completed state. 12. The apparatus of claim 8 , wherein the WAL set key-value pair in the working state records a new WAL. 13. The apparatus of claim 12 , wherein a quantity of WALs stored in the WAL set key-value pair in the working state is less than a maximum quantity of WALs. 14. The apparatus of claim 8 , wherein a quantity of WALs stored in the WAL set key-value pair in the sealed state is equal to a maximum quantity of WALs. 15. A computer program product comprising a non-transitory computer-readable storage medium having computer-executable instructions for processing a write-ahead log (WAL) in a storage device, wherein the computer-executable instructions, when executed by a processor, cause a computer to: record a WAL set key-value pair and a status key-value pair, wherein the status key-value pair records a status of a plurality of WAL set key-value pairs such that WAL set key-value pairs in different statuses can be directly searched by querying the status key-value pair, and wherein the status comprises a sealed state, a complete state, a working state, or a deleted state; replay all uncompleted WALs in the WAL set key-value pair when the status of the WAL set key-value pair is in the sealed state, wherein the WAL set key-value pair in the sealed state is forbidden to record a new WAL, and wherein the WAL set key-value pair records a plurality of WALs; modify, in the status key-value pair, the status of the WAL set key-value from the sealed state to the completed state; and delete the WAL set key-value pair in the completed state. 16. The computer program product of claim 15 , wherein a value of the status key-value pair comprises a key of the WAL set key-value pair and the status of the WAL set key-value pair corresponding to the key of the WAL set key-value pair. 17. The computer program product of claim 15 , wherein the computer-executable instructions further cause the computer to be configured to store a first cursor key-value pair, and wherein the status of the WAL set key-value pair recorded in the status key-value pair corresponding to the first cursor key-value pair comprises the sealed state. 18. The computer program product of claim 15 , wherein the computer-executable instructions further cause the computer to be configured to store a second cursor key-value pair, and wherein the status of the WAL set key-value pair recorded in the status key-value pair corresponding to the second cursor key-value pair comprises the completed state. 19. The computer program product of claim 15 , wherein the WAL set key-value pair in the working state records a new WAL, and wherein a quantity of WALs stored in the WAL set key-value pair in the working state is less than a maximum quantity of WALs. 20. The computer program product of claim 15 , wherein a quantity of WALs stored in the WAL set key-value pair in the sealed state is equal to a maximum quantity of WALs.

Assignees

Inventors

Classifications

  • Ensuring data consistency and integrity · CPC title

  • Databases characterised by their database models, e.g. relational or object models · CPC title

  • Updates performed during online database operations; commit processing · CPC title

  • Trees, e.g. B+trees · 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 US11526495B2 cover?
A method and apparatus for processing a write-ahead log (WAL) in a storage device that records a WAL set key-value pair and a status key-value pair include determining a status of the WAL set key-value pair based on the status key-value pair, replaying all uncompleted WALs in the WAL set key-value pair when the status of the WAL set key-value pair is in a sealed state, modifying, in the status …
Who is the assignee on this patent?
Huawei Tech Co Ltd
What technology area does this patent fall under?
Primary CPC classification G06F16/2365. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Dec 13 2022 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 4 related publications on this page (citations in our corpus or others sharing the same primary CPC).