WO2018006723A1 - 一种针对数据库的数据修改请求处理方法及装置 - Google Patents
一种针对数据库的数据修改请求处理方法及装置 Download PDFInfo
- Publication number
- WO2018006723A1 WO2018006723A1 PCT/CN2017/090269 CN2017090269W WO2018006723A1 WO 2018006723 A1 WO2018006723 A1 WO 2018006723A1 CN 2017090269 W CN2017090269 W CN 2017090269W WO 2018006723 A1 WO2018006723 A1 WO 2018006723A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- data
- log
- database
- request
- modification request
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1471—Saving, restoring, recovering or retrying involving logging of persistent data for recovery
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/20—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
- G06F11/2053—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant
- G06F11/2094—Redundant storage or storage space
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2358—Change logging, detection, and notification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2379—Updates performed during online database operations; commit processing
Definitions
- the present application relates to the field of database technologies, and in particular, to a data modification request processing method and apparatus for a database.
- a database is a set of software running on a server that stores, queries, and manages large amounts of data.
- the database log is a kind of storage content used by the database, which can be used to record operations that have occurred in the database, such as data modification.
- the log can be used to restore the previous normal state; the database sends the log to another database, and the other database can also use the received log to recover the exact same copy of the database from which the log was sent. It is a method of database master-slave synchronization.
- the log includes modified data, data before modification, and even other data related to the modified data in some scenarios.
- a data modification request that a user can send to a database
- the database modifies the data and generates a log according to the data modification request, and performs persistence processing on the generated log (for example, on the hard disk), and then The user returns the modification result corresponding to the data modification request (for example, informing the user that the modification is successful).
- the generated log is generally transient, and the persistent processing is performed to prevent accidental loss such as power failure or restart.
- the database has a standby database, the database first synchronizes the generated log to the standby database, and then returns the modification result corresponding to the data modification request.
- the embodiment of the present invention provides a data modification request processing method and device for a database, which is used to solve the problem that the data modification request processing method for the database in the prior art takes a long time.
- Receiving a module receiving a data modification request for a database
- the processing module according to the data modification request, modifying the second data in the database to the first data, and generating the first log and the second log, where the first log includes the first data, where The second log includes the second data;
- the solution of the present application can generate two logs that are not necessarily identical, which are not necessarily the same, that is, the first log and the second log.
- the first data is the modified data
- the second data is the data before the modification.
- the first log may include only the first data, and does not include the second data and other data related to the modified data.
- the database state or the active/standby synchronization can be restored according to the modified data only according to the second data and other data related to the modified data, after the first log is persisted, the user can be Return the modified result, because the amount of data in the first log is less than the amount of data in the full log, the cost of the persistence process The time is also relatively small, and the data modification request processing time for the database can be reduced, and therefore, the problems in the prior art can be partially or completely solved.
- FIG. 1 is a schematic flowchart of a data modification request processing method for a database according to an embodiment of the present application
- FIG. 2 is a schematic flowchart of a data modification request processing process in an actual application scenario provided by the prior art
- FIG. 3 is a schematic flowchart of a data modification request processing process in an actual application scenario according to an embodiment of the present disclosure
- FIG. 4 is a schematic flowchart of sending a log to an external system such as a data analysis system in an actual application scenario according to an embodiment of the present application;
- FIG. 5 is a schematic diagram of a processing flow of a first log synchronized by a standby database to a received primary database in an actual application scenario according to an embodiment of the present disclosure
- FIG. 6 is a schematic diagram of interaction of each end involved in the solution of the present application in an actual application scenario (using the scenario in FIG. 2 to FIG. 4) according to an embodiment of the present application;
- FIG. 7 is a schematic structural diagram of a data modification request processing apparatus for a database according to an embodiment of the present application.
- FIG. 1 is a schematic flowchart of a data modification request processing method for a database according to an embodiment of the present application.
- the execution entity of the flow in FIG. 1 may be the database, or a functional module that does not belong to the database but may be connected to the database.
- the application does not limit the database and/or the device where the functional module is located.
- the device includes, but is not limited to, a personal computer as a server or a client, a large and medium-sized computer, a computer cluster, a mobile phone, a tablet computer, a smart watch, a car mobile station, a personal computer, and the like.
- the process in Figure 1 can include the following steps:
- S101 Receive a data modification request for a database.
- the data modification request is a request for requesting modification of data in the database, which may be manually sent by a user of the database, or automatically sent by executing an automated script.
- the data modification request includes at least one of the following requests: a data update request, a data deletion request, and a data addition request.
- This application does not limit the format of the data modification request. It can be a Structured Query Language (SQL) statement format or other formats supported by the database.
- SQL Structured Query Language
- S102 Modify, according to the data modification request, the second data in the database to the first data, and generate a first log and a second log, where the first log includes the first data, and the second The log contains the second data.
- the data modification request may indicate what kind of data modification operation is requested. Specifically, the data modification request indicates that the request modifies the second data in the database to the first data.
- the data modification request may also be a less specific request.
- a data modification request may indicate that the request reduces the total amount of data in the database by half, etc., and specifically reduces which data can be used by the database. According to a certain strategy.
- the first data or the second data may also be empty.
- the second data is not empty, and the first data is empty;
- the first data is not empty, and the second data is empty; and
- the first data is The second data is not empty.
- the present application does not limit the specific content of the first data and the second data, and may be part or all of any type of data such as a database record, or a data table, or a data index, or a data view.
- the log must include at least the first data.
- the second data and other data related to the modified data it is optional for the purpose of database recovery or active/standby synchronization, and therefore, they may not be included in the log.
- the solution of the present application is based on the idea of solving the problems in the prior art. In the prior art, there is only one type of log (referred to as a complete log for convenience of description), and the first data and the second data are included.
- the solution of the present application provides two logs, a first log and a second log, wherein the first log may be a compact log dedicated to database recovery or active/standby synchronization, which may preferably Only the first data is included (so that the amount of data of the first log can be made as small as possible), and the second log can be a complete log or an incomplete log for supplementing the first log.
- the second log may include both the second data and the first data, and may even include other data related to the modified data, and the second log may also include only the second data.
- the second log or the second log combined with the first log may also be used for database recovery or active/standby synchronization, and further, may be used for work other than database recovery or active/standby synchronization, for example, Real-time analysis of data changes in the database.
- the execution order of the two sub-steps of “modifying the second data to the first data” and “generating the first log and the second log” in step S102 is not limited.
- the modification operation is performed first, and then the corresponding log is generated; however, in order to prevent the log from being lost due to an abnormality such as a power failure during the execution of the modification operation, in the actual application, the log may be performed, and the corresponding modification operation may be performed.
- the log can be rolled back according to the actual state of the data in the restored database, which is beneficial to ensure that neither the lost log nor the included log is included in the log after the rollback. Generate an error or redundant log.
- the first log and the second log generated in step S102 may be generated in a memory or a cache, and are generated in a temporary, non-stable state.
- the first log and the second log generated will also be lost, and subsequent database recovery or active/standby synchronization or other functions that require logging will not be performed.
- the first log may be persisted, and then the corresponding modification result may be returned to the sender of the data modification request to ensure that, even if this happens, at least the persistent processing may be utilized.
- the second log may also be persisted.
- the persistence processing on the second log may not be placed on the critical path of the data modification request processing flow.
- the flow in FIG. 1 does not include “persistent processing on the second log”, the flow in FIG. Execution of any step of the step does not have to be based on "persistence of the second log”.
- the process in FIG. 1 can be executed by a main thread or process, and the second log can be persisted by another thread (for example, a background thread, etc.) or a process, and the two actions can interfere with each other.
- the specific content included in the returned modification result is not limited.
- the modification result may include only the description content of whether the modification is successful, or may include the description content of the data specifically modified.
- execution bodies of the steps of the process in FIG. 1 may all be the same device, or may be different devices.
- the execution body of step S101 and step S102 may be device 1
- the execution body of step S103 may be device 2;
- the execution body of step S101 may be device 1
- the execution body of step S102 and step S103 may be device 2 ;and many more.
- a complete log containing modified data, pre-modification data, and other data related to the modified data is generated in the prior art.
- the solution of the present application can generate two not necessarily complete logs, which are not identical, that is, the first log and the second log.
- the first data is the modified data
- the second data is the data before the modification.
- the first log may include only the first data, and does not include the second data and other data related to the modified data.
- the database state or the active/standby synchronization can be restored according to the modified data only according to the second data and other data related to the modified data, after the first log is persisted, the user can be Returning the modified result, since the data volume of the first log is less than the data volume of the complete log, the time taken for the persistence processing is relatively small, and the processing time of the data modification request for the database can be reduced, so that the solution can be partially or completely solved. There are technical problems.
- the second log since the second log is also generated in the solution of the present application, the second log may be a complete log or an incomplete log for supplementing the first log. Therefore, compared with the log in the prior art, the total log content is not lacking, and the resources used for generating the log are also similar.
- the prior art can be based on the function implemented by the log, and the solution of the present application is still Can be achieved.
- the embodiments of the present application further provide some specific implementation manners of the foregoing methods, and an extended solution, which will be described below.
- the persistence process may include saving to a non-volatile storage device, and more specifically, recording to a file in a format, and saving the file to the non-volatile storage device.
- the non-volatile storage device may specifically refer to a storage device that loses power and does not lose stored data, such as a hard disk, a read only memory (ROM), an erasable programmable read only memory (EPROM), and an electrically erasable read only. Memory (EEPROM), flash memory, etc.
- the generated record can be saved to text, saved to a hard disk, and so on.
- the log in addition to being used for primary and secondary database synchronization and database recovery, the log may have other uses, for example, for analyzing data and the like.
- the second log can be used to implement the other uses described below.
- the database connection has an external system such as a data analysis system
- the database log can be provided to the external system for other purposes.
- the data analysis system Take the data analysis system as an example, the data points
- the analysis system can perform real-time or non-real-time analysis on the data changes in the database according to the log sent by the database, and provide the analysis result to relevant users or organizations.
- the data analysis system needs the log to include the modified data (that is, the first data), and the data before the modification (that is, the second data), and even Need to include other relevant data (for example, other data belonging to the same database record as the modified data, etc.).
- the second log can meet the requirements of the data analysis system. Specifically, after the second log is generated or after the second log is persisted, the second log may be sent to the data analysis system, so that the data analysis system performs data analysis according to the second log. This application does not limit the specific analysis content of the data analysis system.
- the modification result may not be returned temporarily, but the first log is synchronized to the standby database or other After the device, return the modified result.
- the storage device used for persisting the first log is faulty, it can still be from the standby database or other. The device retrieves the first log.
- the first log may be synchronized to the standby database of the database, so as to facilitate the standby database.
- the modification is synchronized according to the first log.
- the first log is a reduced log containing only the first data
- the second log is a complete log including at least the first data and the second data, based on FIG. 2 and FIG.
- FIG. 2 is a schematic flowchart of a data modification request processing process in an actual application scenario provided by the prior art. Assuming that the execution subject of the process in FIG. 2 is a master database, the process may include the following steps:
- S201 The primary database receives a data modification request sent by the user.
- S202 The primary database performs a corresponding data modification operation according to the data modification request.
- S203 The primary database generates a second log in the memory according to the data modification request or the data modification operation performed.
- S204 The primary database performs persistence processing on the generated second log.
- S205 The primary database synchronizes the second log of the persistent processing to the standby database.
- step S206 may not be performed until the abnormality is eliminated.
- FIG. 3 is a schematic flowchart of a data modification request processing process in an actual application scenario according to an embodiment of the present disclosure. Assuming that the execution body of the process in FIG. 3 is also a master database, the process may include the following steps:
- S301 The primary database receives a data modification request sent by the user.
- S302 The primary database performs a corresponding data modification operation according to the data modification request.
- S303 The primary database generates the first log and the second log in the memory according to the data modification request or the performed data modification operation.
- S304 The primary database performs persistence processing on the generated first log.
- S305 The primary database synchronizes the first log of the persistent processing to the standby database.
- step S306 may not be performed until the abnormality is eliminated.
- the primary database is synchronized with the database.
- the synchronization log also needs to occupy the corresponding bandwidth and the corresponding time. Since the data volume of the first log is smaller than the data volume of the second log, the solution of the present application can be reduced compared to the prior art. The bandwidth and/or time spent synchronizing the logs.
- the embodiment of the present application further provides a schematic diagram of a process of sending a log to an external system such as a data analysis system in an actual application scenario, as shown in FIG. 4 .
- the process may include the following steps:
- S401 The primary database detects a newly generated second log in the memory.
- S402 The primary database acquires the newly generated second log.
- S403 The primary database performs persistence processing on the obtained second log.
- S404 The primary database sends the second log to a predetermined external system.
- the standby database may also perform operations such as persistence processing and/or sending to an external system.
- operations such as persistence processing and/or sending to an external system.
- the specific operation process is different from the prior art. The following describes the related operations of the standby database.
- the standby database receives the complete log (that is, the second log in the above example), and therefore, the received log can be directly processed and/or sent to an external system or the like.
- the standby database receives the reduced log (that is, the first log in the above example), and can only directly perform the persistence processing on the received log, and is not suitable for sending to the external system.
- the standby database may also have the requirement to use the full log. Therefore, the standby database may first obtain a corresponding complete log according to the thin log, and then the persistent log may be persistently processed and/or sent to an external system. In this way, the consistency of the logs in the primary and secondary databases can be improved.
- the standby database may execute: the standby database synchronizes the modification according to the first log, and generates the second log. . Further, the standby database may further perform: the standby database performs persistence processing on the first log obtained by synchronization and/or the second log generated according to the first log; The second log is sent to a predetermined external system.
- the embodiment of the present application provides a schematic diagram of a processing flow of a first log synchronized by a standby database to a received primary database in a practical application scenario (using the scenario in FIG. 2 to FIG. 4), as shown in FIG. 5 .
- the process may include Next steps:
- the standby database receives the first log of the synchronization of the primary database.
- S502 The standby database performs persistence processing on the received first log.
- S504 The standby database synchronizes the data modification operation and generates the second log in the memory by playing back.
- S505 The standby database performs the persistence processing on the second log.
- the first log and the second log may be generated.
- the persistent operation is performed.
- the first log and the second log may be separately stored in different non-volatile storage devices.
- the reading of the two logs can be performed based on the performance of the respective storage device (such as bandwidth, read speed, etc.), and can be performed in parallel.
- the full log or the second log may include other data related to the modified data in addition to the first data and the second data.
- the “other data related to the modified data” that may be included in the second log includes but is not limited to: the database record of the first data belongs to Data other than the first data, and/or data other than the second data in the database record to which the second data belongs.
- Table 1 is a part of a data table in a database, including three database records a, b, c, each record contains n key value pairs, n keys are respectively column_1-column_n, each The values corresponding to each key in the database record are shown in Table 1.
- Table 1 For the convenience of description, the following is the key value pair and the row number of the database record to which it belongs, represented by ⁇ row>: ⁇ key,value>, "key” represents the key, "value” represents the value, and row represents the database of the key value pair. The line number of the record.
- the first data is ⁇ a>: ⁇ column_2, a_2'> and ⁇ b>: ⁇ column_2,b_2'>
- the second data is ⁇ a>: ⁇ column_2, a_2> and ⁇ b>: ⁇ column_2 , b_2>.
- Other data related to the modified data may include: data other than the modified data in the record a and the record b, that is, ⁇ a>: ⁇ column_1, a_1>, ..., ⁇ a>: ⁇ column_n , a_n>, and ⁇ b>: ⁇ column_1,b_1>,..., ⁇ b>: ⁇ column_n,b_n>.
- the generated first log may contain only the first data, and not the second data and other data related to the modified data, as follows:
- the generated second log can contain both the first data and the second data as well as other data related to the modified data, as follows:
- ⁇ b> second data and other data related to the modified data: ⁇ column_1, a_1>, ⁇ column_2, a_2>, ..., ⁇ column_n, a_n>; first data: ⁇ column_2, a_2'>".
- the embodiment of the present application further provides a schematic diagram of interaction between the ends of the solution according to the scenario of the application in the application scenario (using the scenario in FIG. 2 to FIG. 4). Shown.
- Figure 6 mainly includes four ends, which are user, primary database, standby database, and data analysis system.
- the steps corresponding to the reference numerals 1-5 in FIG. 6 are the main steps of the data modification request processing method provided by the embodiment of the present application, and the unmarked steps are the secondary steps, and each step has been separately described above. Do not repeat them.
- the above is a data modification request processing method for the database provided by the embodiment of the present application. Based on the same idea, the embodiment of the present application further provides a corresponding device, as shown in FIG. 7 .
- FIG. 7 is a schematic structural diagram of a data modification request processing apparatus for a database according to an embodiment of the present disclosure, including:
- the receiving module 701 receives a data modification request for a database
- the processing module 702 according to the data modification request, modify the second data in the database to the first data, and generate the first log and the second log, where the first log includes the first data, The second log includes the second data;
- the returning module 703 returns the modification result corresponding to the data modification request after performing the persistence processing on the first log.
- the second log further includes the first data.
- the processing module 702 generates a first log and a second log in the memory.
- processing module 702 further performs persistence processing on the second log.
- the device further includes:
- the sending device 704 sends the second log to the data analysis system to facilitate the data segmentation
- the analysis system performs data analysis according to the second log.
- the device when the database is a primary database, the device further includes:
- the synchronization module 705 synchronizes the first log to the standby database of the database before the returning module 703 returns the modification result corresponding to the data modification request, so that the standby database synchronizes according to the first log. Said the amendment.
- the first data belongs to at least one database record
- the second log further includes: data other than the first data in the database record to which the first data belongs, and/or data other than the second data in the database record to which the second data belongs .
- the persistence process includes saving to a non-volatile storage device.
- the persisting process includes: saving to a non-volatile storage device;
- the first log and the second log are respectively saved in different non-volatile storage devices by the persistence processing.
- the data modification request is a data update request, or a data deletion request, or a data addition request;
- the data modification request is a data update request
- the first data and the second data are not empty
- the data modification request is a data deletion request
- the first data is empty
- the second data is not empty
- the data modification request is a data addition request
- the first data is not empty
- the second data is empty.
- the device in FIG. 7 may specifically be located in a database or a functional module that does not belong to the database but can be connected to the database.
- the device provided by the present application is in one-to-one correspondence with the method provided by the present application. Therefore, the device also has similar beneficial technical effects as the method, since the beneficial technical effects of the method have been described in detail above. Therefore, the beneficial technical effects of the device will not be described again here.
- embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
- computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
- the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
- the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
- These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
- the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
- a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
- processors CPUs
- input/output interfaces network interfaces
- memory volatile and non-volatile memory
- the memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory.
- RAM random access memory
- ROM read only memory
- Memory is an example of a computer readable medium.
- Computer readable media including both permanent and non-permanent, removable and non-removable media What methods or techniques are used to implement information storage.
- the information can be computer readable instructions, data structures, modules of programs, or other data.
- Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device.
- computer readable media does not include temporary storage of computer readable media, such as modulated data signals and carrier waves.
Abstract
Description
column_1 | column_2 | … | column_n | |
a | a_1 | a_2 | … | a_n |
b | b_1 | b_2 | … | b_n |
c | c_1 | c_2 | … | c_n |
… | … | … | … | … |
column_1 | column_2 | … | column_n | |
a | a_1 | a_2’ | … | a_n |
b | b_1 | b_2’ | … | b_n |
c | c_1 | c_2 | … | c_n |
… | … | … | … | … |
Claims (22)
- 一种针对数据库的数据修改请求处理方法,其特征在于,包括:接收针对数据库的数据修改请求;根据所述数据修改请求,将所述数据库中的第二数据修改为第一数据,以及生成第一日志和第二日志,所述第一日志包含所述第一数据,所述第二日志包含所述第二数据;在对所述第一日志进行持久化处理后,返回所述数据修改请求对应的修改结果。
- 如权利要求1所述的方法,其特征在于,所述第二日志还包含所述第一数据。
- 如权利要求2所述的方法,其特征在于,生成第一日志和第二日志,具体包括:在内存中生成第一日志和第二日志。
- 如权利要求2所述的方法,其特征在于,所述方法还包括:对所述第二日志进行持久化处理。
- 如权利要求2所述的方法,其特征在于,所述方法还包括:将所述第二日志发送给数据分析系统,以便于所述数据分析系统根据所述第二日志进行数据分析。
- 如权利要求2所述的方法,其特征在于,当所述数据库为主数据库时,返回所述数据修改请求对应的修改结果前,所述方法还包括:将所述第一日志同步给所述数据库的备数据库,以便于所述备数据库根据所述第一日志,同步所述修改。
- 如权利要求6所述的方法,其特征在于,将所述第一日志同步给所述数据库的备数据库后,所述方法还包括:所述备数据库根据所述第一日志,同步所述修改,以及生成所述第二日志。
- 如权利要求7所述的方法,其特征在于,所述方法还包括:所述备数据库对同步得到的所述第一日志和/或根据所述第一日志生成的所述第二日志进行持久化处理。
- 如权利要求1~5任一项所述的方法,其特征在于,所述第一数据、所述第二数据属于至少一条数据库记录;所述第二日志还包含:所述第一数据所属数据库记录中除了所述第一数据之外的数据、和/或所述第二数据所属数据库记录中除了所述第二数据之外的数据。
- 如权利要求1~8任一项所述的方法,其特征在于,所述持久化处理包括:保存至非易失性存储设备中。
- 如权利要求1~4所述的方法,其特征在于,所述持久化处理包括:保存至非易失性存储设备中;所述第一日志与所述第二日志通过所述持久化处理,被分别保存在不同的非易失性存储设备中。
- 如权利要求1~8所述的方法,其特征在于,所述数据修改请求为数据更新请求、或数据删除请求、或数据增加请求;当所述数据修改请求为数据更新请求时,所述第一数据、所述第二数据均不为空;当所述数据修改请求为数据删除请求时,所述第一数据为空,所述第二数据不为空;当所述数据修改请求为数据增加请求时,所述第一数据不为空,所述第二数据为空。
- 一种针对数据库的数据修改请求处理装置,其特征在于,包括:接收模块,接收针对数据库的数据修改请求;处理模块,根据所述数据修改请求,将所述数据库中的第二数据修改为第一数据,以及生成第一日志和第二日志,所述第一日志包含所述第一数据,所述第二日志包含所述第二数据;返回模块,在对所述第一日志进行持久化处理后,返回所述数据修改请求对应的修改结果。
- 如权利要求13所述的装置,其特征在于,所述第二日志还包含所述第一数据。
- 如权利要求14所述的装置,其特征在于,所述处理模块,在内存中生成第一日志和第二日志。
- 如权利要求14所述的装置,所述处理模块,还对所述第二日志进行持久化处理。
- 如权利要求14所述的装置,其特征在于,所述装置还包括:发送装置,将所述第二日志发送给数据分析系统,以便于所述数据分析系统根据所述第二日志进行数据分析。
- 如权利要求14所述的装置,其特征在于,当所述数据库为主数据库时,所述装置还包括:同步模块,在所述返回模块返回所述数据修改请求对应的修改结果前,将所述第一日志同步给所述数据库的备数据库,以便于所述备数据库根据所述第一日志,同步所述修改。
- 如权利要求13~18任一项所述的装置,其特征在于,所述第一数据属于至少一条数据库记录;所述第二日志还包含:所述第一数据所属数据库记录中除了所述第一数据之外的数据、和/或所述第二数据所属数据库记录中除了所述第二数据之外的数据。
- 如权利要求13~18任一项所述的装置,其特征在于,所述持久化处理包括:保存至非易失性存储设备中。
- 如权利要求13~18任一项所述的装置,其特征在于,所述持久化处理包括:保存至非易失性存储设备中;所述第一日志与所述第二日志通过所述持久化处理,被分别保存在不同的 非易失性存储设备中。
- 如权利要求13~18任一项所述的装置,其特征在于,所述数据修改请求为数据更新请求、或数据删除请求、或数据增加请求;当所述数据修改请求为数据更新请求时,所述第一数据、所述第二数据均不为空;当所述数据修改请求为数据删除请求时,所述第一数据为空,所述第二数据不为空;当所述数据修改请求为数据增加请求时,所述第一数据不为空,所述第二数据为空。
Priority Applications (8)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP17823535.4A EP3480705B1 (en) | 2016-07-04 | 2017-06-27 | Database data modification request processing method and apparatus |
SG11201811808VA SG11201811808VA (en) | 2016-07-04 | 2017-06-27 | Database data modification request processing method and apparatus |
MYPI2019000224A MY189491A (en) | 2016-07-04 | 2017-06-27 | Database data modification request processing method and apparatus |
JP2019500305A JP6987340B2 (ja) | 2016-07-04 | 2017-06-27 | データベースのデータ変更要求処理方法及び装置 |
KR1020197003517A KR102248386B1 (ko) | 2016-07-04 | 2017-06-27 | 데이터베이스 데이터 수정 요청 처리 방법 및 장치 |
US16/240,549 US11106695B2 (en) | 2016-07-04 | 2019-01-04 | Database data modification request processing |
US16/722,469 US11132379B2 (en) | 2016-07-04 | 2019-12-20 | Database data modification request processing |
US17/458,168 US20210390114A1 (en) | 2016-07-04 | 2021-08-26 | Database data modification request processing |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610518735.2 | 2016-07-04 | ||
CN201610518735.2A CN106897338A (zh) | 2016-07-04 | 2016-07-04 | 一种针对数据库的数据修改请求处理方法及装置 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US16/240,549 Continuation US11106695B2 (en) | 2016-07-04 | 2019-01-04 | Database data modification request processing |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018006723A1 true WO2018006723A1 (zh) | 2018-01-11 |
Family
ID=59191565
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2017/090269 WO2018006723A1 (zh) | 2016-07-04 | 2017-06-27 | 一种针对数据库的数据修改请求处理方法及装置 |
Country Status (9)
Country | Link |
---|---|
US (3) | US11106695B2 (zh) |
EP (1) | EP3480705B1 (zh) |
JP (1) | JP6987340B2 (zh) |
KR (1) | KR102248386B1 (zh) |
CN (1) | CN106897338A (zh) |
MY (1) | MY189491A (zh) |
SG (1) | SG11201811808VA (zh) |
TW (1) | TWI701567B (zh) |
WO (1) | WO2018006723A1 (zh) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106897338A (zh) | 2016-07-04 | 2017-06-27 | 阿里巴巴集团控股有限公司 | 一种针对数据库的数据修改请求处理方法及装置 |
CN110209642A (zh) * | 2018-02-05 | 2019-09-06 | 北京智明星通科技股份有限公司 | 信息处理的方法、装置、服务器及计算机可读介质 |
CN110851486A (zh) * | 2018-07-26 | 2020-02-28 | 珠海格力电器股份有限公司 | 数据存储方法及装置 |
CN110134653B (zh) * | 2019-05-17 | 2021-09-07 | 杭州安恒信息技术股份有限公司 | 一种利用日志辅助数据库审计方法及系统 |
CN112416924A (zh) * | 2019-08-22 | 2021-02-26 | 富泰华工业(深圳)有限公司 | 数据同步查询方法、装置、计算机装置及存储介质 |
CN110543386B (zh) * | 2019-09-16 | 2022-06-10 | 上海达梦数据库有限公司 | 一种数据存储方法、装置、设备和存储介质 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1848071A (zh) * | 2005-03-24 | 2006-10-18 | 株式会社东芝 | 计算机系统、盘装置以及数据更新控制方法 |
CN101681317A (zh) * | 2008-03-01 | 2010-03-24 | 株式会社东芝 | 存储器系统 |
US20140089263A1 (en) * | 2012-09-27 | 2014-03-27 | Sony Corporation | File recording apparatus, file system management method, and changer drive |
CN104537037A (zh) * | 2014-12-23 | 2015-04-22 | 杭州华为数字技术有限公司 | 一种处理数据库日志的方法及装置 |
Family Cites Families (30)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5430869A (en) * | 1991-05-29 | 1995-07-04 | Hewlett-Packard Company | System and method for restructuring a B-Tree |
US5701480A (en) | 1991-10-17 | 1997-12-23 | Digital Equipment Corporation | Distributed multi-version commitment ordering protocols for guaranteeing serializability during transaction processing |
WO1996027157A1 (fr) * | 1995-02-28 | 1996-09-06 | Ntt Data Communications Systems Corporation | Systeme associatif decentralise et traitements de journaux et de reprise dans celui-ci |
US6510421B1 (en) * | 1998-12-29 | 2003-01-21 | Oracle Corporation | Performing 2-phase commit with presumed prepare |
US6981004B2 (en) * | 2002-09-16 | 2005-12-27 | Oracle International Corporation | Method and mechanism for implementing in-memory transaction logging records |
JP4186602B2 (ja) * | 2002-12-04 | 2008-11-26 | 株式会社日立製作所 | ジャーナルログを利用した更新データ書込方法 |
US7168001B2 (en) | 2004-02-06 | 2007-01-23 | Hewlett-Packard Development Company, L.P. | Transaction processing apparatus and method |
JP4582297B2 (ja) * | 2004-06-25 | 2010-11-17 | 日本電気株式会社 | レプリケーションシステム、装置、方法、およびプログラム |
US8185551B2 (en) * | 2007-06-08 | 2012-05-22 | Massachusetts Institute Of Technology | Disk-resident streaming dictionary |
WO2009107506A1 (en) * | 2008-02-29 | 2009-09-03 | Kabushiki Kaisha Toshiba | Memory system |
JP4870190B2 (ja) * | 2009-04-27 | 2012-02-08 | 株式会社日立製作所 | データ処理方法、計算機、及びデータ処理プログラム |
US10430298B2 (en) * | 2010-10-28 | 2019-10-01 | Microsoft Technology Licensing, Llc | Versatile in-memory database recovery using logical log records |
CN102024021A (zh) * | 2010-11-04 | 2011-04-20 | 曙光信息产业(北京)有限公司 | 一种逻辑文件系统元数据的日志方法 |
CN102270225B (zh) * | 2011-06-28 | 2015-10-21 | 用友网络科技股份有限公司 | 数据变更日志监控方法和数据变更日志监控装置 |
CN103166785A (zh) * | 2011-12-15 | 2013-06-19 | 同程网络科技股份有限公司 | 基于Hadoop的分布式日志分析系统 |
JP2013178685A (ja) * | 2012-02-29 | 2013-09-09 | Nec Corp | 非同期バックアップ機能を有するデータ処理システム、フロントシステム、バックアップ方法、及びそのためのプログラム |
US9396220B2 (en) * | 2014-03-10 | 2016-07-19 | Oracle International Corporation | Instantaneous unplug of pluggable database from one container database and plug into another container database |
US10706009B2 (en) * | 2013-03-14 | 2020-07-07 | Oracle International Corporation | Techniques to parallelize CPU and IO work of log writes |
US9514007B2 (en) * | 2013-03-15 | 2016-12-06 | Amazon Technologies, Inc. | Database system with database engine and separate distributed storage service |
US9098453B2 (en) * | 2013-07-11 | 2015-08-04 | International Business Machines Corporation | Speculative recovery using storage snapshot in a clustered database |
CN104462127B (zh) * | 2013-09-22 | 2018-07-20 | 阿里巴巴集团控股有限公司 | 一种记录数据更新方法及装置 |
US10230796B2 (en) * | 2014-05-30 | 2019-03-12 | Apple Inc. | Intelligent disk space manager |
US10545987B2 (en) * | 2014-12-19 | 2020-01-28 | Pure Storage, Inc. | Replication to the cloud |
US9811493B2 (en) * | 2015-05-29 | 2017-11-07 | Toshiba Memory Corporation | Semiconductor device |
JP6556851B2 (ja) * | 2015-09-08 | 2019-08-07 | 株式会社東芝 | データベースシステム、サーバ装置、プログラムおよび情報処理方法 |
US10296661B2 (en) | 2015-09-11 | 2019-05-21 | Salesforce.Com, Inc. | Processing log files using a database system |
US10747739B1 (en) * | 2015-09-18 | 2020-08-18 | Amazon Technologies, Inc. | Implicit checkpoint for generating a secondary index of a table |
EP3365808B1 (en) * | 2015-10-23 | 2021-08-25 | Oracle International Corporation | Proxy databases |
CN107046552B (zh) * | 2016-02-05 | 2020-10-23 | 华为技术有限公司 | 基于心跳的数据同步装置、方法及分布式存储系统 |
CN106897338A (zh) | 2016-07-04 | 2017-06-27 | 阿里巴巴集团控股有限公司 | 一种针对数据库的数据修改请求处理方法及装置 |
-
2016
- 2016-07-04 CN CN201610518735.2A patent/CN106897338A/zh active Pending
-
2017
- 2017-06-09 TW TW106119326A patent/TWI701567B/zh active
- 2017-06-27 EP EP17823535.4A patent/EP3480705B1/en active Active
- 2017-06-27 SG SG11201811808VA patent/SG11201811808VA/en unknown
- 2017-06-27 JP JP2019500305A patent/JP6987340B2/ja active Active
- 2017-06-27 MY MYPI2019000224A patent/MY189491A/en unknown
- 2017-06-27 KR KR1020197003517A patent/KR102248386B1/ko active IP Right Grant
- 2017-06-27 WO PCT/CN2017/090269 patent/WO2018006723A1/zh unknown
-
2019
- 2019-01-04 US US16/240,549 patent/US11106695B2/en active Active
- 2019-12-20 US US16/722,469 patent/US11132379B2/en active Active
-
2021
- 2021-08-26 US US17/458,168 patent/US20210390114A1/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1848071A (zh) * | 2005-03-24 | 2006-10-18 | 株式会社东芝 | 计算机系统、盘装置以及数据更新控制方法 |
CN101681317A (zh) * | 2008-03-01 | 2010-03-24 | 株式会社东芝 | 存储器系统 |
US20140089263A1 (en) * | 2012-09-27 | 2014-03-27 | Sony Corporation | File recording apparatus, file system management method, and changer drive |
CN104537037A (zh) * | 2014-12-23 | 2015-04-22 | 杭州华为数字技术有限公司 | 一种处理数据库日志的方法及装置 |
Non-Patent Citations (1)
Title |
---|
See also references of EP3480705A4 * |
Also Published As
Publication number | Publication date |
---|---|
EP3480705A1 (en) | 2019-05-08 |
US20200125581A1 (en) | 2020-04-23 |
US11132379B2 (en) | 2021-09-28 |
JP2019527883A (ja) | 2019-10-03 |
EP3480705B1 (en) | 2021-08-04 |
CN106897338A (zh) | 2017-06-27 |
US20190155817A1 (en) | 2019-05-23 |
SG11201811808VA (en) | 2019-02-27 |
TW201804346A (zh) | 2018-02-01 |
KR20190026846A (ko) | 2019-03-13 |
JP6987340B2 (ja) | 2021-12-22 |
MY189491A (en) | 2022-02-16 |
US11106695B2 (en) | 2021-08-31 |
US20210390114A1 (en) | 2021-12-16 |
KR102248386B1 (ko) | 2021-05-07 |
EP3480705A4 (en) | 2019-05-08 |
TWI701567B (zh) | 2020-08-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2018006723A1 (zh) | 一种针对数据库的数据修改请求处理方法及装置 | |
US11256715B2 (en) | Data backup method and apparatus | |
US10713654B2 (en) | Enterprise blockchains and transactional systems | |
JP6921107B2 (ja) | サービス処理方法、デバイス、及びシステム | |
US11010262B2 (en) | Database system recovery using preliminary and final slave node replay positions | |
TWI689181B (zh) | 資料處理方法和系統 | |
US8276022B2 (en) | Efficient failure detection for long running data transfer jobs | |
US8615488B2 (en) | Physical replication of database subset to improve availability and reduce resource cost in a cloud environment | |
WO2019037617A1 (zh) | 数据事务处理方法、装置以及电子设备 | |
WO2021147935A1 (zh) | 一种日志回放方法及装置 | |
US11748215B2 (en) | Log management method, server, and database system | |
WO2021169496A1 (zh) | 数据读取方法、装置、设备及存储介质 | |
US20180121531A1 (en) | Data Updating Method, Device, and Related System | |
CN112835885A (zh) | 一种分布式表格存储的处理方法、装置及系统 | |
CN109829678B (zh) | 一种回滚处理方法、装置以及电子设备 | |
CN109542860B (zh) | 基于hdfs的业务数据管理方法、终端设备 | |
CN115658391A (zh) | 基于QianBase MPP数据库的WAL机制的备份恢复方法 | |
CN115640353A (zh) | 数据读取方法、计算机存储介质和电子设备 | |
WO2022041672A1 (zh) | 分布式数据库系统的全量备份方法、装置及计算机可读存储介质 | |
CN112948389A (zh) | 基于md5的数据库表数据比对方法及设备 | |
CN106155837B (zh) | 一种主备库数据修复的方法以及装置 | |
CN113360476B (zh) | 一种程序数据库虚拟化插拔的方法及设备 | |
WO2024082693A1 (zh) | 数据处理方法及装置 | |
WO2021259240A1 (zh) | 分布式事务处理方法、终端及计算机可读存储介质 | |
CN117785900A (zh) | 数据更新方法、装置、计算机设备和存储介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17823535 Country of ref document: EP Kind code of ref document: A1 |
|
ENP | Entry into the national phase |
Ref document number: 2019500305 Country of ref document: JP Kind code of ref document: A |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
ENP | Entry into the national phase |
Ref document number: 20197003517 Country of ref document: KR Kind code of ref document: A |
|
ENP | Entry into the national phase |
Ref document number: 2017823535 Country of ref document: EP Effective date: 20190204 |