CN116303754A - Database transaction snapshot generation method, device, equipment and storage medium - Google Patents
Database transaction snapshot generation method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN116303754A CN116303754A CN202111509135.7A CN202111509135A CN116303754A CN 116303754 A CN116303754 A CN 116303754A CN 202111509135 A CN202111509135 A CN 202111509135A CN 116303754 A CN116303754 A CN 116303754A
- Authority
- CN
- China
- Prior art keywords
- transaction
- management component
- snapshot
- global
- global transaction
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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 OR CALCULATING; 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
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1458—Management of the backup or restore process
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/11—File system administration, e.g. details of archiving or snapshots
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/11—File system administration, e.g. details of archiving or snapshots
- G06F16/128—Details of file system snapshots on the file-level, e.g. snapshot creation, administration, deletion
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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 OR CALCULATING; 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
- G06F16/219—Managing data history or versioning
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Computing Systems (AREA)
- Quality & Reliability (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
技术领域technical field
本申请实施例涉及数据库领域,特别涉及一种数据库的事务快照生成方法、装置、设备及存储介质。The embodiments of the present application relate to the field of databases, and in particular to a method, device, device, and storage medium for generating transaction snapshots of databases.
背景技术Background technique
在分布式数据库中,通常会部署多个全局事务管理器采用负载均衡的方式解决每个组件或节点并发压力大的问题,但是部署多个全局事务管理器分担整个系统并发压力的同时,也使得多个全局事务管理器难以生成全局一致性快照。In a distributed database, multiple global transaction managers are usually deployed to solve the problem of high concurrency pressure on each component or node in a load balancing manner. However, while deploying multiple global transaction managers to share the concurrency pressure of the entire system, it also makes Multiple global transaction managers have difficulty producing globally consistent snapshots.
发明内容Contents of the invention
本申请实施例的主要目的在于提出一种数据库的事务快照生成方法、装置、设备及存储介质,实现准确地获取全局一致性快照。The main purpose of the embodiments of the present application is to provide a database transaction snapshot generation method, device, device and storage medium, so as to achieve accurate global consistent snapshot acquisition.
为实现上述目的,本申请实施例提供了一种数据库的事务快照生成方法,包括:交替获取第一全局事务管理组件和第二全局事务管理组件分别在不同时刻生成的事务快照;根据从所述第一全局事务管理组件获取的相邻两次的事务快照中的处于活跃状态的事务编号,生成所述第一全局事务管理组件对应的事务快照;根据从所述第二全局事务管理组件获取的相邻两次的事务快照中的处于活跃状态的事务编号,生成所述第二全局事务管理组件对应的事务快照;根据所述第一全局事务管理组件对应的事务快照和所述第二全局事务管理组件对应的事务快照,生成全局事务快照。In order to achieve the above purpose, an embodiment of the present application provides a database transaction snapshot generation method, comprising: alternately obtaining the transaction snapshots generated by the first global transaction management component and the second global transaction management component at different times; according to the The transaction number in the active state in the two adjacent transaction snapshots obtained by the first global transaction management component generates a transaction snapshot corresponding to the first global transaction management component; according to the transaction snapshot obtained from the second global transaction management component The transaction number in the active state in two adjacent transaction snapshots generates a transaction snapshot corresponding to the second global transaction management component; according to the transaction snapshot corresponding to the first global transaction management component and the second global transaction The transaction snapshot corresponding to the management component generates a global transaction snapshot.
为实现上述目的,本申请实施例还提出了一种数据库的事务快照生成装置,包括:In order to achieve the above purpose, the embodiment of the present application also proposes a database transaction snapshot generation device, including:
获取模块,用于交替获取第一全局事务管理组件和第二全局事务管理组件分别在不同时刻生成的事务快照;An acquisition module, configured to alternately acquire transaction snapshots generated by the first global transaction management component and the second global transaction management component at different times;
第一生成模块,用于根据从所述第一全局事务管理组件获取的相邻两次的事务快照中的处于活跃状态的事务编号,生成所述第一全局事务管理组件对应的事务快照;A first generating module, configured to generate a transaction snapshot corresponding to the first global transaction management component according to the transaction number in an active state in two consecutive transaction snapshots obtained from the first global transaction management component;
第二生成模块,用于根据从所述第二全局事务管理组件获取的相邻两次的事务快照中的处于活跃状态的事务编号,生成所述第二全局事务管理组件对应的事务快照;The second generation module is configured to generate a transaction snapshot corresponding to the second global transaction management component according to the transaction number in the active state in two adjacent transaction snapshots obtained from the second global transaction management component;
第三生成模块,用于根据所述第一全局事务管理组件对应的事务快照和所述第二全局事务管理组件对应的事务快照,生成全局事务快照。The third generating module is configured to generate a global transaction snapshot according to the transaction snapshot corresponding to the first global transaction management component and the transaction snapshot corresponding to the second global transaction management component.
为实现上述目的,本申请实施例还提出了一种电子设备,包括:至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行以上所述的数据库的事务快照生成方法。To achieve the above purpose, an embodiment of the present application also provides an electronic device, including: at least one processor; and a memory connected to the at least one processor in communication; wherein, the memory stores information that can be used by the at least one processor An instruction executed by a processor, the instruction is executed by the at least one processor, so that the at least one processor can execute the above-mentioned method for generating a database transaction snapshot.
为实现上述目的,本申请实施例还提出了一种计算机可读存储介质,存储有计算机程序,所述计算机程序被处理器执行时实现以上所述的数据库的事务快照生成方法。In order to achieve the above purpose, the embodiment of the present application also proposes a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the above-mentioned method for generating a database transaction snapshot is implemented.
本申请提出的一种数据库的事务快照生成方法、装置、设备及存储介质,通过交替获取多个全局事务管理组件分别在不同时刻的事务快照,根据多个事务快照生成一个全局事务快照,使得最终获取的全局事务快照能修正多个事务快照生成时间差内发生变更的事务状态。整个过程能够快速、准确地获取全局一致性快照。A transaction snapshot generation method, device, device and storage medium of a database proposed by the present application obtain transaction snapshots of multiple global transaction management components at different times alternately, and generate a global transaction snapshot according to multiple transaction snapshots, so that the final The obtained global transaction snapshot can correct the transaction status that has changed within the generation time difference of multiple transaction snapshots. The whole process can quickly and accurately obtain globally consistent snapshots.
附图说明Description of drawings
图1a是本申请的实施例提供的分布式数据库系统中事务状态示意图;Fig. 1a is a schematic diagram of the transaction state in the distributed database system provided by the embodiment of the present application;
图1b是本申请的实施例提供的分布式数据库系统中事务快照示意图;Fig. 1b is a schematic diagram of a transaction snapshot in a distributed database system provided by an embodiment of the present application;
图2是本申请的实施例提供的数据库的事务快照生成方法的流程图;Fig. 2 is the flow chart of the transaction snapshot generation method of the database that the embodiment of the present application provides;
图3是本申请的实施例提供的数据库的事务快照生成装置的结构示意图;FIG. 3 is a schematic structural diagram of a database transaction snapshot generation device provided by an embodiment of the present application;
图4是本申请的实施方式提供的电子设备的结构示意图。FIG. 4 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
具体实施方式Detailed ways
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合附图对本申请的各实施例进行详细的阐述。然而,本领域的普通技术人员可以理解,在本申请各实施例中,为了使读者更好地理解本申请而提出了许多技术细节。但是,即使没有这些技术细节和基于以下各实施例的种种变化和修改,也可以实现本申请所要求保护的技术方案。以下各个实施例的划分是为了描述方便,不应对本申请的具体实现方式构成任何限定,各个实施例在不矛盾的前提下可以相互结合相互引用。In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in detail below with reference to the accompanying drawings. However, those of ordinary skill in the art can understand that in each embodiment of the application, many technical details are provided for readers to better understand the application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical solutions claimed in this application can also be realized. The division of the following embodiments is for the convenience of description, and should not constitute any limitation to the specific implementation of the present application, and the embodiments can be combined and referred to each other on the premise of no contradiction.
本申请的数据库的事务快照生成方法针对分布式数据库,一个分布式数据库在逻辑上是一个统一的整体,在物理上则是分别存储在不同的物理节点上。一个应用程序通过网络的连接可以访问分布在不同地理位置的数据库。分布式数据库通常会扩展多个计算节点和存储节点以便处理海量数据任务,在数据处理过程中多个节点或处理任务的组件很容易出现并发压力大的问题,通常会会部署多个全局事务管理器并采用负载均衡的方式来降低每个节点或组件的并发压力。而部署多个全局事务管理器又带了难以生成全局一致性快照的问题。The database transaction snapshot generation method of the present application is aimed at distributed databases. A distributed database is logically a unified whole, and physically stored on different physical nodes. An application can access databases distributed in different geographical locations through a network connection. Distributed databases usually expand multiple computing nodes and storage nodes to handle massive data tasks. During data processing, multiple nodes or components processing tasks are prone to high concurrency pressure problems, and multiple global transaction managers are usually deployed. server and use load balancing to reduce the concurrency pressure of each node or component. Deploying multiple global transaction managers brings the problem of difficulty in generating globally consistent snapshots.
需要说明的是,全局快照的含义是某一时刻的全局状态,而一致性则指的是对于全局快照中保存的任何一个事件,在这个事件之前发生的事件应该保存在这次的快照中。简单地说,所有事务的状态在同一时刻的组合就是一个全局一致性快照。It should be noted that the meaning of a global snapshot is the global state at a certain moment, while consistency means that for any event saved in the global snapshot, the events that occurred before this event should be saved in this snapshot. Simply put, the combination of the states of all transactions at the same time is a globally consistent snapshot.
而目前的全局快照生成方法存在以下问题:如图1a所示,若一个分布式数据库系统中部署了两个全局事务管理器gtm1和gtm2,第一全局事务管理器(即第一全局事务管理组件)gtm1负责管理事务8、事务9、事务10和事务11,第二全局事务管理器gtm2负责管理事务91、事务92、事务93和事务94,在T0时刻之前,事务8、事务10和事务91为已经结束的非活跃事务,事务9、事务11、事务92、事务93和事务94为未结束的活跃事务。若T0时刻gtm1收到快照生成请求,那么gtm1获取的快照如图1b所示,类似地,T1时刻gtm2收到快照生成请求,那么gtm2获取的快照如图1b所示。将这两个快照合并则为整个系统的全局事务快照。但是结合图1a可以看到,由于gtm1和gtm2生成快照存在时间差,在T0到T1的时间段内,gtm1的管理的事务状态已经发生了变化,即事务9已经从未结束的活跃事务变为了已经结束的非活跃事务。如此,导致最终获取的全局事务快照不符合一致性要求。However, the current global snapshot generation method has the following problems: as shown in Figure 1a, if two global transaction managers gtm1 and gtm2 are deployed in a distributed database system, the first global transaction manager (i.e. the first global transaction management component ) gtm1 is responsible for managing
进一步地,若使用不符合一致性要求的全局事务快照进行数据备份时,很容易导致数据分片上的数据出现不一致问题。需要说明的是,在分布式数据库系统中,一个事务包含的多个操作通常分布在多个数据分片上进行,而事务应该具有四个属性:原子性、一致性、隔离性和持久性。其中,原子性是指一个事务是一个不可分割的工作单位,事务中包括的所有操作要么都执行、要么都不执行。一致性是指事务必须是使数据库从一个一致性状态变到另一个一致性状态。而数据分片上的数据不一致问题使得对应的事务不满足事务属性要求。Furthermore, if a global transaction snapshot that does not meet the consistency requirements is used for data backup, it is easy to cause data inconsistency on the data shards. It should be noted that in a distributed database system, multiple operations contained in a transaction are usually distributed across multiple data shards, and a transaction should have four attributes: atomicity, consistency, isolation, and durability. Among them, atomicity means that a transaction is an indivisible unit of work, and all operations included in the transaction are either executed or not executed. Consistency means that the transaction must change the database from one consistent state to another consistent state. However, the data inconsistency problem on the data fragmentation makes the corresponding transaction not meet the transaction attribute requirements.
另外,通过全局一致性快照还可以对系统中的故障进行检查恢复,还可以检查当前应用是否存在死锁问题。这些都需要在能获取到准确的全局一致性快照基础上实现。In addition, through globally consistent snapshots, it is also possible to check and recover from faults in the system, and it is also possible to check whether there is a deadlock problem in the current application. All of these need to be realized on the basis of obtaining accurate global consistent snapshots.
而本申请通过交替获取多个全局事务管理组件分别在不同时刻的事务快照,根据多个事务快照生成一个全局事务快照,使得最终获取的全局事务快照能修正多个事务快照生成时间差内发生变更的事务状态。However, this application alternately obtains the transaction snapshots of multiple global transaction management components at different times, and generates a global transaction snapshot according to the multiple transaction snapshots, so that the finally obtained global transaction snapshot can correct the changes that occur within the generation time difference of multiple transaction snapshots. transaction status.
本申请的实施例涉及一种数据库的事务快照生成方法,如图2所示,包括:The embodiment of the present application relates to a transaction snapshot generation method of a database, as shown in Figure 2, comprising:
步骤201,交替获取第一全局事务管理组件和第二全局事务管理组件分别在不同时刻生成的事务快照。
在本实施例中,步骤201具体包括:向第一全局事务管理组件发送第一快照生成请求,接收第一全局事务管理组件反馈的在第一时刻生成的第一事务快照;向第二全局事务管理组件发送第二快照生成请求,接收第二全局事务管理组件反馈的在第二时刻生成的第二事务快照;向第一全局事务管理组件发送第三快照生成请求,接收第一全局事务管理组件反馈的在第三时刻生成的第三事务快照;向第二全局事务管理组件发送第四快照生成请求,接收第二全局事务管理组件反馈的在第四时刻生成的第四事务快照。比如:以两个全局事务管理组件gtm1和gtm2为例,T0时刻gtm1生成事务快照,T1时刻gtm2生成事务快照,T2时刻gtm1再生成一份快照,T3时刻gtm2再生成一份快照,如此,可完成交替获取不同时刻的事务快照。当然,本申请的事务快照生成方法不仅限于两个全局事务管理组件,也可以针对多个全局事务管理组件。In this embodiment,
需要说明的是,第三快照生成请求与第二快照生成请求的发送间隔时间大于或等于第二快照生成请求发送至第二全局事务管理组件所需的时间;第四快照生成请求与第三快照生成请求的发送间隔时间大于或等于第三快照生成请求发送至第一全局事务管理组件所需的时间。如此,保证全局事务管理器在获取到上一个快照生成请求后,在接收下一个事务快照生成请求。It should be noted that the interval between sending the third snapshot generation request and the second snapshot generation request is greater than or equal to the time required for the second snapshot generation request to be sent to the second global transaction management component; The sending interval of the generation request is greater than or equal to the time required for the third snapshot generation request to be sent to the first global transaction management component. In this way, it is guaranteed that the global transaction manager receives the next transaction snapshot generation request after obtaining the previous snapshot generation request.
另外,第一全局事务管理组件和所述第二全局事务管理组件部署于同一物理设备的情况下,第三快照生成请求与第二快照生成请求的发送间隔时间与第四快照生成请求与第三快照生成请求的发送间隔时间相等。如此,在保证事务快照准确获取的同时,提高获取效率。In addition, when the first global transaction management component and the second global transaction management component are deployed on the same physical device, the sending interval between the third snapshot generation request and the second snapshot generation request is the same as that between the fourth snapshot generation request and the third snapshot generation request. Snapshot generation requests are sent at equal intervals. In this way, while ensuring accurate acquisition of transaction snapshots, the acquisition efficiency is improved.
步骤202,根据从第一全局事务管理组件获取的相邻两次的事务快照中的处于活跃状态的事务编号,生成第一全局事务管理组件对应的事务快照。Step 202: Generate a transaction snapshot corresponding to the first global transaction management component according to an active transaction number in two consecutive transaction snapshots obtained from the first global transaction management component.
在本实施例中,步骤202具体包括:将从第一全局事务管理组件获取的相邻两次的事务快照中的处于活跃状态的事务编号进行逻辑与操作,得到第一全局事务管理组件对应的事务快照。也就是说,在两份快照中同一事务都处于未结束的活跃状态时,才确认该事务为未结束的活跃状态。In this embodiment, step 202 specifically includes: performing a logical AND operation on the transaction numbers in the active state in two consecutive transaction snapshots obtained from the first global transaction management component to obtain the transaction number corresponding to the first global transaction management component Transactional snapshots. That is to say, only when the same transaction is in the active state that has not ended in the two snapshots, is it confirmed that the transaction is in the active state that has not ended.
步骤203,根据从第二全局事务管理组件获取的相邻两次的事务快照中的处于活跃状态的事务编号,生成第二全局事务管理组件对应的事务快照。Step 203: Generate a transaction snapshot corresponding to the second global transaction management component according to an active transaction number in two consecutive transaction snapshots obtained from the second global transaction management component.
在本实施例中,步骤203具体包括:将从第二全局事务管理组件获取的相邻两次的事务快照中的处于活跃状态的事务编号进行逻辑与操作,得到第二全局事务管理组件对应的事务快照。In this embodiment, step 203 specifically includes: performing a logical AND operation on the transaction numbers in the active state in two consecutive transaction snapshots obtained from the second global transaction management component to obtain the transaction number corresponding to the second global transaction management component Transactional snapshots.
步骤204,根据第一全局事务管理组件对应的事务快照和第二全局事务管理组件对应的事务快照,生成全局事务快照。Step 204: Generate a global transaction snapshot according to the transaction snapshot corresponding to the first global transaction management component and the transaction snapshot corresponding to the second global transaction management component.
在本实施例中,步骤204具体包括:将第一全局事务管理组件对应的事务快照中的处于活跃状态的事务编号,与第二全局事务管理组件对应的事务快照中的处于活跃状态的事务编号进行合并,得到全局事务快照。In this embodiment, step 204 specifically includes: numbering the transaction number in the active state in the transaction snapshot corresponding to the first global transaction management component, and the transaction number in the active state in the transaction snapshot corresponding to the second global transaction management component Merge to get a global transaction snapshot.
另外,步骤204之后,还包括:根据全局事务快照对各数据分片中的数据进行备份。本实施例中,根据全局事务快照中每个事务的状态可以对各数据分片中的数据进行备份。本领域技术人员可以理解的是,一个事务包含的多个操作通常在多个数据分片上执行。In addition, after
本申请提出的一种数据库的事务快照生成方法,通过交替获取多个全局事务管理组件分别在不同时刻的事务快照,根据多个事务快照生成一个全局事务快照,使得最终获取的全局事务快照能修正多个事务快照生成时间差内发生变更的事务状态。整个过程能够快速、准确地获取全局一致性快照。A database transaction snapshot generation method proposed by this application, by alternately obtaining transaction snapshots of multiple global transaction management components at different times, generating a global transaction snapshot according to multiple transaction snapshots, so that the final obtained global transaction snapshot can be corrected Transaction states that have changed within the time difference between multiple transaction snapshots. The whole process can quickly and accurately obtain globally consistent snapshots.
此外,应当理解的是,上面各种方法的步骤划分,只是为了描述清楚,实现时可以合并为一个步骤或者对某些步骤进行拆分,分解为多个步骤,只要包括相同的逻辑关系,都在本专利的保护范围内;对流程中添加无关紧要的修改或者引入无关紧要的设计,但不改变其流程的核心设计都在该专利的保护范围内。In addition, it should be understood that the division of steps in the above methods is only for clarity of description, and may be combined into one step or split into multiple steps during implementation. As long as the same logical relationship is included, all Within the scope of protection of this patent; adding insignificant modifications to the process or introducing insignificant designs without changing the core design of the process are all within the scope of protection of this patent.
本申请的实施例涉及一种数据库的事务快照生成装置,如图3所示,包括:The embodiment of the present application relates to a database transaction snapshot generation device, as shown in Figure 3, comprising:
获取模块301,用于交替获取第一全局事务管理组件和第二全局事务管理组件分别在不同时刻生成的事务快照;An
第一生成模块302,用于根据从所述第一全局事务管理组件获取的相邻两次的事务快照中的处于活跃状态的事务编号,生成所述第一全局事务管理组件对应的事务快照;The
第二生成模块303,用于根据从所述第二全局事务管理组件获取的相邻两次的事务快照中的处于活跃状态的事务编号,生成所述第二全局事务管理组件对应的事务快照;The
第三生成模块304,用于根据所述第一全局事务管理组件对应的事务快照和所述第二全局事务管理组件对应的事务快照,生成全局事务快照。The
需要说明的是,本装置实施例主要是针对方法实施例提供的数据库的事务快照生成方法在软件实现层面上的描述,其实现还需要依托于硬件的支持,如相关模块的功能可以被部署到处理器上,以便处理器运行实现相应的功能,特别地,运行产生的数据可以被存储到存储器中以便后续检查和使用。It should be noted that this embodiment of the device is mainly aimed at the description of the database transaction snapshot generation method provided by the method embodiment at the level of software implementation, and its implementation also needs to rely on hardware support. For example, the functions of related modules can be deployed to On the processor, so that the processor runs to implement corresponding functions, especially, the data generated by the running can be stored in the memory for subsequent inspection and use.
值得一提的是,本实施例中所涉及到的各模块均为逻辑模块,一个逻辑单元可以是一个物理单元,也可以是一个物理单元的一部分,还可以以多个物理单元的组合实现。此外,为了突出本发明的创新部分,本实施例中并没有将与解决本发明所提出的技术问题关系不太密切的单元引入,但这并不表明本实施例中不存在其它的单元。It is worth mentioning that all the modules involved in this embodiment are logical modules, and a logical unit may be a physical unit, or a part of a physical unit, or may be realized by a combination of multiple physical units. In addition, in order to highlight the innovative part of the present invention, units that are not closely related to solving the technical problem proposed by the present invention are not introduced in this embodiment, but this does not mean that there are no other units in this embodiment.
不难发现,本实施例为与数据库的事务快照生成方法实施例相对应的装置实施例,本实施例可与上述实施例互相配合实施。上述实施例中提到的相关技术细节在本实施例中依然有效,为了减少重复,这里不再赘述。相应地,本实施例中提到的相关技术细节也可应用在上述方法实施例中。It is not difficult to find that this embodiment is an apparatus embodiment corresponding to the embodiment of the method for generating a transaction snapshot of a database, and this embodiment can be implemented in cooperation with the foregoing embodiments. The relevant technical details mentioned in the foregoing embodiments are still valid in this embodiment, and will not be repeated here in order to reduce repetition. Correspondingly, the relevant technical details mentioned in this embodiment can also be applied to the above method embodiments.
本发明的实施方式涉及一种电子设备,如图4所示,包括:至少一个处理器401;以及,与所述至少一个处理器401通信连接的存储器402;其中,所述存储器402存储有可被所述至少一个处理器401执行的指令,所述指令被所述至少一个处理器401执行,以使所述至少一个处理器401能够执行上述实施方式的数据抓包方法。The embodiment of the present invention relates to an electronic device, as shown in FIG. 4 , including: at least one
其中,存储器和处理器采用总线方式连接,总线可以包括任意数量的互联的总线和桥,总线将一个或多个处理器和存储器的各种电路连接在一起。总线还可以将诸如外围设备、稳压器和功率管理电路等之类的各种其他电路连接在一起,这些都是本领域所公知的,因此,本文不再对其进行进一步描述。总线接口在总线和收发机之间提供接口。收发机可以是一个元件,也可以是多个元件,比如多个接收器和发送器,提供用于在传输介质上与各种其他装置通信的单元。经处理器处理的数据通过天线在无线介质上进行传输,进一步,天线还接收数据并将数据传送给处理器。Wherein, the memory and the processor are connected by a bus, and the bus may include any number of interconnected buses and bridges, and the bus connects one or more processors and various circuits of the memory together. The bus may also connect together various other circuits such as peripherals, voltage regulators, and power management circuits, all of which are well known in the art and therefore will not be further described herein. The bus interface provides an interface between the bus and the transceivers. A transceiver may be a single element or multiple elements, such as multiple receivers and transmitters, providing means for communicating with various other devices over a transmission medium. The data processed by the processor is transmitted on the wireless medium through the antenna, further, the antenna also receives the data and transmits the data to the processor.
处理器负责管理总线和通常的处理,还可以提供各种功能,包括定时,外围接口,电压调节、电源管理以及其他控制功能。而存储器可以被用于存储处理器在执行操作时所使用的数据。The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interface, voltage regulation, power management, and other control functions. Instead, memory can be used to store data that the processor uses when performing operations.
本发明的实施方式涉及一种计算机可读存储介质,存储有计算机程序。计算机程序被处理器执行时实现上述数据库的事务快照生成方法。Embodiments of the present invention relate to a computer-readable storage medium storing a computer program. When the computer program is executed by the processor, the above-mentioned database transaction snapshot generation method is realized.
即,本领域技术人员可以理解,实现上述实施方式方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施方式所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。That is, those skilled in the art can understand that all or part of the steps in the method of the above-mentioned embodiments can be completed by instructing related hardware through a program, the program is stored in a storage medium, and includes several instructions to make a device ( It may be a single-chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes. .
本领域的普通技术人员可以理解,上述各实施例是实现本申请的具体实施例,而在实际应用中,可以在形式上和细节上对其作各种改变,而不偏离本申请的精神和范围。Those of ordinary skill in the art can understand that the above-mentioned embodiments are specific embodiments for realizing the present application, and in practical applications, various changes can be made to it in form and details without departing from the spirit and spirit of the present application. scope.
Claims (10)
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111509135.7A CN116303754A (en) | 2021-12-10 | 2021-12-10 | Database transaction snapshot generation method, device, equipment and storage medium |
| PCT/CN2022/136680 WO2023103990A1 (en) | 2021-12-10 | 2022-12-05 | Database transaction snapshot generation method and apparatus, device, and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202111509135.7A CN116303754A (en) | 2021-12-10 | 2021-12-10 | Database transaction snapshot generation method, device, equipment and storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN116303754A true CN116303754A (en) | 2023-06-23 |
Family
ID=86729618
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202111509135.7A Pending CN116303754A (en) | 2021-12-10 | 2021-12-10 | Database transaction snapshot generation method, device, equipment and storage medium |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN116303754A (en) |
| WO (1) | WO2023103990A1 (en) |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8935205B2 (en) * | 2011-11-16 | 2015-01-13 | Sap Ag | System and method of performing snapshot isolation in distributed databases |
| US9348641B2 (en) * | 2013-03-13 | 2016-05-24 | Futurewei Technologies, Inc. | System and method for performing a transaction in a massively parallel processing database |
| US20150120645A1 (en) * | 2013-10-31 | 2015-04-30 | Futurewei Technologies, Inc. | System and Method for Creating a Distributed Transaction Manager Supporting Repeatable Read Isolation level in a MPP Database |
| CN107045454B (en) * | 2016-02-06 | 2020-06-26 | 华为技术有限公司 | Cross-process distributed transaction control method and related system |
| CN113495872B (en) * | 2020-04-08 | 2024-11-19 | 北京万里开源软件有限公司 | Transaction processing method and system in distributed database |
| CN112069258B (en) * | 2020-09-08 | 2024-04-19 | 北京金山云网络技术有限公司 | Transaction progress management method and device and distributed database |
-
2021
- 2021-12-10 CN CN202111509135.7A patent/CN116303754A/en active Pending
-
2022
- 2022-12-05 WO PCT/CN2022/136680 patent/WO2023103990A1/en not_active Ceased
Also Published As
| Publication number | Publication date |
|---|---|
| WO2023103990A1 (en) | 2023-06-15 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP2932370B1 (en) | System and method for performing a transaction in a massively parallel processing database | |
| EP1019822B1 (en) | Highly-available cluster configuration database | |
| EP2738698B1 (en) | Locking protocol for partitioned and distributed tables | |
| EP2928160B1 (en) | Idempotence for database transactions | |
| EP3058690B1 (en) | System and method for creating a distributed transaction manager supporting repeatable read isolation level in a mpp database | |
| CN111314479B (en) | Data processing method and equipment | |
| US8190562B2 (en) | Linking framework for information technology management | |
| EP3958126A1 (en) | Micro-service component-based database system and related method | |
| CN108509462B (en) | Method and device for synchronizing activity transaction table | |
| CN109977171A (en) | A kind of distributed system and method guaranteeing transaction consistency and linear consistency | |
| CN111753013A (en) | Distributed transaction processing method and device | |
| CN104793988A (en) | Cross-database distributed transaction implementation method and device | |
| US12111817B2 (en) | Log execution method and apparatus, computer device and storage medium | |
| WO2015169067A1 (en) | Method, device, and system for peer-to-peer data replication and method, device, and system for master node switching | |
| CN103488526A (en) | System and method for locking business resource in distributed system | |
| US20060095435A1 (en) | Configuring and deploying portable application containers for improved utilization of server capacity | |
| CN115562911B (en) | Virtual machine data backup method, device, system, electronic equipment and storage medium | |
| WO2025112858A1 (en) | Timestamp generation method and apparatus, and electronic device, and non-volatile storage medium | |
| CN110427427B (en) | Method for realizing global transaction distributed processing through pin bridging | |
| CN119902932A (en) | A database synchronization method, device, equipment and storage medium | |
| CN109408201A (en) | Office management method based on distributed data base | |
| CN115237968B (en) | Node management methods, devices, equipment and storage media in database systems | |
| US20230185676A1 (en) | Database recovery based on logical timestamp | |
| WO2022206429A1 (en) | Distributed transaction implementation method and distributed system | |
| CN116303754A (en) | Database transaction snapshot generation method, device, equipment and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |