Unlock instant, AI-driven research and patent intelligence for your innovation.

Deadlock processing method and device, electronic equipment and computer storage medium

A computer storage and processing method technology, applied in the computer field, can solve problems affecting user experience, user query interruption without reason, etc., to achieve the effect of improving user experience

Pending Publication Date: 2021-08-24
ALIBABA GRP HLDG LTD
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, this method will cause the execution of irrelevant sessions to be interrupted and canceled

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Deadlock processing method and device, electronic equipment and computer storage medium
  • Deadlock processing method and device, electronic equipment and computer storage medium
  • Deadlock processing method and device, electronic equipment and computer storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0025] refer to Figure 1A , shows a flowchart of steps of a deadlock handling method according to Embodiment 1 of the present invention.

[0026] The deadlock processing method of the present embodiment includes the following steps:

[0027] Step S102: Obtain the lock waiting graph during the running process of the database.

[0028] For database systems involving transactions and locking mechanisms, corresponding lock waiting graphs can be generated during operation to represent resource demand relationships among running database transactions. It can be seen that the lock waiting graph is a directed graph. The generation of the lock waiting graph can be triggered by those skilled in the art according to actual needs, such as periodically triggered generation, or generated according to an appropriate trigger instruction, and so on.

[0029] From the perspective of the database system, database transactions can be implemented through session sessions. Based on this, the es...

Embodiment 2

[0042] refer to Figure 2A , shows a flowchart of steps of a deadlock handling method according to Embodiment 2 of the present invention.

[0043] The deadlock processing method of the present embodiment includes the following steps:

[0044] Step S202: Establish a lock waiting graph for the data in the running process.

[0045] As mentioned earlier, databases involving transactions and locking mechanisms can generate lock wait graphs during operation. The specific process of generating the lock waiting graph can be generated by those skilled in the art in any appropriate manner according to actual needs, which is not limited in this embodiment of the present invention.

[0046] For example, for the pg (postgre) database system using GDD, GDD will execute SELECT * FROM pg_locks to obtain the lock waiting information, and then use the established session as the graph vertex to traverse the scan lock waiting information. During the period, if it is found that session 1 is wai...

Embodiment 3

[0082] refer to image 3 , shows a structural block diagram of a deadlock processing device according to Embodiment 3 of the present invention.

[0083] The deadlock processing device in this embodiment includes: a first acquisition module 302, which is used to acquire the lock waiting graph during the operation of the database; a second acquisition module 304, which is used to perform strongly connected component detection on the lock waiting graph, and acquire the lock waiting graph Strongly connected component existing in; The release module 306 is used to determine the information of the strong connected release operation to be performed according to the strongly connected component in the lock waiting graph, and release the deadlock corresponding to the strongly connected component according to the information of the strongly connected release operation.

[0084] The deadlock processing device in this embodiment is used to implement the corresponding deadlock processing m...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The embodiment of the invention provides a deadlock processing method and device, electronic equipment and a computer storage medium, and the deadlock processing method comprises the steps of obtaining a lock waiting graph in a database operation process; performing strong connectivity component detection on the lock waiting graph to obtain strong connectivity components existing in the lock waiting graph; and according to the strong connectivity component in the lock waiting graph, determining information of a strong connectivity removing operation to be performed, and according to the information of the strong connectivity removing operation, removing a deadlock corresponding to the strong connectivity component. According to the embodiment of the invention, it can be effectively ensured that in the GDD deadlock processing process, only transactions related to deadlock can be interrupted or canceled, and transactions irrelevant to deadlock cannot be affected.

Description

technical field [0001] Embodiments of the present invention relate to the technical field of computers, and in particular, to a deadlock processing method, device, electronic equipment, and computer storage medium. Background technique [0002] The transaction in the database is the basic unit of database concurrency control. The execution of one or a group of statements involved in a transaction is either all successful, and some data in the database is successfully modified; or all of them are unsuccessful, and the data in the database is restored to these statements state before execution. [0003] In order to ensure the integrity and concurrency of transaction execution, a locking mechanism can be applied to the execution of database transactions. For example, the SQL statement involved in a transaction and / or data such as records, fields or files targeted by the SQL statement can be locked to ensure the smooth execution of the transaction. Although the integrity and c...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F9/52G06F16/21
CPCG06F9/524G06F16/21
Inventor 王伟
Owner ALIBABA GRP HLDG LTD