US2022114064A1PendingUtilityA1
Online restore for database engines
Est. expiryJun 7, 2037(~10.9 yrs left)· nominal 20-yr term from priority
Inventors:Anurag Windlass GuptaMurali BrahmadesamChangan HanAlexandre Olegovich VerbitskiXiaofeng BaoAlisdair William OwensXiang PengBenjamin S. EllisRaman MittalKonstantin DubinetsTiffany JiantoVenkatesh NandakumarSeungmin Wei
G06F 11/1471G06F 2201/80G06F 11/1474G06F 2201/84G06F 2201/82G06F 16/219G06F 16/2379G06F 16/2358G06F 2201/805
60
PatentIndex Score
0
Cited by
0
References
0
Claims
Abstract
Online restore operations for a database engine can be performed. A request to restore a database to a previous state can be received. Previously stored content of the database, such as snapshot stored prior to the previous state, can be identified along with log records describing changes to be made to the content prior to the previous state. State information in a query engine can be updated based on the previously stored content and log records so that queries can be processed based on the state information at the database restore to the previous state.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1 . A system, comprising:
a memory to store program instructions which, if performed by at least one processor, cause the at least one processor to perform a method to at least:
store in a data store that stores data for a database:
snapshots of different states of a database in a data store that stores data for the database; and
log records that describe changes applied to the database as part of a log in the data store;
receive a request to restore a database to a previous state;
in response to the receipt of the request:
obtain new state information for a query engine based, at least in part, one of the snapshots of the database stored prior to the previous state and one or more of the log records;
replace current state information of the query engine with the new state information; and
perform, by the query engine, one or more access requests to the database restored to the previous state.
2 . The system of claim 1 , wherein the method further comprises:
wherein the method further comprises further in response to the receipt of the request, identify a range for the log that excludes one or more log records that describe changes to be made after the previous state; and wherein the one or more access requests are performed based, at least in part, on the range in the log.
3 . The system of claim 2 , wherein the method further comprises:
receive another request to restore the database to a different previous state; in response to the receipt of the other request:
obtain other state information based, at least in part, another one of the snapshots of the database stored prior to the different previous state and one or more other log records;
replace the new state information of the query engine with the other state information; and
modify the range for the log to exclude log records that describe changes to be made after the different previous state; and
perform, by the query engine, one or more other access requests to the restored database at the different previous state based, at least in part, on the range in the log.
4 . The system of claim 1 , wherein the data store is a log-structured storage service implemented as part of the provider network, wherein the query engine is a database engine head node of a database service implemented as part of the provider network, and wherein the request to restore the database is received via a network-based interface for the database service.
5 . A method, comprising:
receiving a request to restore a database to a previous state; in response to receiving the request, updating state information of a query engine based, at least in part, on contents of the database stored prior to the previous state and one or more log records describing changes to be made to the contents of database stored prior to the previous state.
6 . The method of claim 5 , further comprising:
further in response to receiving the request, identifying a range for the log that excludes one or more log records that describe changes to be made after the previous state; and performing, by the query engine, one or more access requests to the restored database at the previous state based, at least in part, on the range in the log.
7 . The method of claim 6 , further comprising:
receiving another request to restore the database to a different previous state; in response to receiving the other request:
updating the state information of the query engine based, at least in part, on different contents of the database stored prior to the different previous state and one or more other log records describing changes to be made to the different contents of database stored prior to the different previous state;
modifying the range for the log to exclude log records that describe changes to be made after the different previous state; and
performing, by the query engine, one or more other access requests to the restored database at the different previous state based, at least in part, on the range in the log.
8 . The method of claim 7 , wherein the different previous state occurs after the previous state.
9 . The method of claim 5 , further comprising:
receiving another request to restore the database to a different previous state; in response to receiving the other request:
determining that the different previous state is not within an online restore range for the database; and
in response to determining that the different previous state is not within an online restore range for the database, denying the other request.
10 . The method of claim 9 , further comprising modifying the online restore range for the database based, at least in part, on the determination of a garbage collection sequence number for the log.
11 . The method of claim 5 , further comprising:
prior to receiving the request, storing in a data store that stores data for the database:
snapshots of different states of a database in a data store that stores data for the database, wherein the contents of the database are one of the stored snapshots; and
log records that describe changes applied to the database as part of a log in the data store including the one or more log records.
12 . The method of claim 5 , wherein the previous state corresponds to a restore point sequence number in the log, wherein the state information comprises a data page cache storing a plurality of data pages, and wherein updating the state information of the query engine comprises evaluating the data pages in the data page cache to remove those data pages with associated sequence numbers greater than the restore point sequence number.
13 . The method of claim 5 ,
wherein the data for the database, including the contents of the database and the log for the database are stored at different storage nodes in a separate distributed storage system from the query engine; and wherein updating the state information of the query engine comprises obtaining the state information from the different storage nodes.
14 . A non-transitory, computer-readable storage medium, storing program instructions that when executed by one or more computing devices cause the one or more computing devices to implement:
receiving a request to restore a database to a previous state; in response to receiving the request:
identifying contents of the database stored prior to the previous state and one or more log records describing changes to be made to the contents of database stored prior to the previous state; and
updating state information of a query engine based, at least in part, on the identified contents and log records.
15 . The non-transitory, computer-readable storage medium of claim 14 , wherein the program instructions cause the one or more computing devices to further implement:
further in response to receiving the request, identifying a range for the log that excludes one or more log records that describe changes to be made after the previous state; and performing, by the query engine, one or more access requests to the restored database at the previous state based, at least in part, on the range in the log.
16 . The non-transitory, computer-readable storage medium of claim 15 , wherein the program instructions cause the one or more computing devices to further implement:
receiving another request to restore the database to a different previous state; in response to receiving the other request:
updating the state information of the query engine based, at least in part, on different contents of the database stored prior to the different previous state and one or more other log records describing changes to be made to the different contents of database stored prior to the different previous state;
modifying the range for the log to exclude log records that describe changes to be made after the different previous state; and
performing, by the query engine, one or more other access requests to the restored database at the different previous state based, at least in part, on the range in the log.
17 . The non-transitory, computer-readable storage medium of claim 16 , wherein the different previous state occurs after the previous state and includes one or more changes made to the database after the restoration to the previous state.
18 . The non-transitory, computer-readable storage medium of claim 14 , wherein the program instructions cause the one or more computing devices to further implement:
prior to receiving the request, storing in a data store that stores data for the database:
snapshots of different states of a database in a data store that stores data for the database, wherein the contents of the database are one of the stored snapshots; and
log records that describe changes applied to the database as part of a log in the data store including the one or more log records.
19 . The non-transitory, computer-readable storage medium of claim 14 , wherein the program instructions cause the one or more computing devices to further implement:
prior to receiving the request, sending one or more restore state recommendations mapped to different events for the database, wherein the previous state is one of the restore state recommendations.
20 . The non-transitory, computer-readable storage medium of claim 14 , wherein the database is stored as part of a network-based database service and wherein the request to restore the database is received via a network-interface for the database service.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.