Systems, methods, and apparatuses for fixing logical or physical corruption in databases using LSM trees
First Claim
1. A method in a host infrastructure having a processor and a memory therein, wherein the method comprises:
- causing records to be stored in a log-structured merge (LSM) storage;
writing transactions to a transaction log and then flushing at least a portion of the transaction log to cause the at least the portion of the transaction log to be stored into one or more extents in the LSM storage, wherein the transactions are updates to, deletions of, or creation of records;
writing, upon receiving an identification of corruption in at least one of the transactions or the records of the LSM storage, a compensating transaction to the transaction log, wherein the compensating transaction data is usable to restore the at least one of the corrupted transactions or the corrupted records; and
flushing the compensating transaction into a newest top level extent in the LSM storage.
1 Assignment
0 Petitions
Accused Products
Abstract
In accordance with disclosed embodiments, there are provided methods, systems, and apparatuses for fixing logical or physical corruption in databases using LSM trees including, for example, means for storing records in a LSM database at the host organization; processing transactions to the LSM database by writing the transactions into immutable extents for subsequent merge into the LSM database; recording a history of the transactions in a log; identifying corruption in at least one of the records of the LSM database represented within the immutable extents prior to use of the immutable extents in the LSM database; and correcting the identified corruption to the at least one of the records of the LSM database based at least in part on the recorded history of the transactions in the log during live operation of the LSM database. Other related embodiments are disclosed.
119 Citations
32 Claims
-
1. A method in a host infrastructure having a processor and a memory therein, wherein the method comprises:
-
causing records to be stored in a log-structured merge (LSM) storage; writing transactions to a transaction log and then flushing at least a portion of the transaction log to cause the at least the portion of the transaction log to be stored into one or more extents in the LSM storage, wherein the transactions are updates to, deletions of, or creation of records; writing, upon receiving an identification of corruption in at least one of the transactions or the records of the LSM storage, a compensating transaction to the transaction log, wherein the compensating transaction data is usable to restore the at least one of the corrupted transactions or the corrupted records; and flushing the compensating transaction into a newest top level extent in the LSM storage. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)
-
-
15. Non-transitory computer readable storage media having instructions stored thereon which, when executed by a processor in a host infrastructure, cause the host infrastructure to perform operations, comprising:
-
causing records to be stored in a log-structured merge (LSM) storage; writing transactions to a transaction log and then flushing at least a portion of the transaction log to cause the at least the portion of the transaction log to be stored into one or more extents in the LSM storage, wherein the transactions are updates to, deletions of, or creation of records; writing, upon receiving an identification of corruption in at least one of the transactions or the records of the LSM storage, a compensating transaction to the transaction log, wherein the compensating transaction data is usable to restore the at least one of the corrupted transactions or the corrupted records; and flushing the compensating transaction into a newest top level extent in the LSM storage. - View Dependent Claims (16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28)
-
-
29. A system, comprising:
-
a log-structured merge (LSM) storage configured to store records; a query interface configured to write transactions to a transaction log and then flush at least a portion of the transaction log to cause the at least the portion of the transaction log to be stored into one or more extents in the LSM storage, wherein the transactions are updates to, deletions of, or creation of records; a transaction log configured to record a history of the transactions; a logical corruption locator configured to locate logical corruption in at least one of the transactions or the records of the LSM storage; and a logical corruption editor configured to; write, upon receiving an identification of corruption in at least one of the transactions or the records of the LSM storage, a compensating transaction to the transaction log, wherein the compensating transaction data is usable to restore the at least one of the corrupted transactions or the corrupted records; and flush the compensating transaction into a newest top level extent in the LSM storage. - View Dependent Claims (30, 31, 32)
-
Specification