Lock migration method and device

A configuration file, actuator technology, applied in the field of communication, can solve problems such as repeated execution

Active Publication Date: 2014-01-01
新浪技术(中国)有限公司
View PDF3 Cites 4 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0013] The embodiment of the present invention provides a lock migration method and device to solv

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
  • Lock migration method and device
  • Lock migration method and device
  • Lock migration method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0028] In order to avoid the problem that the executor repeatedly executes the same task in the process of migrating from the original lock to the new lock, the core idea of ​​the embodiment of the present invention is: for a task, as long as one of the original lock and the new lock is saved The executor does not execute the task corresponding to the key value of the task, so as to avoid repeating the same task during the lock migration process and save the resources consumed by executing the task. In the specific implementation, the embodiment of the present invention introduces a migration device, which is used to intercept the request for adding a key value sent by each executor to the original lock or a new lock during the lock migration process, and forward the request for adding a key value Give the original lock and the new lock, that is, add the key value corresponding to the same task to the original lock and the new lock at the same time. When the new lock returns an...

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 lock migration method and device used for solving the problem that resources consumed for working tasks are wasted due to the fact that the tasks work for two times in the lock migration process in the prior art. When each worker is migrated from a first lock to a second lock through the migration device, a lock fetching target address of each worker is modified to an address of the migration device, a request for adding a key value and sent from each worker is received, and the received request is sent to the first lock and the second lock; when a received result returned by the second lock is an existence result, the existence result is returned to the worker; when the received result returned by the second lock is not the existence result, a received result returned by the first lock is returned to the worker, and the migration device modifies the lock fetching address of each worker to an address of the second lock. Through the method, the same tasks are prevented from being worked repeatedly in the process that each worker is migrated from the first lock to the second lock.

Description

technical field [0001] The present invention relates to the field of communication technologies, in particular to a lock migration method and device. Background technique [0002] At present, when the task processing system processes a batch of tasks, it will store these tasks in multiple task queues at the same time. The tasks stored in each task queue are the same, and each task queue consists of at least one executor (worker) To execute tasks in the task queue, such as figure 1 shown. [0003] figure 1 It is a schematic diagram of processing tasks through multiple task queues and workers in the prior art. The task processing system includes 3 task queues, and tasks in each task queue are executed by 1 worker. When executing a task, the user can add a task to the task queue through the client, and the client adds the same task to three task queues, and then the worker obtains the task from the task queue and executes it. [0004] due to figure 1 In the task processing...

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/46G06F9/48
Inventor 汪海
Owner 新浪技术(中国)有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products