Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method, device, equipment and readable storage medium for obtaining distributed lock

A distributed lock and consistent technology, applied in the direction of multi-program device, program control design, program synchronization, etc., can solve problems such as system deadlock

Inactive Publication Date: 2018-05-29
MASHANG CONSUMER FINANCE CO LTD
View PDF7 Cites 5 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] The embodiment of the present application provides a method, device, device, and readable storage medium for acquiring distributed locks, so as to solve the problem of deadlock in the system caused by different services waiting for each other in the traditional method of acquiring distributed locks in the prior art The problem

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
  • Method, device, equipment and readable storage medium for obtaining distributed lock
  • Method, device, equipment and readable storage medium for obtaining distributed lock
  • Method, device, equipment and readable storage medium for obtaining distributed lock

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0038] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

[0039] The core of the present invention is to provide a method, device, device and readable storage medium for obtaining distributed locks, which can solve the problem of deadlock in the system caused by different services waiting for each other in the traditional method for obtaining distributed locks.

[0040] In order to enable those skilled in the art to better understand the solutions of the present invention, the present invention will ...

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 for obtaining a distributed lock. The method comprises the following steps: firstly, constructing a distributed lock corresponding to business requirement, writing target data in a previously generated target table in which the distributed lock is stored, then obtaining feedback information after the target data are written therein, determining whether a target distributed lock is successfully obtained or not through judging whether the feedback information is consistent with target information, and obtaining the distributed lock by identifying the type of thefeedback information according to an identification result when the feedback information and the target information are not consistent. By applying the mode of obtaining the distributed lock, when anitem of business obtains the distributed lock successfully, other business can also be used for continuously writing target data into the target table, queuing up to wait is not required, and when theconcurrent quantity is relatively high, the situation that the system deadlocks as multiple items of business await each other to release locks and locked resources can be avoided. In addition, the invention further discloses a device, equipment and a readable storage medium for obtaining the distributed lock, and the effects are as shown above.

Description

technical field [0001] The invention relates to the field of computer applications, in particular to a distributed lock management method, device and readable storage medium. Background technique [0002] Most of today's IT systems adopt multi-instance distributed deployment. The advantage is to ensure the high availability of the system and achieve the horizontal expansion capability of the system. However, it also brings high complexity of system design and competition for shared resources. Access and other issues. [0003] Distributed locks are a way to control synchronous access to shared resources between distributed systems. Only through the application of distributed locks can access shared resources be based on the distributed locks. In a distributed system, there are business scenarios that require coordinated access to shared resources, and data executed by scheduled tasks cannot be repeated multiple times. If different systems or different hosts of the same syst...

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/524
Inventor 邓成东刘洪政
Owner MASHANG CONSUMER FINANCE CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products