CN113505114B - Multi-version concurrent control method for database and database system - Google Patents
Multi-version concurrent control method for database and database system Download PDFInfo
- Publication number
- CN113505114B CN113505114B CN202110728250.7A CN202110728250A CN113505114B CN 113505114 B CN113505114 B CN 113505114B CN 202110728250 A CN202110728250 A CN 202110728250A CN 113505114 B CN113505114 B CN 113505114B
- Authority
- CN
- China
- Prior art keywords
- version
- transaction
- target
- data record
- snapshot
- 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.)
- Active
Links
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/21—Design, administration or maintenance of databases
- G06F16/219—Managing data history or versioning
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (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
本申请实施例提供一种数据库的多版本并发控制方法及数据库系统,涉及数据库技术领域。该方法包括:在目标事务启动时,为所述目标事务生成事务ID,所述事务ID包括启动所述目标事务的工作线程的线程号以及所述工作线程的当前本地计数值;获取数据库的逻辑快照,根据所述逻辑快照在待操作的目标数据记录对应的版本链上查找所述目标事务的目标可见版本;基于所述目标可见版本在目标数据记录的版本链上进行数据记录的读取或更新操作。本技术方案能够提供快照隔离的隔离级别、提高事务的运行效率。相比于现有方法,该并发控制方法具有更低的开销,可以显著增加数据库的事务处理能力,最高可达4.24倍的加速比。
The embodiment of the present application provides a multi-version concurrency control method and database system for a database, and relates to the field of database technology. The method includes: when a target transaction is started, generating a transaction ID for the target transaction, the transaction ID includes the thread number of the working thread that starts the target transaction and the current local count value of the working thread; obtaining a logical snapshot of the database, and searching for the target visible version of the target transaction on the version chain corresponding to the target data record to be operated according to the logical snapshot; and performing a read or update operation on the version chain of the target data record based on the target visible version. The technical solution can provide an isolation level of snapshot isolation and improve the operating efficiency of transactions. Compared with existing methods, the concurrency control method has lower overhead and can significantly increase the transaction processing capability of the database, with a speedup ratio of up to 4.24 times.
Description
技术领域Technical Field
本申请涉及数据库技术领域,具体地,涉及一种数据库的多版本并发控制方法及数据库系统。The present application relates to the field of database technology, and in particular to a multi-version concurrency control method for a database and a database system.
背景技术Background technique
数据库系统是现代计算机应用所依赖的重要软件之一。数据库系统具有事务处理接口,在运行事务时,需要借助并发控制算法来提供一定的隔离性保证。并发控制算法的设计会在很大程度上影响数据库系统的事务处理性能。The database system is one of the important software that modern computer applications rely on. The database system has a transaction processing interface. When running transactions, it needs to use a concurrency control algorithm to provide a certain degree of isolation guarantee. The design of the concurrency control algorithm will greatly affect the transaction processing performance of the database system.
传统数据库使用了基于内存-磁盘的两层存储架构,内存用来提供对数据的运行时访问,磁盘用于保证数据的持久化。非易失内存(Non-VolatileMemory,NVM)是一种新型存储介质,它既可以像内存一样支持字节寻址,又可以像磁盘一样持久化存储数据。借助NVM可以实现具有单层存储结构的新一代数据库。然而,由于NVM的访问速度要快于磁盘,磁盘不再是NVM单层数据库系统的性能瓶颈因素,因此需要使用更高效的并发控制算法才能充分发挥NVM的性能。Traditional databases use a two-tier storage architecture based on memory and disk, where memory is used to provide runtime access to data and disk is used to ensure data persistence. Non-volatile memory (NVM) is a new type of storage medium that can support byte addressing like memory and store data persistently like disk. With the help of NVM, a new generation of databases with a single-tier storage structure can be realized. However, since the access speed of NVM is faster than that of disk, disk is no longer the performance bottleneck factor of NVM single-tier database system, so a more efficient concurrency control algorithm is needed to give full play to the performance of NVM.
使用多版本并发控制算法是提高数据库事务处理性能的常用方法,多版本并发控制可以提供快照隔离的隔离级别,增加事务处理的并发程度。但是,传统的支持快照隔离的并发控制算法往往使用一个全局计数器来为事务分配事务ID,各个工作线程在启动事务时,都需要操作这个全局计数器,这将成为数据库系统的性能瓶颈因素,影响数据库的性能,尤其在工作线程数目较多时,事务的处理效率反而降低。Using a multi-version concurrency control algorithm is a common method to improve the performance of database transaction processing. Multi-version concurrency control can provide the isolation level of snapshot isolation and increase the concurrency of transaction processing. However, traditional concurrency control algorithms that support snapshot isolation often use a global counter to assign transaction IDs to transactions. Each worker thread needs to operate this global counter when starting a transaction, which will become a performance bottleneck factor of the database system and affect the performance of the database. In particular, when the number of worker threads is large, the efficiency of transaction processing is reduced.
发明内容Summary of the invention
本申请实施例提供一种数据库的多版本并发控制方法及数据库系统,以解决上述技术问题。The embodiments of the present application provide a database multi-version concurrency control method and a database system to solve the above technical problems.
第一方面,本申请实施例提供一种数据库的多版本并发控制方法,包括:在目标事务启动时,为所述目标事务生成事务ID,所述事务ID包括启动所述目标事务的工作线程的线程号以及所述工作线程的当前本地计数值,在生成事务ID后,所述工作线程的本地计数值递增i,i为不小于1的正整数;获取数据库的逻辑快照,根据所述逻辑快照在待操作的目标数据记录对应的版本链上查找所述目标事务的目标可见版本;其中,所述逻辑快照包含所述数据库中运行的各个工作线程对应的最新所完成事务的事务ID,所述版本链上包括目标数据记录的多个版本;基于所述目标可见版本,通过所述目标事务在目标数据记录的版本链上进行数据记录的读取或更新操作。In a first aspect, an embodiment of the present application provides a multi-version concurrency control method for a database, comprising: when a target transaction is started, generating a transaction ID for the target transaction, the transaction ID including the thread number of a working thread that starts the target transaction and a current local count value of the working thread, and after the transaction ID is generated, the local count value of the working thread is incremented by i, where i is a positive integer not less than 1; obtaining a logical snapshot of the database, and searching for a target visible version of the target transaction on a version chain corresponding to a target data record to be operated according to the logical snapshot; wherein the logical snapshot includes the transaction ID of the latest completed transaction corresponding to each working thread running in the database, and the version chain includes multiple versions of the target data record; based on the target visible version, performing a read or update operation on a data record on the version chain of the target data record through the target transaction.
第二方面,本申请实施例提供一种数据库系统,包括:事务ID分配模块,用于在目标事务启动时,为所述目标事务生成事务ID,所述事务ID包括启动所述目标事务的工作线程的线程号以及所述工作线程的当前本地计数值,在生成事务ID后,所述工作线程的本地计数值递增i,i为不小于1的正整数;逻辑快照获取模块,用于获取数据库的逻辑快照;其中,所述逻辑快照包含所述数据库中运行的各个工作线程对应的最新所完成事务的事务ID,所述版本链上包括目标数据记录的多个版本;数据记录操作模块,用于根据所述逻辑快照在待操作的目标数据记录对应的版本链上查找所述目标事务的目标可见版本,并基于所述目标可见版本,通过所述目标事务在目标数据记录的版本链上进行数据记录的读取或更新操作。In a second aspect, an embodiment of the present application provides a database system, including: a transaction ID allocation module, used to generate a transaction ID for a target transaction when a target transaction is started, the transaction ID including the thread number of a working thread that starts the target transaction and a current local count value of the working thread, after the transaction ID is generated, the local count value of the working thread is incremented by i, i is a positive integer not less than 1; a logical snapshot acquisition module, used to acquire a logical snapshot of a database; wherein the logical snapshot includes the transaction ID of the latest completed transaction corresponding to each working thread running in the database, and the version chain includes multiple versions of a target data record; a data record operation module, used to search for a target visible version of the target transaction on a version chain corresponding to a target data record to be operated according to the logical snapshot, and based on the target visible version, perform a read or update operation on a data record on the version chain of the target data record through the target transaction.
本发明提出了一种支持快照隔离的多版本并发控制方法,该方法使用各个线程的本地计数器来为事务分配事务ID,并使用每个线程对应的最新所完成事务的事务ID来表示逻辑快照。相比现有的支持快照隔离的并发控制方法,本发明提出的方法无需维护全局计数器,各工作线程只需操作各自对应的本地计数器即可,减少了资源竞争,能有效提升事务处理效率,事务吞吐量能够随着线程数目的增加而很好地扩展。The present invention proposes a multi-version concurrency control method supporting snapshot isolation, which uses the local counter of each thread to assign a transaction ID to a transaction, and uses the transaction ID of the latest completed transaction corresponding to each thread to represent a logical snapshot. Compared with the existing concurrency control method supporting snapshot isolation, the method proposed by the present invention does not need to maintain a global counter, and each working thread only needs to operate its corresponding local counter, which reduces resource competition, can effectively improve transaction processing efficiency, and transaction throughput can be well expanded as the number of threads increases.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
图1示出了本申请实施例提供的多版本并发控制方法的流程图;FIG1 shows a flow chart of a multi-version concurrency control method provided by an embodiment of the present application;
图2示出了本申请实施例提供的多版本并发控制方法中事务在各个阶段的流程图;FIG2 shows a flowchart of a transaction at various stages in a multi-version concurrency control method provided in an embodiment of the present application;
图3示出了本申请实施例中事务ID的一种具体实现示意图;FIG3 shows a schematic diagram of a specific implementation of a transaction ID in an embodiment of the present application;
图4示出了本申请实施例中逻辑快照的一种具体实现示意图;FIG4 shows a schematic diagram of a specific implementation of a logical snapshot in an embodiment of the present application;
图5示出了本申请实施例中步骤S12中获取逻辑快照的流程图;FIG5 shows a flowchart of obtaining a logical snapshot in step S12 in an embodiment of the present application;
图6示出了本申请实施例中版本链的结构图;FIG6 shows a structural diagram of a version chain in an embodiment of the present application;
图7示出了在事务执行阶段,事务在版本链上读取数据记录的流程图;FIG7 shows a flow chart of a transaction reading data records on a version chain during the transaction execution phase;
图8示出了在事务执行阶段,事务在版本链上更新数据记录的流程图;FIG8 shows a flow chart of a transaction updating data records on a version chain during the transaction execution phase;
图9示出了本申请实施例提供的数据库系统的示意图;FIG9 shows a schematic diagram of a database system provided in an embodiment of the present application;
图10示出了本申请实施例提供的数据库系统的另一示意图;FIG10 shows another schematic diagram of a database system provided in an embodiment of the present application;
图11示出了本申请实施例将N2DB-M系统与N2DB系统进行对比得到的实验结果对照图;FIG11 is a comparison chart showing experimental results obtained by comparing the N2DB-M system with the N2DB system in an embodiment of the present application;
图12示出了本申请实施例将N2DB-M系统与N2DB系统进行对比得到的另一实验结果对照图。FIG. 12 shows another comparison chart of experimental results obtained by comparing the N2DB-M system with the N2DB system according to an embodiment of the present application.
具体实施方式Detailed ways
以下结合附图对本申请的示例性实施例进行详细说明,显然,所描述的实施例仅是本申请的一部分实施例,而不是所有实施例的穷举。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The following is a detailed description of the exemplary embodiments of the present application in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than an exhaustive list of all the embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.
本申请实施例提供一种数据库的多版本并发控制方法,图1示出了该多版本并发控制方法的流程图,其流程包括:The embodiment of the present application provides a multi-version concurrency control method for a database. FIG1 shows a flow chart of the multi-version concurrency control method, and the flow includes:
S100、在目标事务启动时,为目标事务生成事务ID。S100: When a target transaction is started, a transaction ID is generated for the target transaction.
S200、获取数据库的逻辑快照,其中,逻辑快照包含数据库中运行的各个工作线程对应的最新所完成事务的事务ID。S200: Acquire a logical snapshot of the database, wherein the logical snapshot includes the transaction ID of the latest completed transaction corresponding to each working thread running in the database.
S300、根据获取的逻辑快照在待操作的目标数据记录对应的版本链上查找目标事务的目标可见版本。数据库中包括有若干数据记录,目标事务本次待操作的数据记录则为目标数据记录,同一数据记录的多个版本形成版本链。S300: Search the target visible version of the target transaction on the version chain corresponding to the target data record to be operated according to the acquired logical snapshot. The database includes several data records, and the data record to be operated by the target transaction is the target data record. Multiple versions of the same data record form a version chain.
S400、基于目标可见版本,通过目标事务在目标数据记录的版本链上进行数据记录的读取或更新操作。S400: Based on the target visible version, a data record is read or updated on the version chain of the target data record through a target transaction.
在具体的实施例中,事务的生命周期包括启动、执行、结束三个阶段。如图2所示,在该多版本并发控制方法中,各个阶段的具体实施方式包括:In a specific embodiment, the life cycle of a transaction includes three stages: start, execute, and end. As shown in FIG2 , in the multi-version concurrency control method, the specific implementation methods of each stage include:
S1、事务启动阶段。S1, transaction startup phase.
数据库中运行有多个工作线程,工作线程在启动事务时,进入事务启动阶段。以其中某一目标事务的启动为例,事务启动阶段的执行步骤包括:There are multiple worker threads running in the database. When a worker thread starts a transaction, it enters the transaction start phase. Taking the start of a target transaction as an example, the execution steps of the transaction start phase include:
S11、在目标事务启动时,为目标事务生成事务ID。该事务ID包括启动目标事务的工作线程的线程号以及工作线程的当前本地计数值,在生成事务ID后,工作线程的本地计数值递增i;i为不小于1的正整数。可选的,i为1。S11. When the target transaction is started, a transaction ID is generated for the target transaction. The transaction ID includes the thread number of the working thread that starts the target transaction and the current local count value of the working thread. After the transaction ID is generated, the local count value of the working thread is incremented by i; i is a positive integer not less than 1. Optionally, i is 1.
目标事务的事务ID具有全局唯一性,图3示出了事务ID的一种具体实现示意图,如图3所示,事务ID的长度为64位,其中高8位为工作线程的线程号,低56位为该工作线程的本地计数器的值,每分配完成一个事务ID后,该工作线程的本地计数器就将递增1。The transaction ID of the target transaction is globally unique. FIG3 shows a specific implementation diagram of the transaction ID. As shown in FIG3 , the length of the transaction ID is 64 bits, of which the upper 8 bits are the thread number of the working thread, and the lower 56 bits are the value of the local counter of the working thread. After each transaction ID is allocated, the local counter of the working thread will be incremented by 1.
S12、获取数据库的逻辑快照,该逻辑快照中包含数据库中运行的各个工作线程最新所完成事务的事务ID。S12: Obtain a logical snapshot of the database, where the logical snapshot includes the transaction ID of the latest transaction completed by each working thread running in the database.
在本实施例中,逻辑快照采用向量时钟的方式进行表示,向量时钟通常被认为是一组来自不同节点的时钟值Vi[1]、Vi[2]、…、Vi[n],本方法将其用于表示逻辑快照。该逻辑快照中包含了数据库中运行的每个工作线程最新所完成事务的事务ID,能够表示快照生成时数据库系统中已完成事务的范围。图4示出了逻辑快照的一种具体实现示意图,其中,S=[3,2,7,5]为逻辑快照的一种向量时钟表示形式,它表示:数据库中的所有4个工作线程最新所完成事务的事务ID。如图4所示,线程0最新所完成事务的事务ID为T(0,3),其中,0表示“线程号”,3表示“本地计数值”,线程1最新所完成事务的事务ID为T(1,2),线程2最新所完成事务的事务ID为T(2,7),线程3最新所完成事务的事务ID为T(3,5),tsi表示工作线程i最新所完成事务的事务ID中的“本地计数值”。In this embodiment, the logical snapshot is represented by a vector clock. The vector clock is usually considered to be a set of clock values Vi[1], Vi[2], ..., Vi[n] from different nodes. This method uses it to represent the logical snapshot. The logical snapshot contains the transaction ID of the latest completed transaction of each working thread running in the database, which can represent the range of completed transactions in the database system when the snapshot is generated. FIG4 shows a specific implementation diagram of the logical snapshot, where S=[3,2,7,5] is a vector clock representation of the logical snapshot, which represents: the transaction ID of the latest completed transaction of all four working threads in the database. As shown in FIG4, the transaction ID of the latest completed transaction of thread 0 is T(0,3), where 0 represents the "thread number" and 3 represents the "local count value", the transaction ID of the latest completed transaction of thread 1 is T(1,2), the transaction ID of the latest completed transaction of thread 2 is T(2,7), the transaction ID of the latest completed transaction of thread 3 is T(3,5), and tsi represents the "local count value" in the transaction ID of the latest completed transaction of working thread i.
在一种实施例中,当数据库中工作线程的数目固定时,每个工作线程的线程号连续,逻辑快照可以以定长的数组进行表示,数组中的各个数值表示事务ID中的本地计数值,而事务ID中的线程号隐含在各个数组的位置关系中,如数组中第一个位置的数值为3,则对应的事务ID为线程号“0”+本地计数值“3”。在其他实施例中,当数据库中工作线程数目可变时,各个工作线程间的线程号不一定连续,则快照可以以哈希表形式进行表示。In one embodiment, when the number of working threads in the database is fixed, the thread number of each working thread is continuous, and the logical snapshot can be represented by a fixed-length array, and each value in the array represents a local count value in the transaction ID, and the thread number in the transaction ID is implicit in the position relationship of each array. For example, if the value of the first position in the array is 3, the corresponding transaction ID is thread number "0" + local count value "3". In other embodiments, when the number of working threads in the database is variable, the thread numbers between the working threads are not necessarily continuous, and the snapshot can be represented in the form of a hash table.
图5示出了步骤S12中获取逻辑快照的流程图。如图5所示,S12包括:FIG5 shows a flow chart of obtaining a logical snapshot in step S12. As shown in FIG5, S12 includes:
S121、判断是否有非目标事务正在生成逻辑快照;若没有,跳转至S122,若有,跳转至S124。S121, determine whether there is a non-target transaction generating a logical snapshot; if not, jump to S122; if yes, jump to S124.
S122、根据数据库中运行的各个工作线程最新所完成事务的事务ID生成一个新的逻辑快照。S122: Generate a new logical snapshot according to the transaction ID of the latest transaction completed by each working thread running in the database.
S123、将新生成的逻辑快照写入快照缓冲区。S123: Write the newly generated logical snapshot into the snapshot buffer.
S124、将快照缓冲区中的最新快照作为本次获取的逻辑快照。S124: Use the latest snapshot in the snapshot buffer as the logical snapshot obtained this time.
在上述步骤S121-S124中,需先判断是否有其他事务正在生成逻辑快照,根据判断结果确定如何获得逻辑快照,以保证快照隔离的正确性。如前所述,快照实际上描述了整个数据库系统中已完成事务的范围,对于两个不同的快照A和B来说,它们所描述的已完成事务的范围需要满足一个包含关系,即要么要么在本实施例中,不允许并发地生成快照(即,某事务在生成快照时,其他事务不能生成快照),这样是为了保证任意两个快照之间都满足上述的包含关系,从而确保快照隔离的正确性。In the above steps S121-S124, it is necessary to first determine whether other transactions are generating logical snapshots, and determine how to obtain the logical snapshots based on the determination results to ensure the correctness of snapshot isolation. As mentioned above, the snapshot actually describes the scope of completed transactions in the entire database system. For two different snapshots A and B, the scope of completed transactions they describe needs to satisfy an inclusion relationship, that is, either or In this embodiment, concurrent generation of snapshots is not allowed (ie, when a transaction generates a snapshot, other transactions cannot generate snapshots). This is to ensure that any two snapshots satisfy the above-mentioned inclusion relationship, thereby ensuring the correctness of snapshot isolation.
S2、事务执行阶段。S2: Transaction execution phase.
事务在完成以上所有操作后,进入执行阶段。若事务为读事务,则事务将读取数据库中的数据记录,若事务为写事务,则事务将更新数据库中的数据记录。在任何一个数据库中,事务在读/写数据时,数据库都会定义一个隔离级别,它描述了事务能看到哪些数据(尤其是:能否/何时能看到其他并发事务所写入的数据)。快照隔离即是其中一种隔离级别。在本实施例中,事务读取/更新数据记录的操作结果是符合快照隔离的要求的。After completing all the above operations, the transaction enters the execution phase. If the transaction is a read transaction, the transaction will read the data records in the database; if the transaction is a write transaction, the transaction will update the data records in the database. In any database, when a transaction reads/writes data, the database will define an isolation level, which describes what data the transaction can see (especially: whether/when it can see the data written by other concurrent transactions). Snapshot isolation is one of the isolation levels. In this embodiment, the operation results of the transaction reading/updating data records meet the requirements of snapshot isolation.
在本实施例中,同一数据记录的多个版本所形成的单向链表即为该数据记录的版本链,版本链的结构图如图6所示。版本链包括一个头节点和多个版本节点,头节点包括目标数据记录的ID和指向最新版本的指针(latest_version),版本节点包括版本创建者的事务ID、该版本的载荷数据以及指向前一版本的指针(prev_version)。In this embodiment, the one-way linked list formed by multiple versions of the same data record is the version chain of the data record, and the structure of the version chain is shown in Figure 6. The version chain includes a head node and multiple version nodes. The head node includes the ID of the target data record and a pointer to the latest version (latest_version). The version node includes the transaction ID of the creator of the version, the payload data of the version, and a pointer to the previous version (prev_version).
在S2中,事务执行阶段的操作又分为事务读取数据记录(S21)和事务更新数据记录(S22)。事务在读取数据库中的某一目标数据记录时,会根据持有的逻辑快照,基于一定的可见性规则在多版本存储中沿着目标数据记录的版本链找到目标可见版本,并读取目标可见版本中的内容。请参照图7,事务在版本链上读取数据记录的具体过程包括:In S2, the operations in the transaction execution phase are divided into transaction reading data records (S21) and transaction updating data records (S22). When a transaction reads a target data record in the database, it will find the target visible version along the version chain of the target data record in the multi-version storage based on the logical snapshot it holds and certain visibility rules, and read the content in the target visible version. Please refer to Figure 7, the specific process of a transaction reading a data record on the version chain includes:
S211、根据待操作的目标数据记录的ID在数据库中获取目标数据记录的版本链。S211. Obtain a version chain of the target data record in a database according to the ID of the target data record to be operated.
S212、设定版本链中的最新版本为当前考察的目标版本。S212. Set the latest version in the version chain as the target version currently being examined.
S213、获取目标版本的创建者的事务ID。S213. Obtain the transaction ID of the creator of the target version.
在S213中,从版本链中获取目标版本的版本节点中所对应的事务ID。In S213, the transaction ID corresponding to the version node of the target version is obtained from the version chain.
S214、根据创建者的事务ID中的线程号,从获取的逻辑快照中的各事务ID中确定相应线程号所对应的本地计数值。S214 . According to the thread number in the creator's transaction ID, determine the local count value corresponding to the corresponding thread number from each transaction ID in the acquired logical snapshot.
从获取的事务ID中提取线程号和本地计数值,根据其中的线程号从逻辑快照中查找到对应线程号的本地计数值,将两个本地计数值进行对比。The thread number and the local count value are extracted from the obtained transaction ID, and the local count value of the corresponding thread number is found from the logical snapshot according to the thread number, and the two local count values are compared.
S215、判断创建者的事务ID中的本地计数值是否不大于根据逻辑快照确定的本地计数值;若大于,跳转至S216,若不大于,跳转至S217。S215. Determine whether the local count value in the creator's transaction ID is not greater than the local count value determined according to the logical snapshot; if greater, jump to S216; if not, jump to S217.
在S215中,比较目标版本的创建者的事务ID与获取的快照中相应线程最新所完成事务的事务ID的大小关系,从而判断目标版本是否是在该逻辑快照生成前被创建。In S215 , the transaction ID of the creator of the target version is compared with the transaction ID of the latest completed transaction of the corresponding thread in the acquired snapshot, so as to determine whether the target version is created before the logical snapshot is generated.
S216、设定当前目标版本的前一版本为新的目标版本,然后跳转至S213。S216, setting the previous version of the current target version as the new target version, and then jumping to S213.
S217、判断创建者的提交状态是否为已提交;若为已提交,跳转至S218,若不为已提交,跳转至S216。S217, determine whether the creator's submission status is submitted; if it is submitted, jump to S218, if not submitted, jump to S216.
在本实施例中,数据库中各个工作线程都维护自己的提交日志,各工作线程的提交日志是解耦的,每个提交日志记录了对应线程上所有事务的提交状态(包括运行中、已提交、已回滚)。在S217中,在相应线程的提交日志上利用目标版本的创建者的事务ID进行查询,以获取该创建者的提交状态。In this embodiment, each worker thread in the database maintains its own commit log, and the commit logs of each worker thread are decoupled. Each commit log records the commit status of all transactions on the corresponding thread (including running, committed, and rolled back). In S217, the transaction ID of the creator of the target version is used to query the commit log of the corresponding thread to obtain the commit status of the creator.
S218、将当前目标版本确定为目标可见版本。S218. Determine the current target version as the target visible version.
S219、由目标事务从该版本链中读取目标可见版本的载荷数据。S219: The target transaction reads the payload data of the target visible version from the version chain.
事务在沿着版本链进行查找的过程中,会选择第一个在快照生成之前创建的、并且其创建者处于已提交状态的版本作为对自己可见的版本,即目标可见版本。如果没有这样的版本,则读取操作将会失败。例如,在考察完一个目标版本后,若所考察的版本不满足要求,会将目标版本设定为当前目标版本的指针指向的前一版本,前一版本可能存在(prev_version指针非空),也可能不存在(prev_version为空指针),当目标版本不存在时,表明无法找到可见版本,本次读取操作失败。When searching along the version chain, the transaction will select the first version created before the snapshot is generated and whose creator is in a committed state as the visible version to itself, that is, the target visible version. If there is no such version, the read operation will fail. For example, after examining a target version, if the examined version does not meet the requirements, the target version will be set to the previous version pointed to by the pointer of the current target version. The previous version may exist (prev_version pointer is not null) or may not exist (prev_version is a null pointer). When the target version does not exist, it indicates that the visible version cannot be found and the read operation fails.
当目标事务确定目标可见版本后,从该版本链中读取目标可见版本的载荷数据,完成数据记录读取操作。After the target transaction determines the target visible version, it reads the payload data of the target visible version from the version chain to complete the data record reading operation.
进一步的,事务在更新数据库中的某一目标数据记录时,需要为数据记录加锁以及根据持有的逻辑快照进行冲突检测,在冲突检测通过后,进行数据记录更新操作。请参照图8,事务在版本链上更新数据记录的具体过程包括:Furthermore, when a transaction updates a target data record in the database, it needs to lock the data record and perform conflict detection based on the logical snapshot held. After the conflict detection passes, the data record update operation is performed. Please refer to Figure 8, the specific process of a transaction updating a data record on the version chain includes:
S221、为目标数据记录的版本链添加记录锁;若加锁成功,跳转至S222,若加锁失败,跳转至S225。S221. Add a record lock to the version chain of the target data record; if the lock is successful, jump to S222; if the lock fails, jump to S225.
首先对需要更新的目标数据记录的版本链添加记录锁,如果加锁失败,说明有并发事务正在修改同一条数据记录,当前目标事务的更新操作失败,需要进入回滚流程。First, add a record lock to the version chain of the target data record that needs to be updated. If the lock fails, it means that a concurrent transaction is modifying the same data record. The update operation of the current target transaction fails and needs to enter the rollback process.
S222、根据逻辑快照在该版本链上查找目标事务的目标可见版本。S222. Search for the target visible version of the target transaction on the version chain according to the logical snapshot.
S223、检测版本链上是否存在比目标事务的目标可见版本更新的版本、且更新的版本的创建者的提交状态为已提交或者运行中;若不存在,跳转至S224,若存在,跳转至S226。S223. Check whether there is a version on the version chain that is newer than the target visible version of the target transaction, and the submission status of the creator of the newer version is submitted or running; if not, jump to S224; if so, jump to S226.
在S222~223中,进行冲突检测。在更新数据记录前,需要判断当前的目标数据记录是否已被并发事务更新,以防止写冲突。在前述步骤S212-218中已经提供了版本链上对事务可见版本的判断方法,在S222中,采用相同的方法,根据目标事务持有的逻辑快照,确定目标事务的目标可见版本,并在S223中基于目标可见版本进行冲突检测。冲突检测的原则是:版本链上不能有比当前事务可见版本更新的、且处于已提交或运行中的版本。如果存在这样的版本,则该可见版本已经被并发事务所修改,冲突检测不通过,当前事务不能继续更新数据记录,它将释放记录锁,并执行回滚流程。In S222-223, conflict detection is performed. Before updating the data record, it is necessary to determine whether the current target data record has been updated by a concurrent transaction to prevent write conflicts. The method for determining the visible version of the transaction on the version chain has been provided in the aforementioned steps S212-218. In S222, the same method is used to determine the target visible version of the target transaction based on the logical snapshot held by the target transaction, and conflict detection is performed based on the target visible version in S223. The principle of conflict detection is: there cannot be a version on the version chain that is newer than the visible version of the current transaction and is in the committed or running state. If such a version exists, the visible version has been modified by a concurrent transaction, the conflict detection fails, the current transaction cannot continue to update the data record, it will release the record lock, and execute the rollback process.
S224、由目标事务在版本链上进行数据记录的更新操作。S224: The target transaction performs an update operation on the data record on the version chain.
在冲突检测通过后,目标事务可以继续更新数据记录,其具体过程为:After the conflict detection passes, the target transaction can continue to update the data record. The specific process is as follows:
1)在数据库的存储层中为目标数据记录创建一个新的版本节点;1) Create a new version node for the target data record in the storage layer of the database;
2)在新创建的版本节点上写入目标事务的ID和载荷数据;2) Write the ID and payload data of the target transaction on the newly created version node;
3)维护版本链指针,使新创建的版本节点的指针指向当前版本链中的最新版本,并使当前版本链的头节点的指针指向新创建的版本节点;3) Maintain the version chain pointer so that the pointer of the newly created version node points to the latest version in the current version chain, and the pointer of the head node of the current version chain points to the newly created version node;
4)释放版本链上的记录锁。4) Release the record lock on the version chain.
S225、对目标事务执行回滚流程。S225: Execute the rollback process for the target transaction.
S226、释放版本链上的记录锁,并对目标事务执行回滚流程。S226. Release the record lock on the version chain and execute the rollback process for the target transaction.
目标事务在事务执行阶段完成数据记录的读/写操作后,进入事务结束流程。After the target transaction completes the read/write operation of the data record in the transaction execution phase, it enters the transaction end process.
S3、事务结束阶段。S3: Transaction end stage.
事务的结束包括提交和回滚两种情况,本实施例中的并发控制方法对这两种情况作统一处理。事务结束的步骤为:The end of a transaction includes two situations: commit and rollback. The concurrency control method in this embodiment handles these two situations uniformly. The steps for ending a transaction are:
S31、在启动目标事务的工作线程的提交日志中,更新目标事务的提交状态,记录目标事务的提交状态为已提交或已回滚。S31. In the commit log of the working thread that starts the target transaction, the commit status of the target transaction is updated, and the commit status of the target transaction is recorded as committed or rolled back.
S32、将工作线程对应的最新所完成事务的事务ID更新为目标事务的事务ID,供以后的快照生成过程使用。S32: Update the transaction ID of the latest completed transaction corresponding to the working thread to the transaction ID of the target transaction for use in subsequent snapshot generation processes.
基于上述实施例,本申请还提供一种数据库系统,该数据库系统可以是基于非易失内存(NVM)的数据库系统,也可以是基于传统磁盘或内存的数据库系统。本实施例中的多版本并发控制方法要求数据库的存储层采用多版本存储,如图9所示,该数据库系统中包括:Based on the above embodiment, the present application also provides a database system, which can be a database system based on non-volatile memory (NVM) or a database system based on a traditional disk or memory. The multi-version concurrency control method in this embodiment requires that the storage layer of the database adopts multi-version storage, as shown in FIG9 , and the database system includes:
(1)提交日志。在本实施例中,数据库中各个工作线程都维护自己的提交日志,各工作线程的提交日志是解耦的,每个提交日志记录了对应线程上所有事务的提交状态(包括运行中、已提交、已回滚)。(1) Commit log. In this embodiment, each worker thread in the database maintains its own commit log. The commit logs of each worker thread are decoupled. Each commit log records the commit status of all transactions on the corresponding thread (including running, committed, and rolled back).
(2)快照缓冲区。快照缓冲区用来保存最近一段时间内生成过的数据库的逻辑快照。(2) Snapshot buffer: The snapshot buffer is used to save logical snapshots of the database generated in the recent period of time.
(3)版本链表存储区。版本链表存储区中存储有多条版本链,每条版本链对应一条数据记录的多个版本,其中,版本链包括一个头节点和多个版本节点,头节点包括目标数据记录的ID和指向最新版本的指针,版本节点包括版本创建者的事务ID、该版本的载荷数据以及指向前一版本的指针。(3) Version chain storage area. The version chain storage area stores multiple version chains, each of which corresponds to multiple versions of a data record. The version chain includes a head node and multiple version nodes. The head node includes the ID of the target data record and a pointer to the latest version. The version node includes the transaction ID of the creator of the version, the payload data of the version, and a pointer to the previous version.
如图10所示,本申请实施例提供的数据库系统包括以下模块:As shown in FIG10 , the database system provided in the embodiment of the present application includes the following modules:
事务ID分配模块410,用于在目标事务启动时,为所述目标事务生成事务ID,所述事务ID包括启动所述目标事务的工作线程的线程号以及所述工作线程的当前本地计数值,在生成事务ID后,所述工作线程的本地计数值递增i;i为不小于1的正整数;The transaction ID allocation module 410 is used to generate a transaction ID for the target transaction when the target transaction is started. The transaction ID includes the thread number of the working thread that starts the target transaction and the current local count value of the working thread. After the transaction ID is generated, the local count value of the working thread is incremented by i; i is a positive integer not less than 1;
逻辑快照获取模块420,用于获取数据库的逻辑快照,其中,所述逻辑快照包含所述数据库中运行的各个工作线程最新所完成事务的事务ID,所述版本链上包括目标数据记录的多个版本;The logical snapshot acquisition module 420 is used to acquire a logical snapshot of the database, wherein the logical snapshot includes the transaction ID of the latest transaction completed by each work thread running in the database, and the version chain includes multiple versions of the target data record;
数据记录操作模块430,用于根据所述逻辑快照在待操作的目标数据记录对应的版本链上查找所述目标事务的目标可见版本;并基于所述目标可见版本,通过所述目标事务在目标数据记录的版本链上进行数据记录的读取或更新操作。The data record operation module 430 is used to search for the target visible version of the target transaction on the version chain corresponding to the target data record to be operated according to the logical snapshot; and based on the target visible version, perform a data record read or update operation on the version chain of the target data record through the target transaction.
可以理解,本实施例中的数据库系统,其实现原理及产生的技术效果在前述方法实施例中已经介绍,为简要描述,该数据库系统中未提及之处可以参照前述方法实施例中的相应描述,在此不赘述。It can be understood that the implementation principle and technical effects of the database system in this embodiment have been introduced in the aforementioned method embodiment. For the sake of brief description, the parts not mentioned in the database system can refer to the corresponding description in the aforementioned method embodiment and will not be repeated here.
为了验证本发明提出的多版本并发控制方法的实际使用效果,将使用本发明实施例提供的多版本并发控制方法的NVM数据库系统记为“N2DB-M”,将使用PostgreSQL并发控制方法的NVM系统记为“N2DB”,将N2DB-M与N2DB的性能进行对比。实验环境为单台配备18核心CPU和6条Optane非易失内存(NVM)的机器。在不同工作线程数目下测量两个系统的事务吞吐量,得到的实验结果如图11和图12所示,图11表示在使用负载A、负载B、负载C进行实验的情况下,两个系统在不同线程数目下的事务吞吐量,图12表示在使用TPC-C负载、且TPC-C负载参数“仓库数目”等于1、等于4、等于线程数目的情况下,两个系统在不同线程数目下的事务吞吐量。这些负载实验下N2DB-M均取得了比N2DB更高的最大事务吞吐,最高能获得近三倍的加速比。In order to verify the actual use effect of the multi-version concurrency control method proposed in the present invention, the NVM database system using the multi-version concurrency control method provided by the embodiment of the present invention is recorded as "N2DB-M", and the NVM system using the PostgreSQL concurrency control method is recorded as "N2DB", and the performance of N2DB-M is compared with that of N2DB. The experimental environment is a single machine equipped with an 18-core CPU and 6 Optane non-volatile memory (NVM). The transaction throughput of the two systems is measured under different numbers of working threads, and the experimental results obtained are shown in Figures 11 and 12. Figure 11 shows the transaction throughput of the two systems under different numbers of threads when using load A, load B, and load C for experiments. Figure 12 shows the transaction throughput of the two systems under different numbers of threads when using TPC-C load and the TPC-C load parameter "number of warehouses" is equal to 1, equal to 4, and equal to the number of threads. Under these load experiments, N2DB-M has achieved a higher maximum transaction throughput than N2DB, and can obtain a nearly three-fold acceleration ratio.
本发明提供的多版本并发控制方法的优势在于工作线程数目增加时事务处理的性能可扩展。从实验结果可以看出,由于N2DB采用的PostgreSQL并发控制方法,使用全局计数器来为事务分配时间戳,在生成快照时需要对该全局计数器加锁,因此在工作线程数目较多时事务吞吐反而会因全局锁而下降。而N2DB-M的事务吞吐能够随着工作线程数目的增加而很好地扩展。The advantage of the multi-version concurrency control method provided by the present invention is that the performance of transaction processing can be expanded when the number of worker threads increases. From the experimental results, it can be seen that since the PostgreSQL concurrency control method adopted by N2DB uses a global counter to assign timestamps to transactions, the global counter needs to be locked when generating snapshots. Therefore, when the number of worker threads is large, the transaction throughput will decrease due to the global lock. However, the transaction throughput of N2DB-M can be well expanded as the number of worker threads increases.
综上所述,本发明设计了一种支持快照隔离的多版本并发控制方法,该方法借助工作线程的本地计数器来为事务分配事务ID,去掉了原有的全局计数器,转而让各个线程的本地计数器来代替全局计数器,进一步的,以“多计数器代替全局计数器”为基础,本发明设计了事务的运行流程,从而正确地实现快照隔离这一隔离级别。由于现有技术为了确保快照正确性,通常需要对全局计数器加锁,导致其性能上存在瓶颈,而本技术方案中,各工作线程只需操作各自对应的本地计数器即可,各本地计数器不需要加锁,减少了资源竞争,使得本方案具有更优的扩展性。此外,本技术方案中各工作线程的提交日志是解耦的,因此提交日志上不会出现写竞争,相对于使用全局提交日志的方案来说性能更优。In summary, the present invention designs a multi-version concurrency control method that supports snapshot isolation. The method uses the local counter of the working thread to assign a transaction ID to the transaction, removes the original global counter, and replaces the global counter with the local counter of each thread. Further, based on "multiple counters replace global counters", the present invention designs the operation process of the transaction, so as to correctly implement the isolation level of snapshot isolation. Since the prior art usually needs to lock the global counter in order to ensure the correctness of the snapshot, resulting in a bottleneck in its performance, in the present technical solution, each working thread only needs to operate its corresponding local counter, and each local counter does not need to be locked, which reduces resource competition and makes the present solution have better scalability. In addition, the commit log of each working thread in the present technical solution is decoupled, so there will be no write competition on the commit log, and the performance is better than the solution using the global commit log.
需要说明的是,本发明提出的并发控制算法具有通用性,不仅适用于NVM数据库,也适用于传统的磁盘或内存数据库。It should be noted that the concurrency control algorithm proposed in the present invention is universal and is applicable not only to NVM databases, but also to traditional disk or memory databases.
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to the flowchart and/or block diagram of the method, device (system) and computer program product according to the embodiment of the present application. It should be understood that each process and/or box in the flowchart and/or block diagram, and the combination of the process and/or box in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for realizing the function specified in one process or multiple processes in the flowchart and/or one box or multiple boxes in the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.
尽管已描述了本申请的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请范围的所有变更和修改。Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims (11)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110728250.7A CN113505114B (en) | 2021-06-29 | 2021-06-29 | Multi-version concurrent control method for database and database system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110728250.7A CN113505114B (en) | 2021-06-29 | 2021-06-29 | Multi-version concurrent control method for database and database system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113505114A CN113505114A (en) | 2021-10-15 |
CN113505114B true CN113505114B (en) | 2024-08-06 |
Family
ID=78009518
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110728250.7A Active CN113505114B (en) | 2021-06-29 | 2021-06-29 | Multi-version concurrent control method for database and database system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113505114B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114691307B (en) * | 2022-03-16 | 2025-01-14 | 阿里巴巴(中国)有限公司 | Transaction processing method and computer system |
CN116401262B (en) * | 2023-03-06 | 2024-02-02 | 安芯网盾(北京)科技有限公司 | Database upgrading method and device |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104412241A (en) * | 2012-06-21 | 2015-03-11 | 微软公司 | Memory compaction mechanism for main memory databases |
CN108363806A (en) * | 2018-03-01 | 2018-08-03 | 上海达梦数据库有限公司 | Multi-version concurrency control method, device, server and the storage medium of database |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5287496A (en) * | 1991-02-25 | 1994-02-15 | International Business Machines Corporation | Dynamic, finite versioning for concurrent transaction and query processing |
US10346386B2 (en) * | 2016-11-04 | 2019-07-09 | Salesforce.Com, Inc. | Multiversion concurrency control of database records with uncommitted transactions |
GB201801679D0 (en) * | 2018-02-01 | 2018-03-21 | Microsoft Technology Licensing Llc | Database transaction log writing and integrity checking |
-
2021
- 2021-06-29 CN CN202110728250.7A patent/CN113505114B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104412241A (en) * | 2012-06-21 | 2015-03-11 | 微软公司 | Memory compaction mechanism for main memory databases |
CN108363806A (en) * | 2018-03-01 | 2018-08-03 | 上海达梦数据库有限公司 | Multi-version concurrency control method, device, server and the storage medium of database |
Also Published As
Publication number | Publication date |
---|---|
CN113505114A (en) | 2021-10-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5284103B2 (en) | Software transactional memory optimization | |
US9632769B2 (en) | Software build optimization | |
US11556396B2 (en) | Structure linked native query database management system and methods | |
US7590806B2 (en) | Filtering of transactional memory operations using associative tables | |
US9081803B2 (en) | Performance of RCU-based searches and updates of cyclic data structures | |
CN113505114B (en) | Multi-version concurrent control method for database and database system | |
CN113672556B (en) | Batch file migration method and device | |
CN107665219B (en) | Log management method and device | |
US10664286B2 (en) | Enhanced performance for graphical processing unit transactional memory | |
Palmieri et al. | Aggro: Boosting stm replication via aggressively optimistic transaction processing | |
CN111767337B (en) | Block verification method, device and equipment | |
CN112100188A (en) | Concurrency control method and system based on machine learning | |
CN112579291A (en) | StateDB-based intelligent contract parallel operation system and parallel operation method | |
Wang et al. | The concurrent learned indexes for multicore data storage | |
US10671427B2 (en) | Snapshot isolation in graphical processing unit hardware transactional memory | |
CN113835847A (en) | Snapshot-based transaction processing optimization method for distributed ledger platform | |
JP7661656B2 (en) | Fast Skiplist Purge | |
Zhang et al. | Boosting performance and QOS for concurrent GPU B+ trees by combining-based synchronization | |
JP5186334B2 (en) | Conversion device, program, and conversion method | |
Assiri et al. | Approximately opaque multi-version permissive transactional memory | |
CN115796874B (en) | Concurrent execution method for blockchain transaction at operation level | |
CN115203203B (en) | A cloud platform key-value storage data orchestration method based on hot data upstream | |
Xiongpai et al. | Simulation of main memory database parallel recovery | |
CN114840545A (en) | Block chain fine-grained editing method supporting rapid state updating | |
CN120234317A (en) | A concurrency control decoupled cloud native database system and transaction processing method thereof |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |