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
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


