US20010042072A1 - Enhanced tw0 phase commit protocol - Google Patents
Enhanced tw0 phase commit protocol Download PDFInfo
- Publication number
- US20010042072A1 US20010042072A1 US09/166,690 US16669098A US2001042072A1 US 20010042072 A1 US20010042072 A1 US 20010042072A1 US 16669098 A US16669098 A US 16669098A US 2001042072 A1 US2001042072 A1 US 2001042072A1
- Authority
- US
- United States
- Prior art keywords
- transaction
- data sources
- data
- status
- unavailable
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR 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
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y10—TECHNICAL SUBJECTS COVERED BY FORMER USPC
- Y10S—TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y10S707/00—Data processing: database and file management or data structures
- Y10S707/99931—Database or file accessing
- Y10S707/99938—Concurrency, e.g. lock management in shared database
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y10—TECHNICAL SUBJECTS COVERED BY FORMER USPC
- Y10S—TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y10S707/00—Data processing: database and file management or data structures
- Y10S707/99951—File or database maintenance
- Y10S707/99952—Coherency, e.g. same view to multiple users
- Y10S707/99953—Recoverability
Definitions
- the invention relates in general to computer systems, and more particularly, to an enhanced two-phase commit protocol for distributed data processing environments.
- two-phase commit protocols are used to coordinate transactions against one or more data sources. Transactions must be coordinated with other data sources in the network or system to ensure that the data sources have current information.
- These data sources may include multiple databases distributed at several locations.
- a two-phase commit protocol the system first checks to see if all data sources are available, and, if so, proceeds to complete the transaction. However, if one or more of the data sources are unavailable or unable to complete the transaction, the transaction is canceled or “undone” until the data source (also known as a participant) is able to complete the transaction, or is queued until all participants are available to complete the transaction.
- the two-phase commit protocol is necessary for data environments that require high degrees of accuracy across large numbers of distributed computing systems, e.g., banking systems, credit card verification systems, databases for vital statistics, etc.
- the two-phase commit protocol is useful to ensure data integrity, the limitation of requiring all participants to be able to process the transaction makes the two-phase commit protocol's usefulness limited. Further, since there are many times that a data source or other participant may be unable to accept or process the transaction due to hardware or software malfunctions, preventative maintenance, system reconfigurations, etc., the two-phase commit protocol has even less usefulness.
- the present invention discloses a method, apparatus, and article of manufacture for performing a two-phase commit protocol for a transaction in a system having a plurality of data sources. An availability status is verified for all of the data sources, and the two-phase commit protocol for the transaction is completed (committed) for those data sources that are available, while the transaction is logged for data sources that are unavailable.
- the approach used in the present invention allows for a wider application of the two-phase commit protocol for networks that require the accuracy and precision that the two-phase commit protocol delivers.
- FIG. 1 is a block diagram that illustrates an exemplary hardware environment that could be used with the present invention.
- FIGS. 2 A- 2 C are flowchart that illustrates exemplary logic performed by the controller according to the present invention.
- the present invention discloses a method, apparatus, and article of manufacture for performing a two-phase commit protocol for a transaction in a system having a plurality of data sources. An availability status is verified for all of the data sources, and the two-phase commit protocol for the transaction is completed for those data sources that are available, while the transaction is logged for data sources that are unavailable.
- a two-phase commit protocol is used to coordinate transactions between many data sources.
- the coordination is between databases, and the coordination is performed by a Transaction Manager.
- the two-phase commit protocol operates on an “all-or-nothing” approach; if one of the databases (data sources) is unavailable to complete the transaction, the transaction is not performed or is stored for completion at a later time.
- the two-phase commit protocol's usefulness is limited because, typically, one or more of the data sources is not available at any given time. Thus, any transaction that is scheduled to take place at a time when one of the data sources is unavailable cannot take place using a two-phase commit protocol until the unavailable data source becomes available.
- the present invention enhances the two-phase commit protocol approach by allowing those data sources (also known as participants) that are available to complete the transaction, and storing the transaction for completion by the unavailable participants when they become available.
- the Transaction Manager uses the logical equivalent of a First-In-First-Out (FIFO) queue to ensure that all transactions are performed in the same order on all data sources within the computer system.
- FIFO First-In-First-Out
- the present invention allows the data sources to be synchronized in terms of transaction order by use of the logical FIFO construct.
- FIG. 1 is an exemplary hardware environment used to implement the preferred embodiment of the invention.
- the present invention is typically implemented using a computer 100 , which generally includes, inter alia, a processor, random access memory (RAM), data storage devices 102 , 104 , and 106 (e.g., hard, floppy, and/or CD-ROM disk drives, etc.).
- Computer 100 is coupled to other computers and/or data sources via network 108 , using data communications devices (e.g., modems, network interfaces, etc.).
- data communications devices e.g., modems, network interfaces, etc.
- computer 100 is connected to and can communicate with computers 110 , 112 , 114 , 116 , and 118 , and data sources 120 , 122 , 124 , 126 , and 128 .
- the present invention is not limited to five data sources; there may be a larger or smaller number of data sources within the system.
- Computer 100 executes transaction coordinator 130 and data manager 132 .
- Transaction coordinator 130 and data manager 132 generally comprise data and/or instructions which, when read and executed by the computer 100 , causes the computer 100 to perform the steps for performing and/or using the present invention.
- the data and/or instructions are embodied in and/or readable from a device, carrier, and/or media.
- the data and/or instructions can be embodied in and/or readable from a memory, data storage device, remote devices coupled to the computer via a data communications device for downloading a file from a network to the computer as is done in client-server architectures and on the Internet, floppy diskettes, CD-ROM disks, or other magnetic, optical, electronic, or other storage media or devices that can be connected to and interpreted by the computer.
- the present invention may be implemented as a method, apparatus, or article of manufacture using standard programming and/or engineering techniques to produce software, firmware, hardware, or any combination thereof.
- article of manufacture (or alternatively, “computer program product”) as used herein is intended to encompass a computer program accessible from any computer-readable device, carrier, or media. Many modifications may be made to this configuration without departing from the scope of the present invention.
- the present invention also teaches that any combination of the above components, or any number of different components, including computer programs, peripherals, and other devices, may be used to implement the present invention, so long as similar functions are performed thereby.
- the presentation of the computer system as described in FIG. 1 is not meant to limit the scope of the present invention, but to illustrate one possible embodiment of the present invention.
- data sources 120 - 128 are connected to network 108 .
- data sources 120 - 128 can share data and can synchronize databases for uniformity.
- data sources 120 - 128 can be local databases for a banking system.
- a transaction in the banking system e.g., a withdrawal of funds from an account, must be stored not only on the database closest to the geographical point of withdrawal; it must be stored on all databases within the banking system to ensure that the account is not overdrawn at some other location.
- the present invention allows for some of the data sources 120 - 128 , whether it is the local data source or not, to be unavailable for update.
- This situation can occur, for example, when there is a power failure in a certain geographical area, one of the data sources 120 - 128 needs to be maintained, or for other reasons.
- the unavailability of one data source, data source 120 is shown as a dashed line in FIG. 1.
- the discussion herein refers to one data source 120 being unavailable; however, the present invention envisions one or more data sources 120 - 128 being unavailable for any given transaction.
- the discussion herein is extendable to encompass any number of data sources 120 - 128 being unavailable within the system.
- the two-phased commit protocol of the present invention is performed by the transaction coordinator 130 and the data manager 132 .
- Transaction coordinator 130 checks to see the availability of data sources 120 - 128 . In the example of FIG. 1, data source 120 is unavailable.
- the transaction coordinator 130 allows the transaction to be performed on data sources 122 , 124 , 126 , and 128 , and the data manager 132 stores the transaction on storage device 102 .
- the data manager 132 in conjunction with the transaction coordinator 130 , also identifies which of the data sources 120 - 128 were unavailable. In the example illustrated in FIG.
- Storage device 102 then stores the transaction in a manner consistent with a FIFO queue, to allow the transaction to be time-ordered properly.
- transaction coordinator 130 sends a signal to data manager 132 , which checks data storage device 102 to see if there are any transactions that need to be logged to data source 120 . If there are, data manager 132 routes those transactions stored in data storage device 102 in time-ordered fashion to data source 120 . This action of sending the logged transactions synchronizes data source 120 with data sources 122 - 128 .
- FIGS. 2 A- 2 C are flowcharts that illustrate exemplary logic performed by the transaction coordinator 130 and data manager 132 according to the present invention.
- Block 200 represents the computer 100 waiting for an event. If the event is a transaction, computer 100 uses the exemplary logic of FIGS. 2 A- 2 C; otherwise, other functions and/or logic is performed by the computer 100 .
- Block 202 represents the transaction coordinator 130 receiving a “begin transaction” request from a data source 120 - 128 .
- Control then transfers to block 204 , which represents the transaction coordinator 130 marking the transaction as beginning.
- Control then transfers to block 206 , which represents the transaction coordinator 130 verifying the status of all participants in the system. The status of all participants is noted and recorded by the transaction coordinator.
- the remainder of the flowcharts of FIGS. 2 A- 2 C are dependent on the status recorded for each data source 120 - 128 .
- the discussion relating to the remainder of FIGS. 2 A- 2 C is a tree structure to enable transaction coordinator 130 to mark all data sources 120 - 128 and traverse the flowchart in a parallel and/or serial fashion.
- control passes to block 208 which is a decision block representing the transaction coordinator 130 verifying the status of all data sources 120 - 128 . For those data sources 120 - 128 that are in the “Active” state, control passes to block 210 . For those data sources 120 - 128 that are not active, control passes to block 212 . Block 210 represents the transaction coordinator 130 sending a “begin transaction” message to all active data sources 120 - 128 . Control then transfers to decision block 214 .
- Block 212 represents the transaction coordinator 130 marking the status of non-active data source 120 - 128 as “logged.” In the example of FIG. 1, data source 120 would be marked as having a logged status. Control then passes to point A 216 .
- Block 214 is a decision block representing transaction coordinator 130 determining whether data sources 120 - 128 failed during the begin transaction sequence initiated in block 210 . If the data sources 120 - 128 report to the transaction coordinator 130 that they have failed, then control transfers to block 218 for those data sources 120 - 128 that failed, and transaction coordinator 130 marks those data sources 120 - 128 as having a “failed” status. Control then transfers to point A 216 .
- Block 224 is a decision block that represents the transaction coordinator 130 determining whether any of the data sources 120 - 128 failed during the data transmission sequence of blocks 220 and 222 . If any of the data sources 120 - 128 did fail, control transfers to block 218 , where the failed data sources 120 - 128 are marked as failed. If none of the data sources 120 - 128 failed, control transfers to point B 226 .
- Decision block 230 is a decision block representing the computer determining whether any of the participants 120 - 128 have become unavailable during the prepare parcel processing. If so, the participants 120 - 128 that have become unavailable are marked as failed in block 232 , and control passes to point A 216 . If not, the transaction coordinator receives a prepare acknowledge parcels from the active participants. Control then transfers to decision block 236 .
- Decision block 236 is a decision block representing the transaction coordinator 130 determining whether any of the participants have sent a fail status during the prepare transaction parcel processing. If so, control transfers to block 238 , where the transaction coordinator 130 aborts the transaction. Control then transfers to block 240 , where the transaction coordinator 130 sends a failure status to the source system 100 . Control then transfers to block 242 , where the transaction coordinator 130 waits for additional input.
- point A 216 transfers control to block 250 , which represents the data manager 132 logging transaction data for the participants 120 - 128 that are unavailable. Control then transfers to block 252 , where data manager 132 stores the transaction data in a data log for those participants 120 - 128 that are unavailable. Control then transfers to block 254 , which represents data manager 132 determining whether a participant 120 - 128 that was previously unavailable is now available to send transaction data to. If there are no new participants 120 - 128 , control loops around block 254 . If there is a new participant 120 - 128 , control transfers to block 256 , where data manager 132 determines if the state of the new participant 120 - 128 is marked as logged. If so, control passes to block 258 , where the data manager 132 ships the data log to the participant 120 - 128 . Control then passes to block 242 , where data manager 132 waits for additional input.
- the present invention discloses a method, apparatus, and article of manufacture, for performing a two-phase commit protocol for a transaction in a system having a plurality of data sources. An availability status is verified for all of the data sources, and the two-phase commit protocol for the transaction is completed for those data sources that are available, while the transaction is logged for data sources that are unavailable.
Abstract
Description
- 1. Field of the Invention
- The invention relates in general to computer systems, and more particularly, to an enhanced two-phase commit protocol for distributed data processing environments.
- 2. Description of Related Art
- In distributed data processing environments, two-phase commit protocols are used to coordinate transactions against one or more data sources. Transactions must be coordinated with other data sources in the network or system to ensure that the data sources have current information.
- These data sources may include multiple databases distributed at several locations. In one embodiment of a two-phase commit protocol, the system first checks to see if all data sources are available, and, if so, proceeds to complete the transaction. However, if one or more of the data sources are unavailable or unable to complete the transaction, the transaction is canceled or “undone” until the data source (also known as a participant) is able to complete the transaction, or is queued until all participants are available to complete the transaction. The two-phase commit protocol is necessary for data environments that require high degrees of accuracy across large numbers of distributed computing systems, e.g., banking systems, credit card verification systems, databases for vital statistics, etc.
- Although the two-phase commit protocol is useful to ensure data integrity, the limitation of requiring all participants to be able to process the transaction makes the two-phase commit protocol's usefulness limited. Further, since there are many times that a data source or other participant may be unable to accept or process the transaction due to hardware or software malfunctions, preventative maintenance, system reconfigurations, etc., the two-phase commit protocol has even less usefulness.
- It can be seen, then, that there is a need in the art for a two-phase commit protocol that can be used when one or more participants are unable to process the transaction. It can also be seen, then, that there is a need in the art for a two-phase commit protocol that will allow those participants unable to participate in the initial database update to be updated once the participant is again able to participate in the transaction process.
- To overcome the limitations in the prior art described above, and to overcome other limitations that will become apparent upon reading and understanding the present specification, the present invention discloses a method, apparatus, and article of manufacture for performing a two-phase commit protocol for a transaction in a system having a plurality of data sources. An availability status is verified for all of the data sources, and the two-phase commit protocol for the transaction is completed (committed) for those data sources that are available, while the transaction is logged for data sources that are unavailable. The approach used in the present invention allows for a wider application of the two-phase commit protocol for networks that require the accuracy and precision that the two-phase commit protocol delivers.
- These and various other advantages and features of novelty which characterize the invention are pointed out with particularity in the claims annexed hereto and form a part hereof. However, for a better understanding of the invention, its advantages, and the objects obtained by its use, reference should be made to the drawings which form a further part hereof, and to the accompanying detailed description, in which there is illustrated and described specific examples of a method, apparatus, and article of manufacture in accordance with the invention.
- Referring now to the drawings in which like reference numbers represent corresponding parts throughout:
- FIG. 1 is a block diagram that illustrates an exemplary hardware environment that could be used with the present invention; and
- FIGS.2A-2C are flowchart that illustrates exemplary logic performed by the controller according to the present invention.
- In the following description of the preferred embodiment, reference is made to the accompanying drawings which form a part hereof, and in which is shown byway of illustration a specific embodiment in which the invention may be practiced. It is to be understood that other embodiments may be utilized and structural changes may be made without departing from the scope of the present invention.
- Overview
- The present invention discloses a method, apparatus, and article of manufacture for performing a two-phase commit protocol for a transaction in a system having a plurality of data sources. An availability status is verified for all of the data sources, and the two-phase commit protocol for the transaction is completed for those data sources that are available, while the transaction is logged for data sources that are unavailable.
- In a distributed data processing environment, a two-phase commit protocol is used to coordinate transactions between many data sources. Typically, the coordination is between databases, and the coordination is performed by a Transaction Manager. The two-phase commit protocol operates on an “all-or-nothing” approach; if one of the databases (data sources) is unavailable to complete the transaction, the transaction is not performed or is stored for completion at a later time.
- For large systems that have many data sources, the two-phase commit protocol's usefulness is limited because, typically, one or more of the data sources is not available at any given time. Thus, any transaction that is scheduled to take place at a time when one of the data sources is unavailable cannot take place using a two-phase commit protocol until the unavailable data source becomes available.
- The present invention enhances the two-phase commit protocol approach by allowing those data sources (also known as participants) that are available to complete the transaction, and storing the transaction for completion by the unavailable participants when they become available. The Transaction Manager uses the logical equivalent of a First-In-First-Out (FIFO) queue to ensure that all transactions are performed in the same order on all data sources within the computer system. The present invention allows the data sources to be synchronized in terms of transaction order by use of the logical FIFO construct.
- Hardware Environment
- FIG. 1 is an exemplary hardware environment used to implement the preferred embodiment of the invention. The present invention is typically implemented using a
computer 100, which generally includes, inter alia, a processor, random access memory (RAM),data storage devices Computer 100 is coupled to other computers and/or data sources vianetwork 108, using data communications devices (e.g., modems, network interfaces, etc.). - Through
network 108,computer 100 is connected to and can communicate withcomputers data sources -
Computer 100 executestransaction coordinator 130 anddata manager 132.Transaction coordinator 130 anddata manager 132 generally comprise data and/or instructions which, when read and executed by thecomputer 100, causes thecomputer 100 to perform the steps for performing and/or using the present invention. Generally, the data and/or instructions are embodied in and/or readable from a device, carrier, and/or media. For example, the data and/or instructions can be embodied in and/or readable from a memory, data storage device, remote devices coupled to the computer via a data communications device for downloading a file from a network to the computer as is done in client-server architectures and on the Internet, floppy diskettes, CD-ROM disks, or other magnetic, optical, electronic, or other storage media or devices that can be connected to and interpreted by the computer. - Thus, the present invention may be implemented as a method, apparatus, or article of manufacture using standard programming and/or engineering techniques to produce software, firmware, hardware, or any combination thereof. The term “article of manufacture” (or alternatively, “computer program product”) as used herein is intended to encompass a computer program accessible from any computer-readable device, carrier, or media. Many modifications may be made to this configuration without departing from the scope of the present invention.
- The present invention also teaches that any combination of the above components, or any number of different components, including computer programs, peripherals, and other devices, may be used to implement the present invention, so long as similar functions are performed thereby. The presentation of the computer system as described in FIG. 1 is not meant to limit the scope of the present invention, but to illustrate one possible embodiment of the present invention.
- Relationships and Operation
- As shown in FIG. 1, data sources120-128 are connected to
network 108. In this configuration, data sources 120-128 can share data and can synchronize databases for uniformity. As an example, data sources 120-128 can be local databases for a banking system. A transaction in the banking system, e.g., a withdrawal of funds from an account, must be stored not only on the database closest to the geographical point of withdrawal; it must be stored on all databases within the banking system to ensure that the account is not overdrawn at some other location. As the withdrawal is taking place, the present invention allows for some of the data sources 120-128, whether it is the local data source or not, to be unavailable for update. This situation can occur, for example, when there is a power failure in a certain geographical area, one of the data sources 120-128 needs to be maintained, or for other reasons. The unavailability of one data source,data source 120, is shown as a dashed line in FIG. 1. For illustration purposes, the discussion herein refers to onedata source 120 being unavailable; however, the present invention envisions one or more data sources 120-128 being unavailable for any given transaction. The discussion herein is extendable to encompass any number of data sources 120-128 being unavailable within the system. - When a transaction takes place, the two-phased commit protocol of the present invention is performed by the
transaction coordinator 130 and thedata manager 132.Transaction coordinator 130 checks to see the availability of data sources 120-128. In the example of FIG. 1,data source 120 is unavailable. Thetransaction coordinator 130 allows the transaction to be performed ondata sources data manager 132 stores the transaction onstorage device 102. Thedata manager 132, in conjunction with thetransaction coordinator 130, also identifies which of the data sources 120-128 were unavailable. In the example illustrated in FIG. 1, onlydata source 120 is unavailable, butdata manager 132 can log any number of transactions and any number data sources that are unavailable todata storage device 102, which is called the data log.Storage device 102 then stores the transaction in a manner consistent with a FIFO queue, to allow the transaction to be time-ordered properly. - Once
data source 120 becomes available,transaction coordinator 130 sends a signal todata manager 132, which checksdata storage device 102 to see if there are any transactions that need to be logged todata source 120. If there are,data manager 132 routes those transactions stored indata storage device 102 in time-ordered fashion todata source 120. This action of sending the logged transactions synchronizesdata source 120 with data sources 122-128. - Logic of the Database Replicator
- FIGS.2A-2C are flowcharts that illustrate exemplary logic performed by the
transaction coordinator 130 anddata manager 132 according to the present invention. -
Block 200 represents thecomputer 100 waiting for an event. If the event is a transaction,computer 100 uses the exemplary logic of FIGS. 2A-2C; otherwise, other functions and/or logic is performed by thecomputer 100. -
Block 202 represents thetransaction coordinator 130 receiving a “begin transaction” request from a data source 120-128. Control then transfers to block 204, which represents thetransaction coordinator 130 marking the transaction as beginning. Control then transfers to block 206, which represents thetransaction coordinator 130 verifying the status of all participants in the system. The status of all participants is noted and recorded by the transaction coordinator. The remainder of the flowcharts of FIGS. 2A-2C are dependent on the status recorded for each data source 120-128. The discussion relating to the remainder of FIGS. 2A-2C is a tree structure to enabletransaction coordinator 130 to mark all data sources 120-128 and traverse the flowchart in a parallel and/or serial fashion. - Once
transaction coordinator 130 has recorded the status of all data sources 120-128, control passes to block 208, which is a decision block representing thetransaction coordinator 130 verifying the status of all data sources 120-128. For those data sources 120-128 that are in the “Active” state, control passes to block 210. For those data sources 120-128 that are not active, control passes to block 212.Block 210 represents thetransaction coordinator 130 sending a “begin transaction” message to all active data sources 120-128. Control then transfers todecision block 214. -
Block 212 represents thetransaction coordinator 130 marking the status of non-active data source 120-128 as “logged.” In the example of FIG. 1,data source 120 would be marked as having a logged status. Control then passes to point A 216. -
Block 214 is a decision block representingtransaction coordinator 130 determining whether data sources 120-128 failed during the begin transaction sequence initiated inblock 210. If the data sources 120-128 report to thetransaction coordinator 130 that they have failed, then control transfers to block 218 for those data sources 120-128 that failed, andtransaction coordinator 130 marks those data sources 120-128 as having a “failed” status. Control then transfers to point A 216. - For those data sources120-128 that do not fail during the begin transaction sequence of
block 210, control passes to block 220, which represents thedata manager 132 receiving transactional data. Control then transfers to block 222, which represents thedata manager 132 sending the transactional data to the active data sources 120-128. Control then transfers to block 224. -
Block 224 is a decision block that represents thetransaction coordinator 130 determining whether any of the data sources 120-128 failed during the data transmission sequence ofblocks point B 226. - Referring now to FIG. 2B, from
point B 226, control transfers to block 228, where the transaction coordinator receives a commit transaction parcel command and sends a prepare transaction parcel to the active participants in the network. Control then transfers todecision block 230. -
Decision block 230 is a decision block representing the computer determining whether any of the participants 120-128 have become unavailable during the prepare parcel processing. If so, the participants 120-128 that have become unavailable are marked as failed inblock 232, and control passes topoint A 216. If not, the transaction coordinator receives a prepare acknowledge parcels from the active participants. Control then transfers todecision block 236. -
Decision block 236 is a decision block representing thetransaction coordinator 130 determining whether any of the participants have sent a fail status during the prepare transaction parcel processing. If so, control transfers to block 238, where thetransaction coordinator 130 aborts the transaction. Control then transfers to block 240, where thetransaction coordinator 130 sends a failure status to thesource system 100. Control then transfers to block 242, where thetransaction coordinator 130 waits for additional input. - If there is not a fail status detected in
block 236, control transfers to block 244, wheretransaction coordinator 130 marks the transaction as committed. Control then transfers to block 246, where thetransaction coordinator 130 sends the commit transaction parcel to the active participants 120-128. Control then transfers to block 248, where thetransaction coordinator 130 responds with a successful status parcel to thesource system 100, and then transfers control to block 242, wheretransaction coordinator 130 waits for additional input. - Referring now to FIG. 2C,
point A 216 transfers control to block 250, which represents thedata manager 132 logging transaction data for the participants 120-128 that are unavailable. Control then transfers to block 252, wheredata manager 132 stores the transaction data in a data log for those participants 120-128 that are unavailable. Control then transfers to block 254, which representsdata manager 132 determining whether a participant 120-128 that was previously unavailable is now available to send transaction data to. If there are no new participants 120-128, control loops aroundblock 254. If there is a new participant 120-128, control transfers to block 256, wheredata manager 132 determines if the state of the new participant 120-128 is marked as logged. If so, control passes to block 258, where thedata manager 132 ships the data log to the participant 120-128. Control then passes to block 242, wheredata manager 132 waits for additional input. - If the state of the new participant120-128 was not logged, control passes to decision block 260, where
data manager 132 determines if the transaction was marked as committed. If so, control transfers to block 262, where thedata manager 132 sends the commit transaction parcel to the new participant 120-128. If not, control passes to block 264, where thedata manager 132 sends the abort transaction parcel to the new participant 120-128. Control transfers fromblocks - Conclusion
- This concludes the description of the preferred embodiment of the invention. The following describes some alternative embodiments for accomplishing the present invention. For example, any type of computer, such as a mainframe, minicomputer, or personal computer, could be used with the present invention. In addition, any software program utilizing (either partially or entirely) a database could benefit from the present invention.
- In summary, the present invention discloses a method, apparatus, and article of manufacture, for performing a two-phase commit protocol for a transaction in a system having a plurality of data sources. An availability status is verified for all of the data sources, and the two-phase commit protocol for the transaction is completed for those data sources that are available, while the transaction is logged for data sources that are unavailable.
- The foregoing description of the preferred embodiment of the invention has been presented for the purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise form disclosed. Many modifications and variations are possible in light of the above teaching. It is intended that the scope of the invention be limited not by this detailed description, but rather by the claims appended hereto.
Claims (9)
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US09/166,690 US6363401B2 (en) | 1998-10-05 | 1998-10-05 | Enhanced two-phase commit protocol |
DE69937715T DE69937715T2 (en) | 1998-10-05 | 1999-10-01 | Improved two-phase binding protocol |
EP99307770A EP0992901B1 (en) | 1998-10-05 | 1999-10-01 | Enhanced two phase commit protocol |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US09/166,690 US6363401B2 (en) | 1998-10-05 | 1998-10-05 | Enhanced two-phase commit protocol |
Publications (2)
Publication Number | Publication Date |
---|---|
US20010042072A1 true US20010042072A1 (en) | 2001-11-15 |
US6363401B2 US6363401B2 (en) | 2002-03-26 |
Family
ID=22604317
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US09/166,690 Expired - Lifetime US6363401B2 (en) | 1998-10-05 | 1998-10-05 | Enhanced two-phase commit protocol |
Country Status (3)
Country | Link |
---|---|
US (1) | US6363401B2 (en) |
EP (1) | EP0992901B1 (en) |
DE (1) | DE69937715T2 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030014441A1 (en) * | 2001-06-29 | 2003-01-16 | Akira Suzuki | Document data structure, information recording medium, information processing apparatus, information processing system and information processing method |
US20120191681A1 (en) * | 2005-11-30 | 2012-07-26 | International Business Machines Corporation | Failure tolerant transaction processing system |
CN104462497A (en) * | 2014-12-19 | 2015-03-25 | 深圳中兴网信科技有限公司 | Crossing-base transaction processing method and system based on relational databases |
Families Citing this family (22)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7103586B2 (en) * | 2001-03-16 | 2006-09-05 | Gravic, Inc. | Collision avoidance in database replication systems |
US7177866B2 (en) | 2001-03-16 | 2007-02-13 | Gravic, Inc. | Asynchronous coordinated commit replication and dual write with replication transmission and locking of target database on updates only |
US20020138790A1 (en) * | 2001-03-26 | 2002-09-26 | Satyanarayana Nishtala | Apparatus and method for managing errors on a point-to-point interconnect |
US7028219B2 (en) * | 2002-04-25 | 2006-04-11 | Hewlett-Packard Development Company, L.P. | Hybrid method for flushing transaction state in a fault-tolerant clustered database |
US20040215594A1 (en) * | 2003-01-24 | 2004-10-28 | Bea Systems, Inc. | System for transaction processing with parallel execution |
US7346905B2 (en) * | 2003-06-10 | 2008-03-18 | International Business Machines Corporation | Apparatus and method for maintaining resource integrity without a unified transaction manager in a software environment |
US7475117B1 (en) * | 2005-12-15 | 2009-01-06 | Teradata Us, Inc. | Two-phase commit electronic mail delivery |
US7631057B2 (en) * | 2006-04-21 | 2009-12-08 | Bea Systems, Inc. | Two-phase deployment framework |
US7617421B2 (en) * | 2006-07-27 | 2009-11-10 | Sun Microsystems, Inc. | Method and apparatus for reporting failure conditions during transactional execution |
US9401957B2 (en) * | 2007-09-14 | 2016-07-26 | International Business Machines Corporation | System and method for synchronization between servers |
US8892558B2 (en) | 2007-09-26 | 2014-11-18 | International Business Machines Corporation | Inserting data into an in-memory distributed nodal database |
US8027996B2 (en) * | 2007-11-29 | 2011-09-27 | International Business Machines Corporation | Commitment control for less than an entire record in an in-memory database in a parallel computer system |
US7962458B2 (en) * | 2008-06-12 | 2011-06-14 | Gravic, Inc. | Method for replicating explicit locks in a data replication engine |
US8301593B2 (en) * | 2008-06-12 | 2012-10-30 | Gravic, Inc. | Mixed mode synchronous and asynchronous replication system |
TW201032535A (en) * | 2008-10-14 | 2010-09-01 | Ibm | A method of handling a message |
US20100176760A1 (en) * | 2009-01-09 | 2010-07-15 | Bullen M James | System for photovoltaic power and charge management |
US8629646B2 (en) * | 2009-01-09 | 2014-01-14 | Solar Components Llc | Generation of renewable energy certificates from distributed procedures |
US8995260B2 (en) | 2012-08-09 | 2015-03-31 | Blackberry Limited | Method and apparatus for managing load in a communication network |
US8976648B2 (en) * | 2012-08-09 | 2015-03-10 | Blackberry Limited | Method and apparatus for managing load on service devices in a communication network |
US20140214886A1 (en) | 2013-01-29 | 2014-07-31 | ParElastic Corporation | Adaptive multi-client saas database |
US20140222698A1 (en) * | 2013-01-31 | 2014-08-07 | EM Biofuels, LLC | Systems and Methods for Tracking Renewable Energy Credits |
US20160063029A1 (en) | 2014-08-29 | 2016-03-03 | Netapp, Inc. | Clustered storage system synchronization |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US4412287A (en) | 1975-05-29 | 1983-10-25 | Braddock Iii Walter D | Automated stock exchange |
US5095421A (en) | 1989-08-17 | 1992-03-10 | International Business Machines Corporation | Transaction processing facility within an operating system environment |
US5301320A (en) | 1991-06-28 | 1994-04-05 | Digital Equipment Corporation | Workflow management and control system |
US5452445A (en) | 1992-04-30 | 1995-09-19 | Oracle Corporation | Two-pass multi-version read consistency |
US5530848A (en) | 1992-10-15 | 1996-06-25 | The Dow Chemical Company | System and method for implementing an interface between an external process and transaction processing system |
US5455952A (en) | 1993-11-03 | 1995-10-03 | Cardinal Vision, Inc. | Method of computing based on networks of dependent objects |
US5850507A (en) | 1996-03-19 | 1998-12-15 | Oracle Corporation | Method and apparatus for improved transaction recovery |
US6105147A (en) | 1997-04-16 | 2000-08-15 | Compaq Computer Corporation | Using process pairs as transaction-coordinated resource managers |
US6154849A (en) * | 1998-06-30 | 2000-11-28 | Sun Microsystems, Inc. | Method and apparatus for resource dependency relaxation |
-
1998
- 1998-10-05 US US09/166,690 patent/US6363401B2/en not_active Expired - Lifetime
-
1999
- 1999-10-01 EP EP99307770A patent/EP0992901B1/en not_active Expired - Lifetime
- 1999-10-01 DE DE69937715T patent/DE69937715T2/en not_active Expired - Lifetime
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030014441A1 (en) * | 2001-06-29 | 2003-01-16 | Akira Suzuki | Document data structure, information recording medium, information processing apparatus, information processing system and information processing method |
US20120191681A1 (en) * | 2005-11-30 | 2012-07-26 | International Business Machines Corporation | Failure tolerant transaction processing system |
US8935224B2 (en) * | 2005-11-30 | 2015-01-13 | International Business Machines Corporation | Failure tolerant transaction processing system |
CN104462497A (en) * | 2014-12-19 | 2015-03-25 | 深圳中兴网信科技有限公司 | Crossing-base transaction processing method and system based on relational databases |
Also Published As
Publication number | Publication date |
---|---|
DE69937715T2 (en) | 2008-12-11 |
DE69937715D1 (en) | 2008-01-24 |
EP0992901A2 (en) | 2000-04-12 |
EP0992901A3 (en) | 2003-11-12 |
US6363401B2 (en) | 2002-03-26 |
EP0992901B1 (en) | 2007-12-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6363401B2 (en) | Enhanced two-phase commit protocol | |
US7177866B2 (en) | Asynchronous coordinated commit replication and dual write with replication transmission and locking of target database on updates only | |
US7003531B2 (en) | Synchronization of plural databases in a database replication system | |
US7103586B2 (en) | Collision avoidance in database replication systems | |
EP4254183A1 (en) | Transaction processing method and apparatus, computer device, and storage medium | |
US7580979B2 (en) | Message ordering in a messaging system | |
US7693882B2 (en) | Replicating data across the nodes in a cluster environment | |
US20060195487A1 (en) | Systems and Methods for Managing the Synchronization of Replicated Version-Managed Databases | |
US8271448B2 (en) | Method for strategizing protocol presumptions in two phase commit coordinator | |
US20050028171A1 (en) | System and method enabling multiple processes to efficiently log events | |
CN113396407A (en) | System and method for augmenting database applications using blockchain techniques | |
US7203863B2 (en) | Distributed transaction state management through application server clustering | |
US6330686B1 (en) | Handling protected conversation messages across IMS restart in shared queues environment | |
KR20040074627A (en) | System and method of distributing replication commands | |
US7228455B2 (en) | Transaction branch management to ensure maximum branch completion in the face of failure | |
US7089265B1 (en) | Database management system for implementing independent database actions in response to events of interest | |
US11522966B2 (en) | Methods, devices and systems for non-disruptive upgrades to a replicated state machine in a distributed computing environment | |
US6539434B1 (en) | UOWE's retry process in shared queues environment | |
Zhao et al. | Enable concurrent Byzantine fault tolerance computing with software transactional memory | |
JPH08147203A (en) | Transaction processing system | |
JPH0451334A (en) | Delay update processing system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
AS | Assignment |
Owner name: NCR CORPORATION, OHIO Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:YAHYA, MUHAMMAD;BARNHART, DEVIN LYLE;LEE, JERRY C.;AND OTHERS;REEL/FRAME:009619/0878;SIGNING DATES FROM 19981024 TO 19981113 |
|
STCF | Information on status: patent grant |
Free format text: PATENTED CASE |
|
CC | Certificate of correction | ||
FPAY | Fee payment |
Year of fee payment: 4 |
|
AS | Assignment |
Owner name: TERADATA US, INC., OHIO Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:NCR CORPORATION;REEL/FRAME:020540/0786 Effective date: 20070924 |
|
FEPP | Fee payment procedure |
Free format text: PAYOR NUMBER ASSIGNED (ORIGINAL EVENT CODE: ASPN); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY |
|
FPAY | Fee payment |
Year of fee payment: 8 |
|
FPAY | Fee payment |
Year of fee payment: 12 |