WO2001013202A2 - Concurrent commit lock - Google Patents
Concurrent commit lock Download PDFInfo
- Publication number
- WO2001013202A2 WO2001013202A2 PCT/US2000/022675 US0022675W WO0113202A2 WO 2001013202 A2 WO2001013202 A2 WO 2001013202A2 US 0022675 W US0022675 W US 0022675W WO 0113202 A2 WO0113202 A2 WO 0113202A2
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- lock
- transaction
- computer executable
- executable code
- requested
- 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.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/52—Program synchronisation; Mutual exclusion, e.g. by means of semaphores
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1471—Saving, restoring, recovering or retrying involving logging of persistent data for recovery
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2308—Concurrency control
- G06F16/2336—Pessimistic concurrency control approaches, e.g. locking or multiple versions without time stamps
- G06F16/2343—Locking methods, e.g. distributed locking or locking implementation details
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/466—Transaction processing
Definitions
- This application relates to the field of transaction processing, and more particularly to the field of commit locks used in transaction processing.
- Transaction processing has applications as diverse as telecommunications billing, stock trading, electronic mail, airline and hotel reservations, inventory planning, accounting, and factory process control.
- Transaction processing systems may have one or more databases, computer clients, a network, and application software to control operation of the system.
- the properties of modern transaction processing systems include isolation and durability. Isolation dictates that each transaction appears to execute before or after each other transaction, i.e., that no two transactions are executed concurrently. Durability dictates that once a transaction is committed, that the effects are durable. If something goes wrong during execution of a transaction, a rollback operation is typically performed to "undo" the transaction. The capability to rollback transactions permits, for example, crash recovery of a transaction processing system and return to a previous, durable state. To implement these properties, transactions are generally bracketed by a begin-commit pair, with intermediate processing logged so that a transaction may be rolled back at any point until it is committed. Transaction processing systems including these properties are described, for example, in “Transaction Processing: Concepts and Techniques", Jim Gray and Andreas Reuter, 1994.
- Transaction management programs often perform physical logging for transaction "re-do" recovery and logical logging for transaction “undo.”
- physical logging each change to a block in a database is separately logged.
- the information included in the log records is sufficient to "do” or “undo” on a block by block basis the changes logged.
- Logical operations such as a logical operation to create a record in the database, are composed of one or more physical changes.
- Logical operations are undone by performing a compensating logical action, such as deleting the record from a database that a transaction created before rolling back.
- a multi-mode locking system for transaction processing including four modes of commit locking, such as a share lock, an update lock, a commit lock, and an exclusive lock.
- Transaction lock requests are queued according to a predetermined protocol, and may be upgraded under certain conditions.
- a system according to the invention may be used, for example, to perform a single-block logical operation without acquiring an update lock.
- the transaction processing program can use the lock in accordance with a prescribed protocol to ensure that only complete logical operations need to be undone while simultaneously allowing for highly concurrent processing of simultaneously executing transactions.
- Fig. 1 is a block diagram of a transaction processing system that may be used with the invention
- Fig. 2 is a lock compatibility matrix according to the principles of the invention.
- Fig. 3 is a flow chart of a process for providing commit locks for transactions according to the principles of the invention.
- FIG. 1 is a block diagram of a transaction processing system that may be used with the invention.
- a transaction processing system 10 may include an application 50, a resource manager 60, a lock manager 70, a log manager 80, a transaction manager 90, and transaction recovery functions 100.
- the components of the transaction processing system 10 generally cooperate to process transactions.
- the application 50 may be any application or other process or program running on a computer.
- the application 50 may access other components of the transaction processing system locally, where the system 10 resides on a single computer, or through remote procedure calls where the system 10 is distributed.
- the application 50 may be, for example a client process in a client- server network.
- the components of the system 10 may communicate over a network based upon SNA, OSI, TCP/IP, DECnet, LAN Manager, or any other network protocol suitable for transmitting data among distributed processes.
- the transaction processing system 10 may be capable of maintaining communications with, and executing transactions for, any number of applications 50, whether local or remote, through a selection of suitable software and hardware.
- the core services of the transaction processing system 10 include the resource manager 60, the lock manager 70, the log manager 80, and the transaction manager 90.
- the resource manager 60 may authorize, schedule and invoke services associated with a transaction.
- the resource manager 60 may also include any communications services and presentation services suitable to the application 50.
- the transaction manager 90 manages the commit and rollback of transactions, and recovery of transactions in the event of a failure.
- the log manager 80 may record a log of changes made by transactions to assist in rollback and reconstruction in case of failure.
- the lock manager 80 provides locking mechanisms to regulate concurrent access to objects stored by the resource manager 60, and may respond to lock requests from the resource manager 60 by granting, denying, or queuing requests for different types of locks on data, such as records stored in a relational database.
- Transaction recovery functions 100 may be called following a failure, such as a system crash, to permit return to some definite state.
- the core services may be, for example, processes on a server that is accessible through remote procedure calls.
- the application 50 initiates a transaction with a Begin_Work() call to the transaction manager 90, as shown by a first arrow 102.
- the transaction manager 90 may respond with a transaction identifier that uniquely identifies the transaction, as shown by a second arrow 104.
- these work requests may be forwarded from the application 50 to the resource manager 60, which coordinates database access, locking, logging, and so forth.
- the application 50 may conclude a transaction with a Comrnit_Work() call to the transaction manager 90, which may commit the transaction to a durable state.
- the components of the transaction processing system 10 may be implemented on a variety of platforms. For example, records may be stored in any database system accessible by the resource manager 60, such as DB2, Rdb, Oracle, Informix, and Sybase. Each component of the transaction processing system may be implemented in a number of programming languages, such as COBOL, FORTRAN, PL/I, Ada, C, C++, Java, 4GL, and so forth. Further, the components of the transaction processing system 10 may be distributed over a number of servers in a networked environment, or may reside on a single server or a server cluster, such as those available from Compaq, Sun Microsystems, and IBM.
- Figure 2 is a lock compatibility matrix according to the principles of the invention.
- a lock In order to protect transaction histories for proper failure recovery, a lock should not be completed for any object, such as a database record, when that object is locked by another transaction in an incompatible mode.
- the lock compatibility matrix 200 of Fig.2 describes locking constraints for the compatibility of concurrent commit lock requests and lock modes for a multi-mode locking system.
- the lock compatibility matrix 200 may be used, for example, by the lock manager 80 of Fig. 1.
- the mode of a request 202 is shown in a left-hand column in Fig. 2, and may include a "share”, “update”, “commit” and “exclusive” mode.
- the mode of a lock 204 is shown in a top row in Fig. 2, and may include a "share”, “update”, “commit” and “exclusive” mode.
- the "Y" in the lock compatibility matrix 200 indicates that the request will be granted for the transaction.
- the request may be queued by the lock manager 80 until the lock mode is available for the record and/or transaction requested.
- a share lock may be requested, for example, for any transaction or logical operation confined to a single block of data.
- a block of data is a fixed number of bytes such that when those bytes are written to non- volatile storage either all the bytes are written or none of them are.
- the share lock may be compatible with other share locks for other transactions.
- An update lock may be requested, for example, for any transaction or logical operation upon more than one block, such as a record in a database.
- the update lock may be compatible with other update locks, but incompatible with a commit lock.
- a commit lock may be requested, for example, when committing a transaction.
- the commit lock may be incompatible with update locks.
- the exclusive lock may be requested, for example, during back-up of a database, or any other operation requiring exclusive access to the database or a table or record therein.
- a logical operation may acquire an update mode lock before modifying any database blocks. Once all database blocks that need to be modified to complete the logical operation have been modified, the lock may be released. Before committing a transaction, the database manager may acquire a commit mode lock. As may be seen in Fig. 2, if there are any update locks granted on the data, then the commit lock may not be granted. The lock request may be queued, and the transaction may not commit until the request is granted. Thus, according to the principles of the invention, transactions affecting single blocks of data, may be handled differently by the lock manager 80 than transactions affecting a record that spans multiple blocks.
- FIG. 3 is a flow chart of a process for providing locks for transactions according to the principles of the invention.
- the process 300 begins when a transaction is received by the transaction processing system, as shown in step 302.
- a transaction may be any function to be performed by the transaction processing system.
- the transaction manager may decompose a transaction into one or more logical operations that may be undone during crash recovery, which may be, for example, atomic database operations such as a row create, row delete, row modify, key add, key delete, and so forth.
- each logical operation may be received by the resource manager.
- a lock may be requested for a logical operation from the lock manager, as shown in step 306.
- the type of lock requested may depend on the type of logical operation for which the lock is requested, including whether the operation acts upon a single block of data or on several blocks of date. It will further be appreciated that a lock request may be an upgrade request from a share lock to an update lock.
- the lock manager determines whether a lock is available for the logical operation. This determination may be made by applying a lock compatibility matrix such as that shown in Fig. 2. If there is no lock on one or more blocks of data subject to a pending logical operation, then any requested lock may be granted. If a lock is available, then the process 300 may proceed to step 312 where a lock request is granted.
- lock requests may be queued according to predetermined algorithms. For example, when an exclusive lock has been queued, all subsequent lock requests will be queued behind the exclusive lock. However, an upgrade request from share to update may be granted with a queued exclusive lock request. This may be useful where, for example, the upgrade is required to release locks on buffers for which an exclusive lock request is waiting. Share locks may be queued if there are any commit locks, and upgrade requests from share to update may be granted when there are pending commit lock requests. In this manner, lock starvation for a pending commit lock may be avoided as well as dead lock avoidance on database page locks.
- step 314 a logical operation may be performed.
- step 316 the lock requested for the logical operation may be released upon completion of the logical operation.
- step 318 a determination is made of whether the transaction is complete. If the transaction is not complete, the process 300 may return to step 304 where a next logical operation of the transaction may be received. If the transaction is complete, then the process 300 may proceed to step 320 where a commit lock is requested. The request may be queued with other lock requests in a lock queue for prioritization and grant as described above. When the commit lock is granted 322, the transaction may be committed 326, followed by the release 328 of the commit lock. After the commit 326, the transaction result is durable, and logging of the transaction by the log manager may be flushed as appropriate.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Quality & Reliability (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
Claims
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| AU67846/00A AU6784600A (en) | 1999-08-17 | 2000-08-17 | Concurrent commit lock |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US14938799P | 1999-08-17 | 1999-08-17 | |
| US60/149,387 | 1999-08-17 |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| WO2001013202A2 true WO2001013202A2 (en) | 2001-02-22 |
| WO2001013202A3 WO2001013202A3 (en) | 2001-05-03 |
Family
ID=22530057
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/US2000/022675 Ceased WO2001013202A2 (en) | 1999-08-17 | 2000-08-17 | Concurrent commit lock |
Country Status (2)
| Country | Link |
|---|---|
| AU (1) | AU6784600A (en) |
| WO (1) | WO2001013202A2 (en) |
Cited By (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7699022B2 (en) | 2003-05-21 | 2010-04-20 | L'air Liquide, Societe Anonyme A Directoire Et Conseil De Surveillance Pour L'etude Et L'exploitation Des Procedes Georges Claude | Device for the zonal surface treatment of an article by dielectric barrier discharge |
| EP2095225A4 (en) * | 2006-11-17 | 2010-10-20 | Microsoft Corp | ORDER OF VALIDATION OF SOFTWARE BASED TRANSACTIONS AND CONFLICT MANAGEMENT |
| US8010550B2 (en) | 2006-11-17 | 2011-08-30 | Microsoft Corporation | Parallelizing sequential frameworks using transactions |
| US8024714B2 (en) | 2006-11-17 | 2011-09-20 | Microsoft Corporation | Parallelizing sequential frameworks using transactions |
| US8145557B2 (en) | 2001-03-30 | 2012-03-27 | Bgc Partners, Inc. | Bid/offer spread trading |
| US9594793B2 (en) | 2010-09-23 | 2017-03-14 | International Business Machines Corporation | Supporting linked multi-user decision making in environments with constrained shared resources |
| CN107526629A (en) * | 2016-06-22 | 2017-12-29 | 中兴通讯股份有限公司 | A kind of transacter and concurrency control method |
| CN110019202A (en) * | 2017-10-19 | 2019-07-16 | 深圳区块链金融服务有限公司 | Method, computer system and medium for the transaction of concurrent processing block chain |
| US10515408B2 (en) | 2003-08-13 | 2019-12-24 | Bgc Partners, Inc. | Systems and methods for bid/offer liquidity spread trading |
| CN111475262A (en) * | 2020-04-02 | 2020-07-31 | 百度国际科技(深圳)有限公司 | Transaction request processing method, device, equipment and medium in block chain |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP0100821B1 (en) * | 1982-06-21 | 1990-07-25 | International Business Machines Corporation | Method and apparatus for managing a database |
-
2000
- 2000-08-17 AU AU67846/00A patent/AU6784600A/en not_active Abandoned
- 2000-08-17 WO PCT/US2000/022675 patent/WO2001013202A2/en not_active Ceased
Cited By (16)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US11030687B2 (en) | 2001-03-30 | 2021-06-08 | Bgc Partners, Inc. | Bid/offer spread trading |
| US8145557B2 (en) | 2001-03-30 | 2012-03-27 | Bgc Partners, Inc. | Bid/offer spread trading |
| US7699022B2 (en) | 2003-05-21 | 2010-04-20 | L'air Liquide, Societe Anonyme A Directoire Et Conseil De Surveillance Pour L'etude Et L'exploitation Des Procedes Georges Claude | Device for the zonal surface treatment of an article by dielectric barrier discharge |
| US10515408B2 (en) | 2003-08-13 | 2019-12-24 | Bgc Partners, Inc. | Systems and methods for bid/offer liquidity spread trading |
| US11205227B2 (en) | 2003-08-13 | 2021-12-21 | Bgc Partners, Inc. | Systems and methods for bid/offer liquidity spread trading |
| US8024714B2 (en) | 2006-11-17 | 2011-09-20 | Microsoft Corporation | Parallelizing sequential frameworks using transactions |
| US8402447B2 (en) | 2006-11-17 | 2013-03-19 | Microsoft Corporation | Parallelizing sequential frameworks using transactions |
| EP2095225A4 (en) * | 2006-11-17 | 2010-10-20 | Microsoft Corp | ORDER OF VALIDATION OF SOFTWARE BASED TRANSACTIONS AND CONFLICT MANAGEMENT |
| US8010550B2 (en) | 2006-11-17 | 2011-08-30 | Microsoft Corporation | Parallelizing sequential frameworks using transactions |
| US9607033B2 (en) | 2010-09-23 | 2017-03-28 | International Business Machines Corporation | Supporting linked multi-user decision making in environments with constrained shared resources utilizing durable files |
| US9594793B2 (en) | 2010-09-23 | 2017-03-14 | International Business Machines Corporation | Supporting linked multi-user decision making in environments with constrained shared resources |
| CN107526629A (en) * | 2016-06-22 | 2017-12-29 | 中兴通讯股份有限公司 | A kind of transacter and concurrency control method |
| CN107526629B (en) * | 2016-06-22 | 2023-04-14 | 中兴通讯股份有限公司 | Transaction processing system and concurrency control method |
| CN110019202A (en) * | 2017-10-19 | 2019-07-16 | 深圳区块链金融服务有限公司 | Method, computer system and medium for the transaction of concurrent processing block chain |
| CN111475262A (en) * | 2020-04-02 | 2020-07-31 | 百度国际科技(深圳)有限公司 | Transaction request processing method, device, equipment and medium in block chain |
| CN111475262B (en) * | 2020-04-02 | 2024-02-06 | 百度国际科技(深圳)有限公司 | Transaction request processing methods, devices, equipment and media in blockchain |
Also Published As
| Publication number | Publication date |
|---|---|
| AU6784600A (en) | 2001-03-13 |
| WO2001013202A3 (en) | 2001-05-03 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5452445A (en) | Two-pass multi-version read consistency | |
| US6412034B1 (en) | Transaction-based locking approach | |
| Ulusoy | Processing real-time transactions in a replicated database system | |
| US5095421A (en) | Transaction processing facility within an operating system environment | |
| JP3672208B2 (en) | Hierarchical transaction processing method | |
| EP0482761B1 (en) | Rule driven transaction management system and method | |
| EP1062569B1 (en) | Isolation levels and compensating transactions in an information system | |
| US9047355B2 (en) | Method and system for load balancing a distributed database | |
| US5745747A (en) | Method and system of lock request management in a data processing system having multiple processes per transaction | |
| Samaras et al. | Two-phase commit optimizations in a commercial distributed environment | |
| US8868577B2 (en) | Generic database manipulator | |
| US20080120304A1 (en) | Method and system for providing high performance data modification of relational database tables | |
| US20080134182A1 (en) | Computer readable storage medium for protection against interleaving transactions using a transaction manager | |
| US7849464B2 (en) | Protection against interleaving transactions using a transaction manager | |
| WO2001013202A2 (en) | Concurrent commit lock | |
| Batra et al. | A Decentralized Deadlock-Free Concurrency Control Method for Multidatabase Transactions. | |
| CN111209093A (en) | Processing method of distributed transaction in distributed database system | |
| Al-Jumah et al. | Implementation and modeling of two-phase locking concurrency control—a performance study | |
| US10459810B2 (en) | Technique for higher availability in a multi-node system using replicated lock information to determine a set of data blocks for recovery | |
| Lynch et al. | Correctness conditions for highly available replicated databases | |
| Son et al. | Replication Control for Distributed Real-Time Database Systems. | |
| CN117348977A (en) | Method, device, equipment and medium for controlling transaction concurrency in database | |
| Kemme et al. | Database replication based on group communication | |
| US7209919B2 (en) | Library server locks DB2 resources in short time for CM implicit transaction | |
| Srivastava et al. | Transaction processing in replicated data in the DDBMS |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| AK | Designated states |
Kind code of ref document: A2 Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BY BZ CA CH CN CR CU CZ DE DK DM DZ EE ES FI GB GD GE GH GM HR HU ID IL IN IS JP KE KG KP KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX MZ NO NZ PL PT RO RU SD SE SG SI SK SL TJ TM TR TT TZ UA UG US UZ VN YU ZA ZW |
|
| AL | Designated countries for regional patents |
Kind code of ref document: A2 Designated state(s): GH GM KE LS MW MZ SD SL SZ TZ UG ZW AM AZ BY KG KZ MD RU TJ TM AT BE CH CY DE DK ES FI FR GB GR IE IT LU MC NL PT SE BF BJ CF CG CI CM GA GN GW ML MR NE SN TD TG |
|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application | ||
| AK | Designated states |
Kind code of ref document: A3 Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BY BZ CA CH CN CR CU CZ DE DK DM DZ EE ES FI GB GD GE GH GM HR HU ID IL IN IS JP KE KG KP KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX MZ NO NZ PL PT RO RU SD SE SG SI SK SL TJ TM TR TT TZ UA UG US UZ VN YU ZA ZW |
|
| AL | Designated countries for regional patents |
Kind code of ref document: A3 Designated state(s): GH GM KE LS MW MZ SD SL SZ TZ UG ZW AM AZ BY KG KZ MD RU TJ TM AT BE CH CY DE DK ES FI FR GB GR IE IT LU MC NL PT SE BF BJ CF CG CI CM GA GN GW ML MR NE SN TD TG |
|
| DFPE | Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed before 20040101) | ||
| REG | Reference to national code |
Ref country code: DE Ref legal event code: 8642 |
|
| 122 | Ep: pct application non-entry in european phase | ||
| NENP | Non-entry into the national phase |
Ref country code: JP |