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

Distributed system multi-node locking method

A distributed system, multi-node technology, applied in the field of distributed systems, can solve the problems of increasing the maintenance cost of authoritative nodes, unable to use distributed lock services, unable to realize resource locking, etc. strong effect

Active Publication Date: 2020-12-04
湖南文盾智链科技有限公司
View PDF8 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, there is a single-point bottleneck in this centralized management method. Even if the distributed lock mechanism such as Zookeeper solves the single-point bottleneck problem to a certain extent, during the master selection period of this mechanism, there is no authoritative node, and it is impossible to realize the The locking of resources not only increases the maintenance cost of the authoritative node, but also cannot use the distributed lock service during the switching process of the authoritative node

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
  • Distributed system multi-node locking method
  • Distributed system multi-node locking method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0053] like figure 1 As shown, the distributed system multi-node locking method of the present invention comprises the following steps:

[0054] Step 1. Assign identity information to all nodes to be locked in the distributed system; by assigning identity information, each node can be easily distinguished, and it is convenient to identify each pre-locked successful node, pre-locked failed node, locked successful node and lock failure node;

[0055] Step 2. Send a pre-lock request to all nodes to be locked;

[0056] Step 3. Determine whether all the nodes to be locked are pre-locked successfully. When the pre-locking of the nodes to be locked fails, send an unlocking pre-locking message to each node to be locked. If the pre-locking fails, wait for time T1 and return to the execution step 2. When all nodes to be locked are pre-locked successfully, send a lock request to all nodes to be locked, and if the pre-lock is successful, perform step 4;

[0057] Step 4. Determine wheth...

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 invention discloses a multi-node locking method for a distributed system. The multi-node locking method comprises the following steps: 1, allocating identity information to all nodes to be locked;2, sending a pre-locking request to all nodes to be locked; 3, judging whether all the to-be-locked nodes are successfully pre-locked or not, and when the to-be-locked nodes fail to be pre-locked, sending a pre-locking release message, pre-locking failure and waiting time T1 to each to-be-locked node which is successfully pre-locked, and returning to the step 2, when all the to-be-locked nodes are successfully pre-locked, sending a locking request to all the to-be-locked nodes, and if the pre-locking is successful, executing the step 4; and 4, judging whether all the to-be-locked nodes are successfully locked or not, and when the to-be-locked nodes fail to be locked, sending an unlocking message, locking failure and waiting time T2 to each successfully locked to-be-locked node, and returning to the step 2. When all the to-be-locked nodes are successfully locked, the locking is successful. The method is not restrained by authoritative nodes, and the problems of single-point failure anddeadlock do not exist.

Description

technical field [0001] The invention belongs to the technical field of distributed systems, and in particular relates to a multi-node locking method of a distributed system. Background technique [0002] During the use of a distributed system, some operations need to lock resources to ensure that they are not interfered by other operations, thus affecting the running results. Different from the stand-alone system, each operation can determine whether the resource lock request is made earlier by the system time, so as to determine that the operation can lock the resource first. In a distributed system, resource locking operations are propagated in the network in the form of locking request messages. There is no standard time for reference among distributed nodes, so it is not easy to determine which operation sends resource locking requests first. A common locking mechanism in a distributed system is that an authoritative node manages the locks of all resources. The operatio...

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/52
CPCG06F9/526
Inventor 蔡国凤
Owner 湖南文盾智链科技有限公司