WO2018113534A1 - Procédé et appareil de traitement de blocage de base de données, et système de base de données - Google Patents

Procédé et appareil de traitement de blocage de base de données, et système de base de données Download PDF

Info

Publication number
WO2018113534A1
WO2018113534A1 PCT/CN2017/115191 CN2017115191W WO2018113534A1 WO 2018113534 A1 WO2018113534 A1 WO 2018113534A1 CN 2017115191 W CN2017115191 W CN 2017115191W WO 2018113534 A1 WO2018113534 A1 WO 2018113534A1
Authority
WO
WIPO (PCT)
Prior art keywords
sub
transaction
savepoint
transactions
rollback
Prior art date
Application number
PCT/CN2017/115191
Other languages
English (en)
Chinese (zh)
Inventor
范孝剑
张广舟
林晓斌
周正中
Original Assignee
阿里巴巴集团控股有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2018113534A1 publication Critical patent/WO2018113534A1/fr

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/466Transaction processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • G06F9/524Deadlock detection or avoidance

Definitions

  • the present application relates to the field of databases, and in particular, to a method, an apparatus, and a database system for processing a database deadlock.
  • Non-deprivation conditions The resources that the process has obtained cannot be forcibly deprived until the end of use.
  • Loop wait condition A loop-waiting resource relationship between head and tail is formed between several processes.
  • the method of resolving a deadlock in an existing database is usually determined by the database to determine whether a deadlock occurs. If a deadlock is found, the entire transaction operation is rolled back, and the application retry or requires human intervention. If a transaction takes a long time to execute, then when a transaction is forced to roll back due to a deadlock in execution, the transaction needs to be executed from the beginning, which can take a lot of unnecessary time.
  • the purpose of the embodiments of the present application is to provide a method, an apparatus, and a database system for processing a database deadlock to improve the execution efficiency of a transaction in which a deadlock occurs.
  • a method for processing a database deadlock comprising: dividing a transaction into N sub-transactions executed sequentially, wherein N is a positive integer greater than 1; each of the N sub-transactions Creating a savepoint before the transaction is executed; sequentially executing the N child transactions; when the nth child transaction of the N child transactions has a lock wait and the wait time is greater than the first wait time corresponding to the nth child transaction, the transaction is rolled back To roll back the savepoint, where n is a positive integer less than or equal to N, the rollback savepoint is a savepoint created before the execution of the nth child transaction; continue to execute the rollback in the N subtransactions Sub-transaction after the point.
  • an apparatus for processing a database deadlock comprising: a transaction division unit, an execution unit, a savepoint creation unit, and a transaction rollback unit, wherein the transaction division unit divides the transaction into sequentially executed N a sub-transaction, where N is a positive integer greater than one; the execution unit sequentially executes the N sub-transactions; the savepoint creation unit creates a savepoint before executing each of the N sub-transactions; when the N sub-transactions When the nth child transaction in the lock waits and the wait time is greater than the first wait time corresponding to the nth child transaction, the transaction rollback unit rolls back the transaction to the rollback savepoint, where n is less than or equal to N.
  • the rollback savepoint is a savepoint created before the execution of the nth child transaction; the execution unit continues to execute the N sequentially after the transaction rollback unit rolls back the transaction to the rollback savepoint The child transaction in the child transaction after the rollback savepoint.
  • the above at least one technical solution adopted by the embodiment of the present application can achieve the following beneficial effects: by splitting a transaction into multiple sub-transactions and setting a save point before execution, the sub-transaction in which the lock transaction waits for more than the first corresponding to the sub-transaction After waiting for the time, roll back to the savepoint before the child transaction and continue execution, so that the execution efficiency of the deadlock transaction can be improved to some extent.
  • FIG. 1 is a flowchart of a method for processing a database deadlock according to an embodiment of the present application
  • FIG. 2 is a flow chart of a specific processing method for database deadlock in an embodiment of the present application
  • FIG. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of an apparatus for processing a database deadlock according to an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of an apparatus for processing a database deadlock according to another embodiment of the present application.
  • FIG. 1 is a flow chart of a method for processing a database deadlock in an embodiment of the present application.
  • the method of Figure 1 is processed by the data
  • the device of the deadlock is executed.
  • the device that handles database deadlocks may be a functional module of the database system.
  • the method includes:
  • N is a positive integer greater than one.
  • Transaction is a program execution unit that accesses and possibly updates various data items in the database.
  • a transaction consists of the entire operation performed between a begin transaction and an end transaction.
  • a transaction can be a Structured Query Language (SQL) statement, a set of SQL statements, or an entire program.
  • SQL Structured Query Language
  • the transaction includes a plurality of Insert, Update, or Delete SQL statements and other database manipulation statements involving database modification, which can be further divided into a plurality of sub-transactions.
  • the transaction can be further divided into multiple sub-transactions.
  • the transaction can be divided into sub-transaction 1 and sub-transaction 2, where
  • Subtransaction 1 is:
  • Subtransaction 2 is:
  • the transaction can also be divided into a sub-transaction 1, a sub-transaction 2, and a sub-transaction 3, wherein
  • Subtransaction 1 is:
  • Subtransaction 2 is:
  • Subtransaction 3 is:
  • the sub-transaction may be divided according to the number of SQL statements therein, or the number of records inserted, updated, or deleted may be sub-transactions according to the number of records required to be inserted (updated), updated (updated), or deleted (Delete).
  • the sub-transaction is divided according to the pre-estimated execution time, and the application is not limited herein.
  • a savepoint is a logical point in a transaction process. By saving a point, the transaction can be rolled back to the state of the savepoint without having to roll back the entire transaction.
  • savepoints can be created with the savepoint savepoint_name command. Where savepoint_name represents the savepoint name.
  • n is a positive integer less than or equal to N
  • the rollback savepoint is a savepoint created before the execution of the nth child transaction.
  • nth sub-transaction of the present application refers to the nth sub-transaction executed sequentially in the N sub-transactions.
  • the rollback savepoint is a savepoint created before the execution of the nth child transaction.
  • the selection of the rollback savepoint determines the number of child transactions that the transaction needs to roll back. Therefore, before step S140, the method may further include: determining the rollback savepoint.
  • determining the rollback savepoint may be implemented as: when the nth sub-transaction of the N sub-transactions has a lock wait for the i-th time and the waiting time is greater than the first corresponding to the n-th sub-transaction Waiting time, according to the number of sub-transactions s that need to be rolled back according to the i-th lock, determine the roll-back save point, the mapping relationship between s and i is preset, and both i and s are positive integers.
  • mapping relationship between s and i is preset.
  • a mapping relationship table between s and i may be preset, or a functional relationship between s and i may be preset, and so on.
  • mapping relationship between s and i can be as shown in Table 1:
  • mapping relationship table and function relationship are only schematic, and in actual applications, they can be set according to actual conditions.
  • the number of sub-transactions s that need to be rolled back may be greater than the number n of sub-transactions that have been currently executed, when s ⁇ n, it may be determined that s sub-transactions need to be rolled back; when s ⁇ n To determine the need to roll back n child transactions. In other words, when s ⁇ n, it is determined that the first save point before the n-s+1th sub-transaction is the roll-back save point; or, when s ⁇ n, the save point before the first sub-transaction is determined. Save the point for this rollback.
  • the number of sub-transactions that need to be rolled back is determined by the number of times the lock waits and the waiting time is greater than the first waiting time, and the save point of the rollback is determined, thereby avoiding the rollback.
  • the child transaction is set too low to release the lock, or the transaction is rolled back due to too many child transaction settings being rolled back.
  • the first waiting time corresponding to the lock waiting of each of the N sub-transactions may be the same or different.
  • the first waiting time may be set by a user of the database.
  • the user can set a fixed value for the first waiting time, or set the first waiting time according to some configuration rule.
  • Setting a first waiting time according to a parameter for example, a data operation type according to the nth sub-transaction, a record number of data operations related to the n-th sub-transaction, a sequence number n of the n-th sub-transaction, and the nth At least one of the number of times the sub-transaction has a lock waiting, setting the first waiting time.
  • the first waiting time is set according to a random number. Setting the first wait time by random number prevents all connection timeouts from being the same.
  • the user can interfere with the deadlock process and improve the execution efficiency of the database.
  • the number of sub-transactions that are rolled back can be reduced to some extent on the premise that the lock is released after the sub-transaction is rolled back.
  • step S150 is specifically implemented as: after rolling back to the rollback savepoint and waiting for the second waiting time, continuing to sequentially execute the sub-sub-transactions of the N sub-transactions after the roll-back savepoint Transaction.
  • the second waiting time may be set by a user of the database.
  • the user can set a fixed value for the second waiting time or set the second waiting time according to some configuration rule.
  • the second waiting time is determined according to the type of SQL involved in the transaction.
  • data The second wait time of the Data Definition Language (DDL) type can be set longer; the second wait time of the data manipulation language (DML) can be set shorter, and so on.
  • DDL Data Definition Language
  • DML data manipulation language
  • the second waiting time is set according to a random number. Setting the second wait time by random number prevents all connection timeouts from being the same.
  • the transaction that holds the lock of the nth child transaction can be prevented to some extent without releasing the lock, thereby causing the nth child.
  • the transaction continues to lock out, further improving the execution efficiency of the deadlocked transaction.
  • the method further includes: when the save point corresponding to each of the N sub-transactions is created, the save point is sequentially recorded; and the transaction is rolled back to the rollback save When you click, delete the record of the savepoint created after the rollback savepoint.
  • the created savepoint can be deleted by the release savepoint command.
  • the specific command format is as follows
  • savepoint_name represents the name of the savepoint created.
  • the record of the savepoint created after the rollback savepoint is also deleted from the linked list or data structure.
  • the device for processing the database deadlock can quickly locate the save point of the rollback in the subsequent operation of determining the save point of the rollback.
  • the save points created by each of the N sub-transactions before execution may be stored in the linked list in order, wherein the roll-back save point is by searching The list is determined.
  • searching for a rollback savepoint that needs to be rolled back through the linked list can improve the efficiency of finding a rollback savepoint, thereby further improving the execution efficiency of the transaction in which the deadlock occurs.
  • each of the N sub-transactions is created by a savepoint created before the execution according to the sequence number of the savepoint and a predetermined rule, and the rollback savepoint is based on the back The serial number of the savepoint is determined by the predetermined rule.
  • the record of the savepoint is not required.
  • the naming rule of the savepoint can be agreed to as the identifier name + sequence number.
  • the name of the savepoint can be determined to be rolled back, thereby finding the savepoint.
  • FIG. 1 of the present application will be further described in conjunction with specific embodiments.
  • the transaction can be divided into three sub-transactions: sub-transaction 1, sub-transaction 2, and sub-transaction 3.
  • the execution order is performed in the order of sub-transaction 1, sub-transaction 2, and sub-transaction 3.
  • the savepoint savepoint1 is established; before the sub-transaction 2 is executed, the savepoint savepoint2 is established; before the sub-transaction 2 is executed, the savepoint savepoint3 is established.
  • a lock wait occurs when a transaction is executed to sub-transaction 3.
  • the first savepoint before the 3 subtransactions that is, the first savepoint savepoint3 before the child transaction 3.
  • the database needs to release the lock after savepoint3.
  • the database needs to release the lock after savepoint2.
  • a storage point is recorded using a linked list or the like in the embodiment of the present application, it is also necessary to delete the save point record after savepoint2.
  • the first savepoint before the child transaction that is, the first savepoint savepoint1 before the child transaction 1.
  • the database needs to release the lock after savepoint3.
  • a storage point is recorded using a linked list or the like in the embodiment of the present application, it is also necessary to delete the save point record after the savepoint3.
  • the identifier of the save point created before each sub-transaction is executed can be saved through the linked list.
  • the save points created by the three sub-transactions in Figure 2 are stored in the linked list in order of execution, corresponding to execution plan 1, execution plan 2, and execution plan 3.
  • the database can find the identifier of the corresponding savepoint from the linked list according to the number of sub-transactions that need to be rolled back.
  • the savepoint can be determined to be savepoint3, and so on.
  • the waiting time for the lock waiting for determining whether to time out it may be specified that the waiting time for each lock waiting is the same, or the number of times the timeout occurs according to the lock waiting, the number of the sub-transaction when the lock waits, and the time when the lock waits.
  • the waiting time waiting for can be randomly assigned according to the random number.
  • a wait time can be set. After the wait time elapses after the rollback, the sub-transaction is resumed, so that the transaction holding the lock of the transaction cannot be released in time. As a result, the transaction continues to lock waiting.
  • the execution bodies of the steps of the method provided by the embodiment shown in FIG. 1 may be the same device, or the method may also be performed by different devices.
  • the execution body of step S110 and step S120 may be device 1
  • the execution body of step S130 may be device 2
  • the execution body of step S110 may be device 1
  • the execution body of step S120 and step S130 may be device 2 ;and many more.
  • FIG. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may of course include hardware required for other services.
  • the processor reads the corresponding computer program from the non-volatile memory into memory and then runs to form a device that unlocks the user interface at a logical level.
  • the present application does not exclude other implementation manners, such as a logic device or a combination of software and hardware, etc., that is, the execution body of the following processing flow is not limited to each logical unit, and may be Hardware or logic device.
  • FIG. 4 is a schematic structural diagram of an apparatus 400 for processing a database deadlock according to an embodiment of the present application.
  • the device 400 for processing the database deadlock may be a database system or a specific implementation module in the database system, which is not limited herein.
  • the database deadlock device 400 can include a transaction partitioning unit 410, a savepoint creation unit 420, an execution unit 430, and a transaction rollback unit 440. among them,
  • the transaction dividing unit 410 divides the transaction into N sub-transactions that are sequentially executed, where N is a positive integer greater than one;
  • the savepoint creation unit 420 creates a savepoint before executing each of the N subtransactions
  • Execution unit 430 sequentially executes the N sub-transactions
  • the transaction rollback unit 440 rolls back the transaction to the rollback savepoint, where a positive integer less than or equal to N, the rollback savepoint is a savepoint created before the execution of the nth child transaction;
  • the execution unit 430 also continues to sequentially execute the sub-transactions of the N sub-transactions after the first save point after the transaction rollback unit 440 rolls back the to-be-executed transaction to the first savepoint.
  • FIG. 5 is a schematic structural diagram of an apparatus 400 for processing a database deadlock according to another embodiment of the present application.
  • the apparatus 400 may further include a determining unit 450, when the nth sub-transaction of the N sub-transactions has a lock wait for the i-th time and the waiting time is greater than the first wait corresponding to the n-th sub-transaction
  • the determining unit 450 determines the rollback savepoint according to the number of sub-transactions s that need to be rolled back according to the ith lock, and the mapping relationship between s and i is preset, and both i and s are positive integers.
  • the determining unit 450 determines, according to the number of sub-transactions that need to be rolled back corresponding to the ith lock, the rollback savepoint includes: the determining unit 450 may determine that the first savepoint before the ns sub-transaction is the The first save point, where s ⁇ n; or, the determining unit 45 may determine that the save point before the first sub-transaction is the first save point, where s ⁇ n.
  • the first waiting time is set by a user of the database system of the firm; or the first waiting time is set according to a random number.
  • the executing unit 430 continues to sequentially execute the sub-transactions of the N sub-transactions after the first save point after specifically rolling back to the first save point and waiting for the second waiting time.
  • the second waiting time is set according to a SQL type of the structured query language involved in the office; or the second waiting time is set by a user of the database system of the firm; or, the second The waiting time is set according to the random number.
  • the savepoint created by each of the N sub-transactions before execution is named according to a sequence number of the savepoint and a predetermined rule, and the rollback savepoint is based on the rollback savepoint.
  • the serial number and the predetermined rule are determined.
  • the save points created by each of the N sub-transactions before execution are stored in a linked list in a sequential order, and the roll-back save points are determined by searching the linked list.
  • the device 400 may further include a deleting unit 460. If the savepoint creation unit records the savepoint in sequence when creating a savepoint corresponding to each of the N child transactions; the delete unit may roll back the transaction to the back in the transaction rollback unit When you save a savepoint, delete the record of the savepoint created after the rollback savepoint.
  • the device 400 handling the database deadlock can also perform the method of FIG. 1 and implement database or process database deadlock The functions of the embodiment shown in FIG. 1 and FIG. 2 are not described herein again.
  • the present application also discloses a database system comprising the apparatus 400 for processing database deadlocks of the embodiment shown in FIG. 4 or 5.
  • PLD Programmable Logic Device
  • FPGA Field Programmable Gate Array
  • HDL Hardware Description Language
  • the controller can be implemented in any suitable manner, for example, the controller can take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (eg, software or firmware) executable by the (micro)processor.
  • computer readable program code eg, software or firmware
  • examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, The Microchip PIC18F26K20 and the Silicone Labs C8051F320, the memory controller can also be implemented as part of the memory's control logic.
  • the controller can be logically programmed by means of logic gates, switches, ASICs, programmable logic controllers, and embedding. Microcontroller, etc. The form to achieve the same functionality.
  • a controller can therefore be considered a hardware component, and the means for implementing various functions included therein can also be considered as a structure within the hardware component.
  • a device for implementing various functions can be considered as a software module that can be both a method of implementation and a structure within a hardware component.
  • the system, device, module or unit illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product having a certain function.
  • a typical implementation device is a computer.
  • the computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or A combination of any of these devices.
  • embodiments of the present application can be provided as a method, system, or computer program product.
  • the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment in combination of software and hardware.
  • the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
  • a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • processors CPUs
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory.
  • RAM random access memory
  • ROM read only memory
  • Memory is an example of a computer readable medium.
  • Computer readable media includes both permanent and non-persistent, removable and non-removable media.
  • Information storage can be implemented by any method or technology.
  • the information can be computer readable instructions, data structures, modules of programs, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device.
  • computer readable media does not include temporary storage of computer readable media, such as modulated data signals and carrier waves.
  • embodiments of the present application can be provided as a method, system, or computer program product.
  • the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment in combination of software and hardware.
  • the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • the application can be described in the general context of computer-executable instructions executed by a computer, such as a program module.
  • program modules include routines, programs, objects, components, data structures, and the like that perform particular tasks or implement particular abstract data types.
  • the present application can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are connected through a communication network.
  • program modules can be located in both local and remote computer storage media including storage devices.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

