US2021390114A1PendingUtilityA1
Database data modification request processing
Assignee: BEIJING OCEANBASE TECH CO LTDPriority: Jul 4, 2016Filed: Aug 26, 2021Published: Dec 16, 2021
Est. expiryJul 4, 2036(~10 yrs left)· nominal 20-yr term from priority
G06F 16/2358G06F 16/2379G06F 16/27G06F 16/23G06F 11/2094G06F 11/1471
61
PatentIndex Score
0
Cited by
0
References
0
Claims
Abstract
A data modification request for modifying data in a primary database is received at the primary database. Based on the data modification request, second data in the primary database is modified to first data. Based on the data modification request, a first log and a second log are generated, where the first log is a simplified log including the first data and the second log is a complete log including the second data. Persistence processing is performed on the first log. A modification result that corresponds to the data modification request is returned.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1 . A method for processing a data modification request for a database, the method comprising:
receiving the data modification request for the database; modifying second data in the database to first data; generating a first log and a second log based on the data modification request, wherein the first log is a simplified log that includes only the first data, and the second log comprises the first data and the second data; performing persistence processing on the first log and performing persistence processing on the second log; and returning a modification result that corresponds to the data modification request after having performed persistence processing on the first log without waiting for persistence processing to have been performed on the second log.
2 . The method according to claim 1 , wherein generating the first log and the second log comprises generating the first log and the second log in a memory.
3 . The method according to claim 1 , further comprising:
including, in the second log, data that belongs to a same database record as the second data; performing persistence processing on the second log; and sending the second log to a data analysis system, so that the data analysis system performs data analysis based on the second log.
4 . The method according to claim 1 , wherein when the database is a primary database, the method further comprises:
synchronizing the first log to a secondary database of the database before returning the modification result that corresponds to the data modification request, so that the secondary database synchronizes the modification based on the first log.
5 . The method according to claim 4 , wherein after synchronizing the first log to the secondary database of the database, the method further comprises:
synchronizing, by the secondary database, the modification and generating the second log based on the first log.
6 . The method according to claim 5 , further comprising:
performing, by the secondary database, persistence processing on the first log obtained through synchronization or the second log generated based on the first log.
7 . The method according to claim 3 , wherein the first data and the second data each belong to at least one database record; and
the second log further comprises one or more of: data other than the first data in the database record that the first data belongs to, or data other than the second data in the database record that the second data belongs to.
8 . The method according to claim 1 , wherein performing the persistence processing on the first log comprises storing the first log in a nonvolatile storage device.
9 . The method according to claim 8 , wherein the first log and the second log are separately stored in different nonvolatile storage devices by using the persistence processing.
10 . The method according to claim 1 , wherein the data modification request is a data update request, a data deletion request, or a data addition request; and
neither the first data nor the second data is null when the data modification request is a data update request; or the first data is null and the second data is not null when the data modification request is a data deletion request; or the first data is not null and the second data is null when the data modification request is a data addition request.
11 . The method according to claim 1 , wherein the data modification request comprises a request for reducing a total volume of data in the database based on one or more policies.
12 . The method according to claim 1 , further comprising sending the second log to an external system.
13 . The method of claim 1 , wherein:
persistence processing on the first log and returning the modification result are performed by a main thread or process; and persistence processing on the second log is performed by another thread or process.
14 . A system, comprising:
one or more computers; and one or more computer memory devices interoperably coupled with the one or more computers and having tangible, non-transitory, machine-readable media storing one or more instructions that, when executed by the one or more computers, perform operations for processing a data modification request for a database, wherein the operations comprise: receiving the data modification request for the database; modifying second data in the database to first data; generating a first log and a second log based on the data modification request, wherein the first log is a simplified log that includes only the first data, and the second log comprises the first data and the second data; performing persistence processing on the first log and performing persistence processing on the second log; and returning a modification result that corresponds to the data modification request after having performed persistence processing on the first log without waiting for persistence processing to have been performed on the second log.
15 . The system of claim 14 , wherein generating the first log and the second log comprises generating the first log and the second log in a memory.
16 . The system according to claim 14 , wherein the operations further comprise:
including, in the second log, data that belongs to a same database record as the second data; performing persistence processing on the second log; and sending the second log to a data analysis system, so that the data analysis system performs data analysis based on the second log.
17 . The system according to claim 14 , wherein when the database is a primary database, the operations further comprise:
synchronizing the first log to a secondary database of the database before returning the modification result that corresponds to the data modification request, so that the secondary database synchronizes the modification based on the first log.
18 . The system according to claim 17 , wherein after synchronizing the first log to the secondary database of the database, the operations further comprise:
synchronizing, by the secondary database, the modification and generating the second log based on the first log.
19 . The system according to claim 14 , wherein the data modification request is a data update request, a data deletion request, or a data addition request; and
neither the first data nor the second data is null when the data modification request is a data update request; or the first data is null and the second data is not null when the data modification request is a data deletion request; or the first data is not null and the second data is null when the data modification request is a data addition request.
20 . A non-transitory, computer-readable medium storing one or more instructions executable by a computer system to perform operations for processing a data modification request for a database, wherein the operations comprise:
receiving the data modification request for the database; modifying second data in the database to first data; generating a first log and a second log based on the data modification request, wherein the first log is a simplified log that includes only the first data, and the second log comprises the first data and the second data; performing persistence processing on the first log and performing persistence processing on the second log; and returning a modification result that corresponds to the data modification request after having performed persistence processing on the first log without waiting for persistence processing to have been performed on the second log.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.