WO2021012932A1 - 事务回滚方法及装置、数据库、***、计算机存储介质 - Google Patents
事务回滚方法及装置、数据库、***、计算机存储介质 Download PDFInfo
- Publication number
- WO2021012932A1 WO2021012932A1 PCT/CN2020/100246 CN2020100246W WO2021012932A1 WO 2021012932 A1 WO2021012932 A1 WO 2021012932A1 CN 2020100246 W CN2020100246 W CN 2020100246W WO 2021012932 A1 WO2021012932 A1 WO 2021012932A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- transaction
- rollback
- log
- native
- transaction rollback
- 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/21—Design, administration or maintenance of databases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/18—File system types
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/18—File system types
- G06F16/1805—Append-only file systems, e.g. using logs or journals to store data
- G06F16/1815—Journaling file systems
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Definitions
- the present disclosure relates to the technical field of transaction rollback, and more specifically, to a transaction rollback method, a transaction rollback device, a database, a system, and a computer storage medium.
- Typical scenarios are distributed transaction consistency recovery and misoperation recovery.
- the distributed transaction consistency recovery scenario requires Each data node rolls back to a consistent state, involving multiple data nodes performing transaction rollbacks at the same time, which has high performance requirements. Misoperation recovery is often faced by database operation and maintenance personnel, and it is also a function that mature database products should have.
- this disclosure proposes a fast database rollback method based on transaction logs to improve the rollback performance and further expand the application scenarios of transaction logs.
- the transaction rollback method, transaction rollback device, database, system, and computer storage medium provided by the embodiments of the present invention mainly solve the technical problem that the transaction rollback method in the prior art can no longer meet the requirements for high performance of multiple transactions. Rolling performance is low.
- an embodiment of the present invention provides a transaction rollback method, and the transaction rollback method includes:
- the native transaction log file within the preset time range is parsed; the transaction to be rolled back is determined, and the transaction rollback log is generated according to the native transaction log corresponding to the transaction to be rolled back;
- the transaction rollback log assembly generates a transaction rollback log file, and the transaction rollback log file is executed.
- the embodiment of the present invention also provides a transaction rollback device.
- the transaction rollback device includes a native transaction rollback control module and a transaction rollback log execution module; the native transaction rollback control module is used for receiving a transaction
- the native transaction rollback control module is used for receiving a transaction
- the native transaction log file within the preset time range is parsed; the transaction to be rolled back is determined, and the transaction rollback log is generated according to the native transaction log corresponding to the transaction to be rolled back; the transaction is returned in reverse order
- the roll log assembly generates a transaction rollback log file; the transaction rollback log execution module is used to execute the transaction rollback log file.
- the embodiment of the present invention also provides a database, and the database includes the aforementioned transaction rollback device.
- the embodiment of the present invention also provides a system, the system includes the above-mentioned database, and the system includes a transaction rollback system based on a MySQL database, or a data recovery system based on a MariaDB distributed cluster.
- the embodiment of the present invention also provides a computer storage medium, the computer storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to realize the transaction response as described above. Steps of rolling method.
- the beneficial effects of the present invention are: the transaction rollback method, transaction rollback device, database, system, and computer storage medium provided by the embodiments of the present invention, when a transaction rollback request is received, the original transaction within the preset time range
- the log file is analyzed to determine the transaction to be rolled back, and the transaction rollback log is generated according to the native transaction log corresponding to the transaction to be rolled back. Further, the transaction rollback log is assembled in reverse order to generate the transaction rollback log file, and the transaction rollback is performed Log file; solves the problem that the transaction rollback method in the prior art can no longer meet the high-performance requirements for multiple transactions and the low rollback performance. That is, the transaction rollback method, transaction rollback device, database, and system provided by the embodiments of the present invention effectively improve the performance of transaction rollback, especially for batch transaction rollback.
- FIG. 1 is a schematic diagram of the basic flow of a transaction rollback method provided by Embodiment 1 of the present invention
- FIG. 2 is a schematic diagram of a basic process for generating a native transaction log file according to Embodiment 1 of the present invention
- Embodiment 3 is a schematic structural diagram of a feasible transaction rollback device provided by Embodiment 3 of the present invention.
- Embodiment 4 is a schematic structural diagram of another feasible transaction rollback device provided by Embodiment 3 of the present invention.
- FIG. 5 is a schematic diagram of a transaction rollback system based on MySQL database provided by the fourth embodiment of the present invention.
- Fig. 6 is a schematic diagram of a data recovery system based on MariaDB distributed cluster provided by the fourth embodiment of the present invention.
- S201 Record the data changes of each transaction and the correlation between each transaction.
- S202 Allocate a global transaction identifier for each transaction, and the global transaction identifier includes a database instance identifier and a global sequence identifier.
- the database instance ID refers to which database instance the current transaction is executed on
- the global sequence ID refers to the ID of the current transaction in a certain database.
- the global sequence ID starts from 1 and increases in sequence.
- S203 Assign the same batch number to each transaction that does not have relevance.
- the same batch number can be assigned to each transaction that is not related, so that the subsequently generated transaction rollback log retains the batch number of each transaction in the native transaction log. That is, the concurrency relationship of each transaction execution in the native transaction log is retained.
- the generated native transaction log includes not only the data changes before and after the data operation, but also the global transaction identifier and batch number.
- the native transaction log corresponds to a single transaction, so the native transaction log can be assembled in reverse order to generate a transaction rollback log file for storage.
- the native transaction log file includes a binary log binlog file.
- S102 Determine the transaction to be rolled back, and generate a transaction rollback log according to the native transaction log corresponding to the transaction to be rolled back.
- the log directory is filtered according to the preset time range to obtain the native transaction log files to be parsed, and then these native transaction log files are parsed in parallel, and based on the global transaction Identify, locate the transaction to be rolled back, and determine the transaction to be rolled back.
- determining the transaction to be rolled back, and then generating the transaction rollback log according to the native transaction log corresponding to the transaction to be rolled back includes: performing reverse operations on the native transaction log corresponding to the transaction to be rolled back, and performing reverse operations.
- the protocol format of the transaction rollback log generated after the operation remains the same as the protocol format of the native transaction log.
- the native transaction log records the table data before and after the execution of each statement operation. Inserting and deleting records requires modifying the operation type, while updating records requires exchanging the table data before and after changes. Therefore, the generated transaction rollback log is consistent with the protocol format of the native transaction log.
- the reverse operation includes at least one of a reverse order operation statement and a reverse order execution statement.
- the protocol format of the transaction rollback log generated after the reverse operation remains the same as the protocol format of the native transaction log, it further includes: assigning the transaction rollback log the same transaction corresponding to the native transaction log The global transaction ID.
- the global transaction identifier of the transaction to be rolled back is set to identify that the current transaction is a transaction to be rolled back, and the global transaction identifier of the transaction to be rolled back should correspond to the global transaction identifier of the original transaction, or both exist one by one The mapping relationship.
- S103 Reversely assemble the transaction rollback log to generate a transaction rollback log file, and execute the transaction rollback log file.
- the transaction rollback log corresponds to a single transaction to be rolled back, so the generated transaction rollback log can be assembled in reverse order according to the global sequence identifier to complete the reverse order of the transactions, and generate a transaction rollback log file.
- executing the transaction rollback log file includes: parsing the batch number corresponding to each transaction in the transaction rollback log file, executing transactions with the same batch number in parallel, and performing transactions with different batch numbers. Transactions are executed serially. In this way, the parallel playback of the transaction to be rolled back is realized, and the performance of the transaction rollback is improved to a certain extent.
- the transaction rollback method provided by the embodiment of the present invention analyzes the native transaction log file within a preset time range when a transaction rollback request is received to determine the transaction to be rolled back, and then according to the transaction corresponding to the transaction to be rolled back
- the native transaction log generates the transaction rollback log.
- the transaction rollback log is assembled in reverse order to generate the transaction rollback log file, and the transaction rollback log file is executed; it solves the problem that the transaction rollback method in the prior art cannot meet the high demand for multiple transactions. Performance requirements, low rollback performance issues.
- the transaction rollback method provided by the embodiment of the present invention not only reduces the re-analysis of standard sentence files by the database, but also makes full use of the transaction concurrency information of the rollback log, which effectively improves the performance of transaction rollback, especially for batch transactions.
- the rollback effect is better.
- the embodiments of the present disclosure take the MySQL database as an example, and the process of specifying a transaction set to implement fast rollback is as follows.
- Step 1 After receiving the transaction rollback request, retrieve the binlog log according to the specified transaction set to obtain the binlog file to be processed.
- Step 2 Sort the binlog files in reverse order according to the serial numbers of the binlog files from large to small to form a binlog file reverse queue, and process binlog files with large serial numbers first.
- Step 3 Create a binlog file parsing thread group, binlog transaction rollback processing thread pool, and binlog rollback log file output thread group.
- Step 4 Each file output thread sets up a labeled task list. Rollback transactions generated in different binlog files are modulo the binlog file serial number and then delivered to the output thread task list corresponding to different labels.
- Step 5 The parsing threads are selected from the binlog file queue in turn, and the binlog files are sequentially parsed from the beginning. If the parsed transaction exists in the specified transaction set to be rolled back, the transaction log is packaged and placed in the rollback task list.
- Step 6 After the binlog file is parsed, flip the task list to achieve the purpose of reverse transaction processing, and then trigger the task list to perform transaction log rollback processing on the binlog file that has been parsed.
- Step 7 The binlog transaction rollback processing thread pool obtains the task node to be rolled back from the task list, and performs rollback processing on the binlog transaction log.
- the rollback transaction retains the global sequence identifier of the native transaction.
- Step 8 Binlog rollback log file output.
- the thread group receives task nodes from the thread task list in real time, and then writes the transaction rollback log into the corresponding transaction rollback log file according to the binlog protocol.
- Step 9 According to the binlog file reverse queue, retrieve whether the first binlog file has completed the rollback processing and output, then push the transaction rollback log execution module to execute the transaction rollback log file.
- Step 10 After the transaction rollback log execution module receives the transaction rollback log file, it parses the transactions sequentially, and executes the transaction rollback log file playback according to the strategy of paralleling the same batch of transactions and serializing different batches of transactions.
- Step 11 After all the transaction rollback log files are played back, the task of the specified transaction set rollback ends.
- databases that use the binlog logging protocol such as MariaDB can refer to this process to complete the transaction fast rollback, which will not be repeated here.
- the transaction rollback log is consistent with the native transaction log protocol, and transactions can be executed in parallel to operate reverse transactions and forward transactions.
- the transaction rollback device includes a native transaction rollback control module 302 and a transaction rollback log execution module 303;
- the native transaction rollback control module 302 is configured to parse the native transaction log file within a preset time range when receiving a transaction rollback request; determine the transaction to be rolled back, and according to the transaction corresponding to the transaction to be rolled back The native transaction log generates a transaction rollback log; the transaction rollback log is assembled in reverse order to generate a transaction rollback log file;
- the transaction rollback log execution module 303 is used to execute the transaction rollback log file.
- the transaction rollback device also includes a native transaction log collection module 301, where the native transaction log collection module 301 is used to record changes in transaction data and transactions between transactions.
- the database instance identity identifier in this embodiment refers to which database instance the current transaction is executed on
- the global sequence identifier refers to the identifier of the current transaction in a certain database. For example, the global sequence identifier starts from 1, and then from increase.
- the same batch number can be assigned to each transaction that does not have correlation, so that the subsequently generated transaction rollback log retains the original transaction log.
- Batch number that is, keep the concurrency relationship of each transaction execution in the native transaction log.
- the native transaction log generated in this embodiment includes not only the data changes before and after the data operation, but also the global transaction identifier and batch number.
- the native transaction log in this embodiment corresponds to a single transaction, so the native transaction log can be assembled in reverse order to generate a transaction rollback log file for easy storage.
- the native transaction log file includes a binary log binlog file.
- the native transaction rollback control module 302 performs filtering in the log directory according to the preset time range, obtains the native transaction log files to be parsed, and then parses these native transactions in parallel Log file, and locate the transaction to be rolled back according to the global transaction identifier, and determine the transaction to be rolled back.
- the native transaction rollback control module 302 performs reverse operations on the native transaction log corresponding to the transaction to be rolled back, and the protocol format of the transaction rollback log generated after the reverse operation remains the same as the protocol format of the native transaction log. the same.
- the native transaction log in this embodiment records table data before and after the execution of each statement operation, inserting and deleting records requires modifying the operation type, and updating records requires exchanging table data before and after changes. Therefore, the generated rollback log is consistent with the protocol format of the native transaction log.
- the reverse operation includes at least one of a reverse order operation statement and a reverse order execution statement.
- the protocol format of the transaction rollback log generated by the native transaction rollback control module 302 after performing the reverse operation remains the same as the protocol format of the native transaction log, and the transaction rollback log is allocated with the native transaction The log corresponds to the same global transaction ID.
- the native transaction rollback control module 302 sets the global transaction identifier of the transaction to be rolled back to identify that the current transaction is a transaction to be rolled back, and the global transaction identifier of the transaction to be rolled back should correspond to the global transaction identifier of the native transaction , Or there is a one-to-one mapping relationship between the two.
- the transaction rollback log in this embodiment corresponds to a single transaction to be rolled back, so the generated transaction rollback log can be assembled in reverse order according to the global sequence identifier to complete the reverse order of the transactions, and generate a transaction rollback log file .
- the transaction rollback log execution module 303 parses the batch number corresponding to each transaction in the transaction rollback log file, executes transactions with the same batch number in parallel, and performs transaction strings with different batch numbers. Line execution. In this way, the parallel playback of the transaction to be rolled back is realized, and the performance of the transaction rollback is improved to a certain extent.
- the transaction rollback device includes a native transaction rollback control module and a transaction log rollback.
- the native transaction rollback control module receives a transaction rollback request, it responds to native transaction log files within a preset time range. Perform analysis to determine the transaction to be rolled back, and then generate a transaction rollback log based on the native transaction log corresponding to the transaction to be rolled back. Further, the transaction rollback log is assembled in reverse order to generate a transaction rollback log file, which is executed by the transaction rollback log.
- the module executes the transaction rollback log file; it solves the problem that the transaction rollback method in the prior art cannot meet the high-performance requirements for multiple transactions and the rollback performance is low.
- the transaction rollback device not only reduces the re-analysis of standard sentence files by the database, but also makes full use of the transaction concurrency information of the rollback log, which effectively improves the performance of transaction rollback, especially for batch transactions.
- the rollback effect is better.
- an embodiment of the present invention provides a system, which includes the above-mentioned third embodiment.
- Transaction rollback device In order to solve the problem that the transaction rollback method in the prior art cannot meet the high-performance requirements for multiple transactions and the low rollback performance, an embodiment of the present invention provides a system, which includes the above-mentioned third embodiment. Transaction rollback device.
- this embodiment uses two more specific systems as examples for illustration.
- the MySQL database is widely used, and the applications based on the MySQL database are even more diverse. No matter its form is a single database node or a database cluster, in the process of providing data services, it must have the ability to quickly roll back data transactions, that is, quick undo The ability to batch transactions.
- the MySQL database itself uses the binlog protocol to record transaction logs, in which the transaction data table records changes and transaction execution information is relatively complete.
- a transaction rollback device is deployed in the system, where the rollback transaction device does not require a native transaction log collection module, and only needs to adapt the native transaction rollback control module 302 based on the binlog file And the transaction rollback log execution module 303.
- the native transaction rollback control module 302 when the native transaction rollback control module 302 receives the transaction rollback request, it analyzes the binlog file, locates the transaction to be rolled back, converts it to generate a transaction rollback log, and then assembles it in reverse order to generate a transaction rollback log file.
- the transaction rollback log execution module 303 executes the transaction rollback log file, connects to the MySQL instance, and applies the rollback log Undo binlog file to achieve rapid transaction rollback.
- the distributed system uses MariaDB as the basic data node to establish a data cluster.
- An unavoidable problem in the distributed system is the consistent recovery of cluster data.
- the data shards in each cluster are inconsistent, the data needs to be restored to the cluster consistent Location, that is, to restore each MariaDB data node to the specified transaction set state, and redundant transactions need to be rolled back quickly.
- MariaDB database is a branch of MySQL, and its transaction log protocol is consistent with MySQL, and it is also a binlog protocol.
- a transaction rollback device needs to be deployed on each data node, which is responsible for the transaction rollback of the corresponding node.
- the deployed transaction rollback There is no need for a native transaction log collection module in the rollover device. It only needs to adapt the native transaction rollback control module 302 and transaction rollback log execution module 303 based on the binlog file; at the same time, global data recovery management needs to be deployed in the system
- the module sends data recovery tasks to the native transaction rollback control module 302, and counts the recovery results of each data node.
- the native transaction rollback control module 302 when the native transaction rollback control module 302 receives the transaction rollback request, it analyzes the binlog file, locates the transaction to be rolled back, converts it to generate a transaction rollback log, and then assembles it in reverse order to generate a transaction rollback log file.
- the transaction rollback log execution module 303 executes the transaction rollback log file, connects to the MySQL instance, and applies the rollback log to achieve rapid transaction rollback.
- the transaction rollback log is consistent with the native transaction log protocol, and transactions can be executed in parallel to operate reverse transactions and forward transactions.
- an embodiment of the present invention also provides a computer storage medium.
- the computer storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement transactions as described in the first and second embodiments above. The steps of the rollback method.
- the computer storage medium includes volatile or non-volatile, removable or non-removable implemented in any method or technology for storing information (such as computer readable instructions, data structures, computer program modules, or other data) In addition to the medium.
- Computer storage media include but are not limited to RAM (Random Access Memory), ROM (Read-Only Memory, read-only memory), EEPROM (Electrically Erasable Programmable read only memory), Flash memory or other storage technology, CD-ROM (Compact Disc Read-Only Memory), digital versatile disk (DVD) or other optical disk storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage device, or Any other medium used to store desired information and that can be accessed by a computer.
- the functional modules/units in the system, and the device can be implemented as software (which can be implemented by program code executable by a computing device) , Firmware, hardware and their appropriate combination.
- the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may consist of several physical components. The components are executed cooperatively.
- Some physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit .
- the computer-readable medium may include computer storage Medium (or non-transitory medium) and communication medium (or temporary medium).
- computer storage medium includes volatile and non-volatile memory implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data).
- flexible, removable and non-removable media are examples of flexible, removable and non-removable media.
- communication media usually contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as carrier waves or other transmission mechanisms, and may include any information delivery media . Therefore, the present disclosure is not limited to any specific hardware and software combination.
- the transaction rollback device, database, system, and computer storage medium provided by the foregoing embodiments, by analyzing the native transaction log file within the preset time range when a transaction rollback request is received, it is determined The transaction to be rolled back is generated, and then the transaction rollback log is generated according to the native transaction log corresponding to the transaction to be rolled back. Further, the transaction rollback log is assembled in reverse order to generate the transaction rollback log file, and the transaction rollback log file is executed; the problem is solved.
- Some technical transaction rollback methods can no longer meet the high-performance requirements for multi-transactions and the problems of low rollback performance. That is, the transaction rollback method, transaction rollback device, database, and system provided by the embodiments of the present disclosure effectively improve the performance of transaction rollback, especially for batch transaction rollback.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
Claims (13)
- 一种事务回滚方法,所述事务回滚方法包括:在接收到事务回滚请求时,对预设时间范围内的原生事务日志文件进行解析;确定待回滚事务,并根据所述待回滚事务对应的原生事务日志生成事务回滚日志;倒序将所述事务回滚日志组装生成事务回滚日志文件,执行所述事务回滚日志文件。
- 如权利要求1所述的事务回滚方法,其中,所述在接收到事务回滚请求时,对预设时间范围内的原生事务日志文件进行解析之前,包括:记录各事务数据变化以及各事务之间的关联性;为所述各事务分配全局事务标识,所述全局事务标识包括数据库实例身份标识和全局序列标识;为不存在关联性的各事务分配相同的批次号;生成原生事务日志;将所述原生事务日志组装生成原生事务日志文件。
- 如权利要求2所述的事务回滚方法,其中,所述原生事务日志文件包括二进制日志binlog文件。
- 如权利要求2或3所述的事务回滚方法,其中,所述确定待回滚事务,并根据所述待回滚事务对应的原生事务日志生成事务回滚日志,包括:对所述待回滚事务对应的原生事务日志进行逆操作,进行逆操作后生成的事务回滚日志的协议格式保持与所述原生事务日志的协议格式相同。
- 如权利要求4所述的事务回滚方法,其中,所述逆操作包括:逆序操作语句和逆序执行语句中的至少一种。
- 如权利要求4所述的事务回滚方法,其中,所述进行逆操作后生成的事务回滚日志的协议格式保持与所述原生事务日志的协议格式相同之后,还包括:为事务回滚日志分配与所述原生事务日志对应的事务相同的全局事务标识。
- 如权利要求2或3所述的事务回滚方法,其中,所述执行所述事务回滚日志文件,包括:解析所述事务回滚日志文件中各事务对应的批次号,对批次号相同的事务并行执行,对批次号不相同的事务串行执行。
- 一种事务回滚装置,所述事务回滚装置包括原生事务回滚控制模块及事务回滚日志执行模块;所述原生事务回滚控制模块,用于在接收到事务回滚请求时,对预设时间范围内的原生事务日志文件进行解析;确定待回滚事务,并根据所述待回滚事务对应的原生事务日志生成事务回滚日志;倒序将所述事务回滚日志组装生成事务回滚日志文件;所述事务回滚日志执行模块,用于执行所述事务回滚日志文件。
- 如权利要求8所述的事务回滚装置,其中,所述事务回滚装置还包括原生事务日志采集模块;所述原生事务日志采集模块,用于记录各事务数据变化以及各事务之间的关联性;为所述各事务分配全局事务标识,所述全局事务标识包括数据库实例身份标识和全局序列标识;为不存在关联性的各事务分配相同的批次号;生成原生事务日志;将所述原生事务日志组装生成原生事务日志文件。
- 如权利要求8所述的事务回滚装置,其中,所述事务回滚日志执 行模块,用于解析所述事务回滚日志文件中各事务对应的批次号,对批次号相同的事务并行执行,对批次号不相同的事务串行执行。
- 一种数据库,所述数据库包括如权利要求8至10任一项所述的事务回滚装置。
- 一种***,所述***包括如权利要求11所述的数据库,所述***包括基于MySQL数据库的事务回滚***,或,基于MariaDB分布式集群的数据恢复***。
- 一种计算机存储介质,所述计算机存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现如权利要求1至7任一项所述的事务回滚方法的步骤。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910662619.1A CN112256656B (zh) | 2019-07-22 | 2019-07-22 | 事务回滚方法及装置、数据库、***、计算机存储介质 |
CN201910662619.1 | 2019-07-22 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021012932A1 true WO2021012932A1 (zh) | 2021-01-28 |
Family
ID=74192444
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/098046 WO2021012868A1 (zh) | 2019-07-22 | 2020-06-24 | 事务回滚方法及装置、数据库、***、计算机存储介质 |
PCT/CN2020/100246 WO2021012932A1 (zh) | 2019-07-22 | 2020-07-03 | 事务回滚方法及装置、数据库、***、计算机存储介质 |
Family Applications Before (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/098046 WO2021012868A1 (zh) | 2019-07-22 | 2020-06-24 | 事务回滚方法及装置、数据库、***、计算机存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN112256656B (zh) |
WO (2) | WO2021012868A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112817798A (zh) * | 2021-02-26 | 2021-05-18 | 北京车和家信息技术有限公司 | 一种数据恢复方法、装置、介质和电子设备 |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112988775B (zh) * | 2021-04-15 | 2021-08-10 | 南京吉拉福网络科技有限公司 | 处理批量交易的方法、计算设备和存储介质 |
CN113254425B (zh) * | 2021-06-24 | 2022-01-11 | 阿里云计算有限公司 | 数据库事务保持的方法、设备、***、程序及存储介质 |
CN113468196B (zh) * | 2021-07-19 | 2024-04-05 | 京东科技控股股份有限公司 | 用于处理数据的方法、装置、***、服务器和介质 |
CN113485998A (zh) * | 2021-07-27 | 2021-10-08 | 中国银行股份有限公司 | Redis事务处理方法及装置、电子设备、存储介质 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170046364A1 (en) * | 2015-08-10 | 2017-02-16 | International Business Machines Corporation | Optimizing online schema processing for busy database objects |
CN106503264A (zh) * | 2016-11-29 | 2017-03-15 | 中国银行股份有限公司 | 基于oracle数据库的联机交易日志记录方法及设备 |
CN106547801A (zh) * | 2015-09-23 | 2017-03-29 | 北京奇虎科技有限公司 | 数据库数据闪回方法和装置 |
US20170123675A1 (en) * | 2013-04-30 | 2017-05-04 | Inuron | Method for layered storage of enterprise data |
Family Cites Families (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7289992B2 (en) * | 2003-05-01 | 2007-10-30 | International Business Machines Corporation | Method, system, and program for lock and transaction management |
US8145686B2 (en) * | 2005-05-06 | 2012-03-27 | Microsoft Corporation | Maintenance of link level consistency between database and file system |
US20070288526A1 (en) * | 2006-06-08 | 2007-12-13 | Emc Corporation | Method and apparatus for processing a database replica |
CN101360309B (zh) * | 2007-08-03 | 2011-06-08 | 华为技术有限公司 | 一种服务开通指令的执行方法、装置及*** |
CN101464890B (zh) * | 2008-12-30 | 2012-05-23 | 中兴通讯股份有限公司 | 一种混合日志生成方法和解析方法 |
CN102760161A (zh) * | 2012-06-12 | 2012-10-31 | 天津神舟通用数据技术有限公司 | 一种基于事务聚集的日志组织结构及实现其相应的恢复协议的方法 |
CN103312549B (zh) * | 2013-06-26 | 2016-08-24 | 华为技术有限公司 | 一种事务管理方法及装置和*** |
CN104750755B (zh) * | 2013-12-31 | 2018-06-15 | 阿里巴巴集团控股有限公司 | 一种数据库主备切换后的数据回补方法及*** |
CN104866403B (zh) * | 2015-05-13 | 2016-09-21 | 上海钢富电子商务有限公司 | 分布式任务处理***及方法 |
CN106557514A (zh) * | 2015-09-29 | 2017-04-05 | 中兴通讯股份有限公司 | 一种分布式事务回滚方法及装置 |
GB201810392D0 (en) * | 2015-11-25 | 2018-08-08 | Teamifier Inc | Methods for the augmentation, exploration, and maintenance of project hierarchies |
CN107220142B (zh) * | 2016-03-22 | 2020-10-09 | 阿里巴巴集团控股有限公司 | 执行数据恢复操作的方法及装置 |
CN107241370A (zh) * | 2016-03-29 | 2017-10-10 | 西门子公司 | IaaS云环境下资源操作的回滚方法及*** |
CN106682140A (zh) * | 2016-12-20 | 2017-05-17 | 华北计算技术研究所(中国电子科技集团公司第十五研究所) | 一种基于时间戳和映射策略的多***用户增量同步方法 |
CN107329966B (zh) * | 2017-05-11 | 2020-05-19 | 昆仑智汇数据科技(北京)有限公司 | 机器数据存储方法及*** |
CN110019050A (zh) * | 2017-10-19 | 2019-07-16 | 中兴通讯股份有限公司 | 一种数据回滚方法、***、设备及计算机可读存储介质 |
CN109408294A (zh) * | 2018-11-13 | 2019-03-01 | 郑州云海信息技术有限公司 | 一种快照回滚方法、装置、设备及存储介质 |
-
2019
- 2019-07-22 CN CN201910662619.1A patent/CN112256656B/zh active Active
-
2020
- 2020-06-24 WO PCT/CN2020/098046 patent/WO2021012868A1/zh active Application Filing
- 2020-07-03 WO PCT/CN2020/100246 patent/WO2021012932A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170123675A1 (en) * | 2013-04-30 | 2017-05-04 | Inuron | Method for layered storage of enterprise data |
US20170046364A1 (en) * | 2015-08-10 | 2017-02-16 | International Business Machines Corporation | Optimizing online schema processing for busy database objects |
CN106547801A (zh) * | 2015-09-23 | 2017-03-29 | 北京奇虎科技有限公司 | 数据库数据闪回方法和装置 |
CN106503264A (zh) * | 2016-11-29 | 2017-03-15 | 中国银行股份有限公司 | 基于oracle数据库的联机交易日志记录方法及设备 |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112817798A (zh) * | 2021-02-26 | 2021-05-18 | 北京车和家信息技术有限公司 | 一种数据恢复方法、装置、介质和电子设备 |
Also Published As
Publication number | Publication date |
---|---|
CN112256656B (zh) | 2023-04-18 |
WO2021012868A1 (zh) | 2021-01-28 |
CN112256656A (zh) | 2021-01-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021012932A1 (zh) | 事务回滚方法及装置、数据库、***、计算机存储介质 | |
CN110442560B (zh) | 一种日志重演方法、装置、服务器和存储介质 | |
CN107391628B (zh) | 数据同步方法及装置 | |
CN108241555B (zh) | 一种分布式数据库的备份、恢复方法、装置和服务器 | |
US9619430B2 (en) | Active non-volatile memory post-processing | |
KR101476018B1 (ko) | 플래시카피 캐스케이드내의 버퍼 디스크 | |
CN106933703B (zh) | 一种数据库数据备份的方法、装置及电子设备 | |
CN107016016B (zh) | 一种数据处理的方法及装置 | |
US20190102259A1 (en) | Logging process in a data storage system | |
US10642530B2 (en) | Global occupancy aggregator for global garbage collection scheduling | |
US10922307B2 (en) | Automated transaction engine | |
CN105701190A (zh) | 一种数据同步的方法和装置 | |
US9128962B2 (en) | View based table replacement for applications | |
CN112416654A (zh) | 一种数据库日志重演方法、装置、设备及存储介质 | |
CN112464044B (zh) | 一种文件数据块变化信息监控管理***及其方法 | |
WO2021082925A1 (zh) | 一种交易处理的方法及装置 | |
US20110106760A1 (en) | Synchronizing database and non-database resources without a commit coordinator | |
WO2017067397A1 (zh) | 一种数据恢复方法和装置 | |
US20140149697A1 (en) | Memory Pre-Allocation For Cleanup and Rollback Operations | |
CN112131214A (zh) | 数据写入、数据查询的方法、***、设备和存储介质 | |
CN111125047B (zh) | 冷热数据目录识别方法及装置 | |
CN109857523B (zh) | 一种用于实现数据库高可用性的方法及装置 | |
CN112559457A (zh) | 数据访问方法及装置 | |
CN107844491B (zh) | 一种在分布式***中实现强一致性读操作的方法与设备 | |
CN115604290B (zh) | Kafka消息执行方法、装置、设备及存储介质 |
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: 20843601 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20843601 Country of ref document: EP Kind code of ref document: A1 |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20843601 Country of ref document: EP Kind code of ref document: A1 |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 210922) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20843601 Country of ref document: EP Kind code of ref document: A1 |