L'invention concerne un procédé et un appareil de traitement de blocage de base de données, ainsi qu'un système de base de données. Le procédé consiste à : diviser une transaction en N sous-transactions exécutées en séquence (S110); créer un point de sauvegarde et enregistrer celui-ci avant que chacune des N sous-transactions ne soit exécutée (S120); exécuter séquentiellement les N sous-transactions (S130); lorsqu'une attente de verrou se produit dans une nième sous-transaction des N sous-transactions et qu'un temps d'attente est supérieur à un premier temps d'attente correspondant à la nième sous-transaction, ramener la transaction à un point de sauvegarde de retour (S140)), le point de sauvegarde de retour étant un point de sauvegarde créé avant l'exécution de la nième sous-transaction; et poursuivre l'exécution en séquence des sous-transactions dans les N sous-transactions suivant le point de sauvegarde de retour (S150). En divisant une transaction en une pluralité de sous-transactions et en réglant un point de sauvegarde avant l'exécution, après que l'occurrence d'une attente de verrou dans une sous-transaction a dépassé un premier temps d'attente correspondant à la sous-transaction, la sous-transaction est ramenée au point de sauvegarde avant la sous-transaction et continue à être exécutée de façon à pouvoir améliorer dans une certaine mesure l'efficacité d'exécution d'une transaction subissant un blocage.
PCT/CN2017/115191 2016-12-20 2017-12-08 Procédé et appareil de traitement de blocage de base de données, et système de base de données WO2018113534A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611183503.2A CN108205464B (zh) 2016-12-20 2016-12-20 一种数据库死锁的处理方法、装置和数据库系统
CN201611183503.2 2016-12-20

