Transaction log processing method and system for distributed database
A processing method and distributed technology, applied in the field of log processing, can solve problems such as uncertain order, scattered transaction logs, uncertain length of transaction execution process, etc., to achieve the effect of reducing complexity and improving efficiency
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0051] combined with figure 1 , the present embodiment proposes a transaction log processing method of a distributed database, the processing process including:
[0052]Each node of the distributed database accepts the client request and executes the transaction. After the transaction is executed, each node writes its own transaction log into the transaction log file. The transaction log contains the transaction ID and transaction time stamp. The transaction ID is A randomly generated unique value, the transaction timestamp is the time when the transaction starts, that is, the system time of the host where the node is located when the transaction starts;
[0053] The log collector monitors transaction log files, collects incremental logs and sends them to message queue 1;
[0054] Log processor 1 consumes transaction log messages from message queue 1, and writes them into message queue 2 after performing global sorting;
[0055] The log processor II consumes globally ordered...
Embodiment 2
[0066] combined with figure 1 , the present embodiment proposes a transaction log processing system of a distributed database, and its structure involves each node of the distributed database, a log collector, a message queue 1, a log processor I, a message queue 2, and a log processor II;
[0067] Each node of the distributed database accepts the client request and executes the transaction. After the transaction is executed, each node writes its own transaction log into the transaction log file. The transaction log contains the transaction ID and transaction time stamp. The transaction ID is A randomly generated unique value, the transaction timestamp is the time when the transaction starts, that is, the system time of the host where the node is located when the transaction starts;
[0068] The log collector monitors transaction log files, collects incremental logs and sends them to message queue 1;
[0069] Log processor 1 consumes transaction log messages from message queu...
Embodiment 1 Embodiment 2
[0080] For Embodiment 1 and Embodiment 2, what needs to be supplemented is:
[0081] ①The node of the distributed database refers to each instance process that the distributed database actually runs. Each instance process can independently accept client requests, and control transaction execution and record transaction logs.
[0082] ②The transaction log refers to the transaction log recorded by each node of the distributed database. The transaction log of each node only records the log of the transaction executed by the node;
[0083] ③ The log collector refers to the application program that collects transaction logs. The log collector will monitor the transaction log file. When a transaction log is appended to the file, the log collector will collect the incremental transaction log and send it to the message queue. Each node's transaction log is sent to a separate topic.
[0084] ④ Message queue 1 / message queue 2 is used to receive and temporarily store transaction log me...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com