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;
receiving an identification of corruption in;
at least one corrupted transaction of the transactions,at least one corrupted record of the records, orboth;
locating, in response to the receiving the identification of the corruption, compensating transaction data in the transaction log, wherein the compensating transaction data is usable to restore the at least one corrupted transaction, the at least one corrupted record, or both;
generating a compensating transaction based on the compensating transaction data from the transaction log and the stored record from the LSM storage; and
sending the compensating transaction to 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.
121 Citations
36 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; receiving an identification of corruption in; at least one corrupted transaction of the transactions, at least one corrupted record of the records, or both; locating, in response to the receiving the identification of the corruption, compensating transaction data in the transaction log, wherein the compensating transaction data is usable to restore the at least one corrupted transaction, the at least one corrupted record, or both; generating a compensating transaction based on the compensating transaction data from the transaction log and the stored record from the LSM storage; and sending the compensating transaction to the LSM storage. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
-
-
17. A 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; receiving an identification of corruption in; at least one corrupted transaction of the transactions, at least one corrupted record of the records, or both; locating, in response to the receiving the identification of the corruption, compensating transaction data in the transaction log, wherein the compensating transaction data is usable to restore the at least one corrupted transaction, the at least one corrupted record, or both; generating a compensating transaction based on the compensating transaction data from the transaction log and the stored record from the LSM storage; and sending the compensating transaction to the LSM storage. - View Dependent Claims (18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32)
-
-
33. 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; receive an identification of corruption in; at least one corrupted transaction of the transactions, at least one corrupted record of the records, or both; and locate, in response to the receiving the identification of the corruption, compensating transaction data in the transaction log, wherein the compensating transaction data is usable to restore the at least one corrupted transaction, the at least one corrupted record, or both; generate a compensating transaction based on the compensating transaction data from the transaction log and the stored record from the LSM storage; and send the compensating transaction to the LSM storage. - View Dependent Claims (34, 35, 36)
-
Specification