Publications (1)

Publication Number Publication Date
WO2018113534A1 true WO2018113534A1 (fr) 2018-06-28

Family

ID=62603423

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/115191 WO2018113534A1 (fr) 2016-12-20 2017-12-08 Procédé et appareil de traitement de blocage de base de données, et système de base de données

Country Status (2)

Country Link
CN (1) CN108205464B (fr)
WO (1) WO2018113534A1 (fr)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111984625A (zh) * 2020-08-24 2020-11-24 北京人大金仓信息技术股份有限公司 数据库负载特征处理方法、装置、介质和电子设备
CN113872781A (zh) * 2020-06-30 2021-12-31 阿里巴巴集团控股有限公司 事务处理方法、装置、设备和存储介质

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111221869A (zh) * 2018-11-27 2020-06-02 北京京东振世信息技术有限公司 一种追踪数据库事务时间和分析数据库锁的方法和装置
CN112749156A (zh) * 2019-10-29 2021-05-04 华为技术有限公司 数据处理方法、数据库管理系统和数据处理设备
CN110888717A (zh) * 2019-11-05 2020-03-17 中盈优创资讯科技有限公司 Hdfs的目录操作的事务控制方法及装置
CN110865977A (zh) * 2019-11-05 2020-03-06 中盈优创资讯科技有限公司 多程序操作hdfs目录的方法及装置
CN112100192A (zh) * 2020-09-27 2020-12-18 中国建设银行股份有限公司 数据库锁等待处理方法及装置
CN112883045B (zh) * 2021-03-31 2024-05-17 中国工商银行股份有限公司 数据库事务拆分执行方法及装置
CN115576969B (zh) * 2022-12-07 2023-03-10 北京奥星贝斯科技有限公司 一种并行执行数据库任务的方法、装置、介质及设备
CN117076147B (zh) * 2023-10-13 2024-04-16 支付宝(杭州)信息技术有限公司 死锁检测方法、装置、设备和存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102073540A (zh) * 2010-12-15 2011-05-25 北京新媒传信科技有限公司 分布式事务提交方法和装置
CN103077006A (zh) * 2012-12-27 2013-05-01 浙江工业大学 一种基于多线程的长事务并行执行方法
CN104317850A (zh) * 2014-10-14 2015-01-28 北京国双科技有限公司 数据处理方法和装置

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5630124A (en) * 1993-12-06 1997-05-13 International Business Machines Corporation System and method for assuring atomicity of distributed update requests in a parallel database
US8560524B2 (en) * 2008-10-30 2013-10-15 Hewlett-Packard Development Company, L.P. Allocating priorities to prevent deadlocks in a storage system
US9569254B2 (en) * 2009-07-28 2017-02-14 International Business Machines Corporation Automatic checkpointing and partial rollback in software transaction memory
CN101739291B (zh) * 2009-12-02 2013-01-30 北京航空航天大学 一种支持有条件部分回滚的硬件事务嵌套处理方法
US20130290243A1 (en) * 2012-04-26 2013-10-31 Cloudtree, Inc. Method and system for transaction representation in append-only datastores
CN102831156B (zh) * 2012-06-29 2014-12-31 浙江大学 一种云计算平台上的分布式事务处理方法
US20140040219A1 (en) * 2012-07-31 2014-02-06 Hideaki Kimura Methods and systems for a deadlock resolution engine
CN103294479A (zh) * 2013-06-19 2013-09-11 成都市欧冠信息技术有限责任公司 分布式事务处理方法与系统
CN103761182A (zh) * 2013-12-26 2014-04-30 上海华为技术有限公司 一种死锁检测方法及装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102073540A (zh) * 2010-12-15 2011-05-25 北京新媒传信科技有限公司 分布式事务提交方法和装置
CN103077006A (zh) * 2012-12-27 2013-05-01 浙江工业大学 一种基于多线程的长事务并行执行方法
CN104317850A (zh) * 2014-10-14 2015-01-28 北京国双科技有限公司 数据处理方法和装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LIU YANG: "Key Technology for Transaction Process on Object relationship Model Database", 18 August 2011 (2011-08-18) *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113872781A (zh) * 2020-06-30 2021-12-31 阿里巴巴集团控股有限公司 事务处理方法、装置、设备和存储介质
CN111984625A (zh) * 2020-08-24 2020-11-24 北京人大金仓信息技术股份有限公司 数据库负载特征处理方法、装置、介质和电子设备
CN111984625B (zh) * 2020-08-24 2023-09-15 北京人大金仓信息技术股份有限公司 数据库负载特征处理方法、装置、介质和电子设备

