CN104252386B - The locking method and equipment of data renewal - Google Patents
The locking method and equipment of data renewal Download PDFInfo
- Publication number
- CN104252386B CN104252386B CN201310259869.3A CN201310259869A CN104252386B CN 104252386 B CN104252386 B CN 104252386B CN 201310259869 A CN201310259869 A CN 201310259869A CN 104252386 B CN104252386 B CN 104252386B
- Authority
- CN
- China
- Prior art keywords
- lock
- locking
- thread
- failure
- wait
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 41
- 238000003860 storage Methods 0.000 claims abstract description 66
- 230000008569 process Effects 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000004590 computer program Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000014759 maintenance of location Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 239000002253 acid Substances 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000007599 discharging Methods 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 239000000725 suspension Substances 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
Abstract
Description
Claims (13)
- A kind of 1. locking method of the data renewal of multithreading, it is characterised in that including:It is determined that whether the request locked to the thread to be updated in InnoDB storage engines succeeds;If the locking request failure, judge to wait whether lock number exceedes predetermined threshold;If described wait lock number to be not above predetermined threshold, create the lock for the failure thread and wait locking;If it is described wait lock number exceed predetermined threshold, by it is described lock failure thread scheduling go out InnoDB storage engines and by It is hashing onto in each bucket;Locking failure thread in identical bucket is sent to InnoDB storage engines to ask to lock in a manner of poll.
- 2. according to the method for claim 1, it is characterised in that further comprise:If the locking request success, establishment are directed to the successfully lock of thread and perform locking.
- 3. according to the method for claim 2, it is characterised in that further comprise:Locked and to the thread of locking performing After performing affairs, release lock.
- 4. according to the method for claim 3, it is characterised in that also include:By the release based on the lock so as to waiting The locking failure thread of locking is converted into locking state, and renewal waits lock number.
- 5. according to the method described in claim any one of 1-4, it is characterised in that create the lock for the failure thread and wait The step of to be locked, also includes:Based on the lock created for the failure thread and locking is waited, renewal waits lock number.
- 6. according to the method described in claim any one of 1-4, it is characterised in that the failure thread scheduling that locks is gone out The InnoDB storage engines and step being hashing onto in each bucket further comprises:The cryptographic Hash of lock information based on the failure thread is hashing onto in each bucket, wherein the lock of the failure thread of identical recordings The cryptographic Hash of information is identical, so as to be hashing onto in identical bucket.
- 7. according to the method described in claim any one of 1-4, it is characterised in that further comprise:Locking failure thread in different buckets is sent to InnoDB storage engines to ask to lock in a parallel fashion.
- A kind of 8. locking equipment of the data renewal of multithreading, it is characterised in that including:Ask determining module, for determine the request that is locked to the thread to be updated in InnoDB storage engines whether into Work(;Judge module, if for the locking request failed, judge to wait whether lock number exceedes predetermined threshold;Creation module is locked, if waiting lock number to be not above predetermined threshold for described, is created for the failure thread Lock and wait locking;Scheduler module, if waiting lock number to exceed predetermined threshold for described, the failure thread scheduling that locks is gone out InnoDB storage engines are simultaneously hashing onto in each bucket;Delivery module, for by different buckets locking failure thread be sent in a parallel fashion InnoDB storage engines and Locking failure thread in identical bucket is sent to InnoDB storage engines to ask to lock in a manner of poll.
- 9. equipment according to claim 8, it is characterised in that if the lock creation module is further used for the locking Ask successfully, then create and be directed to the successfully lock of thread and perform locking.
- 10. equipment according to claim 9, it is characterised in that the lock creation module further comprises:Lock release submodule Block, for after execution locks and performs affairs to the thread of locking, release to be locked.
- 11. equipment according to claim 10, it is characterised in that the lock creation module also includes renewal submodule, uses In by the release based on the lock, so as to wait the locking of locking failure thread to be converted into locking state, renewal waits lock number.
- 12. according to the equipment described in claim any one of 8-11, it is characterised in that the lock creation module also includes renewal Module, for based on creating the lock for being directed to the failure thread and waiting locking, renewal to wait lock number.
- 13. according to the equipment described in claim any one of 8-11, it is characterised in that scheduler module further comprises:Hash submodule, the cryptographic Hash for the lock information based on the failure thread is hashing onto in each bucket, wherein identical note The cryptographic Hash of the lock information of the failure thread of record is identical, so as to be hashing onto in identical bucket.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310259869.3A CN104252386B (en) | 2013-06-26 | 2013-06-26 | The locking method and equipment of data renewal |
HK15103347.7A HK1202938A1 (en) | 2013-06-26 | 2015-04-02 | Locking method for data update and device thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310259869.3A CN104252386B (en) | 2013-06-26 | 2013-06-26 | The locking method and equipment of data renewal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104252386A CN104252386A (en) | 2014-12-31 |
CN104252386B true CN104252386B (en) | 2017-11-21 |
Family
ID=52187321
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310259869.3A Active CN104252386B (en) | 2013-06-26 | 2013-06-26 | The locking method and equipment of data renewal |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN104252386B (en) |
HK (1) | HK1202938A1 (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9715416B2 (en) * | 2015-06-03 | 2017-07-25 | Intel Corporation | Adaptive queued locking for control of speculative execution |
CN107239474B (en) * | 2016-03-29 | 2021-05-04 | 创新先进技术有限公司 | Data recording method and device |
CN106681809A (en) * | 2016-12-05 | 2017-05-17 | 上海斐讯数据通信技术有限公司 | Lock-based thread management method and lock-based thread management device |
CN108345495A (en) * | 2017-01-22 | 2018-07-31 | 北京国双科技有限公司 | A kind of locking method and server of multithreading |
CN109388645B (en) * | 2017-08-11 | 2023-02-24 | 腾讯科技(深圳)有限公司 | Instruction execution method, instruction execution device, and storage medium |
CN112231131A (en) * | 2020-09-28 | 2021-01-15 | 北京金山云网络技术有限公司 | Method, device and equipment for realizing database lock and readable storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7428539B2 (en) * | 2004-06-21 | 2008-09-23 | Microsoft Corporation | Method, system, and apparatus for managing access to a data object |
CN101615203A (en) * | 2009-07-23 | 2009-12-30 | 中兴通讯股份有限公司 | Concurrency control method and device |
CN102385588A (en) * | 2010-08-31 | 2012-03-21 | 国际商业机器公司 | Method and system for improving performance of data parallel insertion |
CN102722449A (en) * | 2012-05-24 | 2012-10-10 | 中国科学院计算技术研究所 | Key-Value local storage method and system based on solid state disk (SSD) |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7461065B2 (en) * | 2006-01-31 | 2008-12-02 | International Business Machines Corporation | Method and system for utilizing shared numeric locks |
-
2013
- 2013-06-26 CN CN201310259869.3A patent/CN104252386B/en active Active
-
2015
- 2015-04-02 HK HK15103347.7A patent/HK1202938A1/en unknown
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7428539B2 (en) * | 2004-06-21 | 2008-09-23 | Microsoft Corporation | Method, system, and apparatus for managing access to a data object |
CN101615203A (en) * | 2009-07-23 | 2009-12-30 | 中兴通讯股份有限公司 | Concurrency control method and device |
CN102385588A (en) * | 2010-08-31 | 2012-03-21 | 国际商业机器公司 | Method and system for improving performance of data parallel insertion |
CN102722449A (en) * | 2012-05-24 | 2012-10-10 | 中国科学院计算技术研究所 | Key-Value local storage method and system based on solid state disk (SSD) |
Also Published As
Publication number | Publication date |
---|---|
HK1202938A1 (en) | 2015-10-09 |
CN104252386A (en) | 2014-12-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104252386B (en) | The locking method and equipment of data renewal | |
US8984085B2 (en) | Apparatus and method for controlling distributed memory cluster | |
KR101959153B1 (en) | System for efficient processing of transaction requests related to an account in a database | |
US6678802B2 (en) | Method and apparatus for controlling access by a plurality of concurrently operating processes to a resource | |
US8930584B2 (en) | System and method for providing a linearizable request manager | |
US9830189B2 (en) | Multi-threaded queuing system for pattern matching | |
JP4963018B2 (en) | Scheduling method and scheduling apparatus | |
EP3230860B1 (en) | Technologies for efficient synchronization barriers with work stealing support | |
CN104065636B (en) | Data processing method and system | |
CN107273195A (en) | A kind of batch processing method of big data, device and computer system | |
CN103729480A (en) | Method for rapidly finding and scheduling multiple ready tasks of multi-kernel real-time operating system | |
CN103914399A (en) | Disk cache method and device in parallel computer system | |
US9110715B2 (en) | System and method for using a sequencer in a concurrent priority queue | |
CN106708608A (en) | Distributed lock service method and acquisition method, and corresponding device | |
US9747323B1 (en) | Method for reconstruction of a distributed lock state after a node addition or removal using a consistent hash | |
CN114721594A (en) | Distributed storage method, device, equipment and machine readable storage medium | |
CN110795234A (en) | Resource scheduling method and device | |
US11023493B2 (en) | Intelligently scheduling resynchronization jobs in a distributed object-based storage system | |
CN116719646A (en) | Hot spot data processing method, device, electronic device and storage medium | |
US20230105953A1 (en) | Systems and methods for object migration in storage devices | |
CN115202842A (en) | Task scheduling method and device | |
CN111814007B (en) | Method, device and equipment for processing data of doubly-linked list and machine-readable storage medium | |
CN114816687A (en) | Cluster resource control method and device and storage medium | |
Shah et al. | “Saksham Model” Performance Improvisation Using Node Capability Evaluation in Apache Hadoop | |
US9378045B2 (en) | System and method for supporting cooperative concurrency in a middleware machine environment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: DE Ref document number: 1202938 Country of ref document: HK |
|
GR01 | Patent grant | ||
GR01 | Patent grant | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: GR Ref document number: 1202938 Country of ref document: HK |
|
TR01 | Transfer of patent right |
Effective date of registration: 20191205 Address after: P.O. Box 31119, grand exhibition hall, hibiscus street, 802 West Bay Road, Grand Cayman, Cayman Islands Patentee after: Innovative advanced technology Co., Ltd Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands Patentee before: Alibaba Group Holding Co., Ltd. |
|
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20210129 Address after: 801-10, Section B, 8th floor, 556 Xixi Road, Xihu District, Hangzhou City, Zhejiang Province Patentee after: Ant financial (Hangzhou) Network Technology Co.,Ltd. Address before: P.O. Box 31119, grand exhibition hall, hibiscus street, 802 West Bay Road, Grand Cayman, Cayman Islands Patentee before: Innovative advanced technology Co.,Ltd. |
|
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20210903 Address after: 100020 unit 02, 901, floor 9, unit 1, building 1, No.1, East Third Ring Middle Road, Chaoyang District, Beijing Patentee after: Beijing Aoxing Beisi Technology Co., Ltd Address before: 801-10, Section B, 8th floor, 556 Xixi Road, Xihu District, Hangzhou City, Zhejiang Province 310000 Patentee before: Ant financial (Hangzhou) Network Technology Co.,Ltd. |
|
TR01 | Transfer of patent right |