Providing eventual consistency for multi-shard transactions
US-2017161310-A1 · Jun 8, 2017 · US
US11526495B2 · US · B2
| Field | Value |
|---|---|
| Publication number | US-11526495-B2 |
| Application number | US-202016909429-A |
| Country | US |
| Kind code | B2 |
| Filing date | Jun 23, 2020 |
| Priority date | Dec 29, 2017 |
| Publication date | Dec 13, 2022 |
| Grant date | Dec 13, 2022 |
A practical reading order for non-experts. Skip the full description unless you need deep technical detail.
What the patent document calls the invention.
A short plain-language summary of the technical disclosure.
Who owns or filed the patent and who is credited as inventor.
Filing, priority, publication, and grant dates set the timeline.
The legal scope of protection — read this for what is actually claimed.
Technology tags used to group this patent with similar filings.
Prior art links and similar publications in this corpus.
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.
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.
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
Related publications grouped by family.
Answers are generated from the same data shown on this page.