Also Published As

Publication number Publication date
CN108205464B (zh) 2022-05-06
CN108205464A (zh) 2018-06-26

Similar Documents

Publication Publication Date Title
WO2018113534A1 (fr) Procédé et appareil de traitement de blocage de base de données, et système de base de données
US11556396B2 (en) Structure linked native query database management system and methods
US10678808B2 (en) Eager replication of uncommitted transactions
CA2981476C (fr) Traitement de transactions de base de donnees dans un systeme informatique distribue
US9881041B2 (en) Multiple RID spaces in a delta-store-based database to support long running transactions
EP3213230B1 (fr) Maintenance efficace d'index de magasin de colonnes dans des tables optimisées en termes de mémoire
EP3528451A1 (fr) Procédé et dispositif de traitement de données à base de chaîne de blocs
US6807541B2 (en) Weak record locks in database query read processing
US8108696B2 (en) Optimizing non-preemptible read-copy update for low-power usage by avoiding unnecessary wakeups
US8881153B2 (en) Speculative thread execution with hardware transactional memory
US20140281295A1 (en) Expediting RCU Grace Periods Under User Mode Control
US20140040318A1 (en) Systems and methods for reslicing data in a relational database
US20090070330A1 (en) Dual access to concurrent data in a database management system
US20130061071A1 (en) Energy Efficient Implementation Of Read-Copy Update For Light Workloads Running On Systems With Many Processors
US20140223242A1 (en) Motivating Lazy RCU Callbacks Under Out-Of-Memory Conditions
TW201715381A (zh) 用於在存在衝突時進行高效任務排程的方法
US11269829B2 (en) Row level locking for columnar data
US9824039B2 (en) Signal interrupts in a transactional memory system
US20240126465A1 (en) Data storage methods, apparatuses, devices, and storage media
CN109800062B (zh) 一种分布式数据库事务处理系统
US20150100730A1 (en) Freeing Memory Safely with Low Performance Overhead in a Concurrent Environment
US20240134840A1 (en) Distributed table lock application methods, apparatuses, storage media, and electronic devices
US20220043821A1 (en) Method for performing multi-caching on data sources of same type and different types by using cluster-based processing system and device using the same
CN109388645B (zh) 指令执行方法、指令执行装置及存储介质
US20230394028A1 (en) Method and system for lock after qualification for update queries

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: 17884918

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: 17884918

Country of ref document: EP

Kind code of ref document: A1