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

Global lock preemption method, device and computing device in distributed system

A distributed system and global lock technology, applied in the computer field, can solve problems such as increased overhead, whether the valid time has expired, and the main service node has not performed data processing operations, so as to reduce changes.

Active Publication Date: 2020-12-04
BEIJING QIHOO TECH CO LTD
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] The traditional method of preempting the global lock is generally that multiple service nodes grab the global lock. After the global lock is grabbed, the service node that grabs the global lock checks whether there is currently a master service node, and the current master service node Whether the effective time has expired, so it is easy to appear that the service node that is currently the main service node may not be able to grab the global lock. In a distributed system, the effective time of the main service node is generally stipulated to be 60s, and the global lock is seized every 10s Operation, if the current main service node fails to seize the global lock for 6 times, the valid time of the main service node will expire, and the main service node will become another service node, resulting in the main service node not performing any data processing operations. , in most scenarios where distributed global locks are used, the main service node is not expected to change frequently, because after the main service node changes, the upper layer of the business needs to do a lot of switching logic, which increases unnecessary overhead

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
  • Global lock preemption method, device and computing device in distributed system
  • Global lock preemption method, device and computing device in distributed system
  • Global lock preemption method, device and computing device in distributed system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0027] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0028] figure 1 A schematic flowchart of a global lock preemption method in a distributed system is shown according to an embodiment of the present invention. This method runs in each service node in the distributed system, that is, each service node will execute the global lock preemption method in the distributed system, such as figure 1 As shown, the method includes the following steps:

[0029] Step S100, detecting whether th...

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 method and device for global lock preemption in a distributed system, a computing device and a computer storage medium. The method includes the steps of detecting whether a primary service node exists in a current state every preset time period; if the primary service node exists, detecting whether the effective time of the primary service node is within a period of validity; if the effective time is within the period of validity, comparing node information of the primary service node and node information of a service node, to determine whether the service node is theprimary service node; if yes, performing preemption of a global lock, and updating the effective time of the primary service node. According to the scheme, changes of the global lock can be reduced by updating the effective time of the primary service node, it is ensured that the current primary service node can always snag the global lock, the shortcoming that the genuine primary service node cannot snag the global lock due to the constant switching of the primary service node and the non-primary service node for snagging the global lock is avoided, so that the primary service node cannot execute data processing operation is overcome.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a global lock preemption method, device, computing device and computer storage medium in a distributed system. Background technique [0002] The distributed system is built on the basis of the network, and consists of a group of independent multiple service nodes such as servers to form a unified whole. [0003] The traditional method of preempting the global lock is generally that multiple service nodes grab the global lock. After the global lock is grabbed, the service node that grabs the global lock checks whether there is currently a master service node, and the current master service node Whether the effective time has expired, so it is easy to appear that the service node that is currently the main service node may not be able to grab the global lock. In a distributed system, the effective time of the main service node is generally stipulated to be 60s, and the global loc...

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 Patents(China)
IPC IPC(8): G06F9/52
CPCG06F9/526
Inventor 陈宗志
Owner BEIJING QIHOO TECH CO LTD