Claims
- 1. A method of performing a transaction in a processing cluster having a plurality of CPUs, one of the CPUs hosting a transaction monitor, at least one CPU hosting a resource manager, each of the CPUs including volatile storage and having access to stable storage, the method comprising:
beginning a transaction by the transaction monitor; and performing the following steps if no CPU failure occurs:
registering one or more resource managers to participate in the transaction, the CPUs hosting the participating resource managers being participating CPUs; performing work required by the transaction by the one or more participating resource managers, including obtaining any locks needed by the transaction; upon completion of the transaction work by the participating resource managers, performing a phase 1 operation in which a flush request is broadcast to each participating CPU, the flush request instructing each participating CPU to send a response indicating that information in volatile storage is flushed to stable storage; upon completion of the phase 1 operation, requesting a phase 2 operation by broadcasting a lock-release request to each participating CPU, except the CPU hosting the transaction monitor; releasing any locks acquired for the transaction while performing work required by the transaction in response to the phase 2 request; and after releasing all locks acquired for the transaction, informing the transaction monitor that phase 2 is completed.
- 2. A method of performing a transaction as recited in claim 1,
wherein the transaction monitor is implemented as a process pair that includes a primary and backup transaction monitor; and further comprising the step of informing the backup transaction monitor of the beginning of the transaction prior to performing the registering step.
- 3. A method of performing a transaction as recited in claim 1,
wherein the transaction monitor is implemented as a process pair that includes a primary and backup transaction monitor; and wherein the primary transaction monitor receives a response that all CPUs are flushed prior to the completion of the phase 1 operation.
- 4. A method of performing a transaction as recited in claim 1,
wherein the transaction monitor is implemented as a process pair that includes a primary and backup transaction monitor; wherein the primary transaction monitor receives a message requesting the transaction monitor process pair to release locks, after all participating CPUs, except the CPUs hosting the transaction monitor process pair, have completed a phase 2 lock release operation; and further comprising the step of performing, in response to the message, a phase 2 lock release operation by the transaction monitor process pair.
- 5. A method of performing a transaction as recited in claim 1,
wherein the resource manager is implemented as a process pair that includes a primary and backup resource manager; and wherein the step of registering one or more resource managers to participate in the transaction includes registering the primary and backup resource manager.
- 6. A method of performing a transaction as recited in claim 1,
wherein the resource manager is implemented as a process pair that includes a primary and backup resource manager; and wherein the step of performing a phase 1 flush operation includes performing a phase 1 flush operation by each of the primary and backup resource managers.
- 7. A method of performing a transaction as recited in claim 1,
wherein the resource manager is implemented as a process pair that includes a primary and backup resource manager; and wherein the step of releasing any locks includes releasing, by each of the primary and backup resource managers, any locks acquired by the primary and backup resource managers.
- 8. A method of performing a transaction as recited in claim 1, the method further comprising:
if a failure occurs during registering,
broadcasting a begin transaction message to all CPUs, except the CPU hosting the transaction monitor; performing work required by the transaction by the one or more resource managers working on behalf of the transaction, including obtaining any locks needed by the transaction; upon completion of the transaction work by the resource managers working on behalf of the transaction, performing a phase 1 operation in which a flush request is broadcast to each CPU, the flush request instructing each CPU working behalf of the transaction to send a response indicating that information in volatile storage is flushed to stable storage and instructing CPUs not working on behalf of the transaction to so indicate; upon completion of the phase 1 operation, requesting a phase 2 operation in which a release-lock request is broadcast to each CPU, except the CPU hosting the transaction monitor; releasing any locks acquired for the transaction while performing work required by the transaction; and after releasing all locks acquired for the transaction, informing the transaction monitor that phase 2 is completed.
- 9. A method of performing a transaction as recited in claim 1, the method further comprising:
if a failure occurs during a phase 1 operation,
performing a phase 1 operation in which a flush request is broadcast to each CPU, the flush request instructing each CPU working behalf of the transaction to send a response indicating that information in volatile storage is flushed to stable storage and instructing CPUs not working on behalf of the transaction to so indicate; upon completion of the phase 1 operation, requesting a phase 2 operation in which a release-lock request is broadcast to each CPU, except the CPU hosting the transaction monitor; releasing any locks acquired for the transaction while performing work required by the transaction; and after releasing all locks acquired for the transaction, informing the transaction monitor that the transaction is completed.
- 10. A method of performing a transaction as recited in claim 1, the method further comprising:
if a failure occurs during a phase 2 operation,
requesting a phase 2 operation in which a release-lock request is broadcast to each CPU, except the CPU hosting the transaction monitor; releasing any locks acquired for the transaction while performing work required by the transaction; and after releasing all locks acquired for the transaction, informing the transaction monitor that the transaction is completed.
- 11. A method of performing a transaction in a processing cluster having a plurality of CPUs, one of the CPUs hosting a transaction monitor, at least one CPU hosting a resource manager, each of the CPUs including volatile storage and having access to stable storage, the method comprising:
beginning a transaction by the transaction monitor; broadcasting a begin transaction message to all CPUs, except the CPU hosting the transaction monitor; performing work required by the transaction by the one or more resource managers working on behalf of the transaction, including obtaining any locks needed by the transaction; upon completion of the transaction work by the resource managers working on behalf of the transaction, performing a phase 1 operation in which a flush request is broadcast to each CPU, the flush request instructing each CPU working behalf of the transaction to send a response indicating that information in volatile storage is flushed to stable storage and instructing CPUs not working on behalf of the transaction to so indicate; upon completion of the phase 1 operation, requesting a phase 2 operation in which a release-lock request is broadcast to each CPU, except the CPU hosting the transaction monitor; releasing any locks acquired for the transaction while performing work required by the transaction; and after releasing all locks acquired for the transaction, informing the transaction monitor that phase 2 is completed.
- 12. A method of performing a transaction in a processing cluster having a plurality of CPUs, one of the CPUs hosting a transaction monitor, at least one CPU hosting an application program and a resource manager, each of the CPUs including volatile storage and having access to stable storage, the method comprising:
beginning a transaction by the application program; informing the transaction monitor that a transaction is begun; and performing the following steps if no CPU failure occurs:
registering one or more resource managers to participate in the transaction, the CPUs hosting the participating resource managers being participating CPUs; performing work required by the transaction by the one or more participating resource managers, including obtaining any locks needed by the transaction; upon completion of the transaction work by the participating resource managers, performing a phase 1 operation in which a flush request is broadcast to each participating CPU, the flush request instructing each participating CPU to send a response indicating that information in volatile storage is flushed to stable storage; upon completion of the phase 1 operation, requesting a phase 2 operation by broadcasting a lock-release request to each participating CPU, except the CPU hosting the transaction monitor; releasing any locks acquired for the transaction while performing work required by the transaction in response to the phase 2 request; and after releasing all locks acquired for the transaction, informing the transaction monitor that phase 2 is completed.
- 13. A method of performing a transaction as recited in claim 12,
wherein the transaction monitor is implemented as a process pair that includes a primary and backup transaction monitor; and further comprising the step of informing the backup transaction monitor of the beginning of the transaction prior to performing the registering step.
- 14. A method of performing a transaction as recited in claim 12,
wherein the transaction monitor is implemented as a process pair that includes a primary and backup transaction monitor; and wherein the primary transaction monitor receives a response that all CPUs are flushed prior to the completion of the phase 1 operation.
- 15. A method of performing a transaction as recited in claim 12,
wherein the transaction monitor is implemented as a process pair that includes a primary and backup transaction monitor; wherein the primary transaction monitor receives a message requesting the transaction monitor process pair to release locks, after all participating CPUs, except the CPUs hosting the transaction monitor process pair, have completed a phase 2 lock release operation; and further comprising the step of performing, in response to the message, a phase 2 lock release operation by the transaction monitor process pair.
- 16. A method of performing a transaction as recited in claim 12,
wherein the resource manager is implemented as a process pair that includes a primary and backup resource manager; and wherein the step of registering one or more resource managers to participate in the transaction includes registering the primary and backup resource manager.
- 17. A method of performing a transaction as recited in claim 12,
wherein the resource manager is implemented as a process pair that includes a primary and backup resource manager; and wherein the step of performing a phase 1 flush operation includes performing a phase 1 flush operation by each of the primary and backup resource managers.
- 18. A method of performing a transaction as recited in claim 12,
wherein the resource manager is implemented as a process pair that includes a primary and backup resource manager; and wherein the step of releasing any locks includes releasing, by each of the primary and backup resource managers, any locks acquired by the primary and backup resource managers.
- 19. A method of performing a transaction as recited in claim 12, the method further comprising:
if a failure occurs during registering,
broadcasting a begin transaction message to all CPUs, except the CPU hosting the transaction monitor; performing work required by the transaction by the one or more resource managers working on behalf of the transaction, including obtaining any locks needed by the transaction; upon completion of the transaction work by the resource managers working on behalf of the transaction, performing a phase 1 operation in which a flush request is broadcast to each CPU, the flush request instructing each CPU working behalf of the transaction to send a response indicating that information in volatile storage is flushed to stable storage and instructing CPUs not working on behalf of the transaction to so indicate; upon completion of the phase 1 operation, requesting a phase 2 operation in which a release-lock request is broadcast to each CPU, except the CPU hosting the transaction monitor; releasing any locks acquired for the transaction while performing work required by the transaction; and after releasing all locks acquired for the transaction, informing the transaction monitor that phase 2 is completed.
- 20. A method of performing a transaction as recited in claim 12, the method further comprising:
if a failure occurs during a phase 1 operation,
performing a phase 1 operation in which a flush request is broadcast to each CPU, the flush request instructing each CPU working behalf of the transaction to send a response indicating that information in volatile storage is flushed to stable storage and instructing CPUs not working on behalf of the transaction to so indicate; upon completion of the phase 1 operation, requesting a phase 2 operation in which a release-lock request is broadcast to each CPU, except the CPU hosting the transaction monitor; releasing any locks acquired for the transaction while performing work required by the transaction; and after releasing all locks acquired for the transaction, informing the transaction monitor that phase 2 is completed.
- 21. A method of performing a transaction as recited in claim 12, the method further comprising:
if a failure during a phase 2 operation,
requesting a phase 2 operation in which a release-lock request is broadcast to each CPU, except the CPU hosting the transaction monitor; releasing any locks acquired for the transaction while performing work required by the transaction; and after releasing all locks acquired for the transaction, informing the transaction monitor that phase 2 is completed.
- 22. A processing cluster comprising:
a stable storage system; a plurality of CPUs, each CPU including a volatile memory in which data and programs reside, and configured to access the stable storage system, wherein a designated one of the CPUs hosts a transaction monitor program and at least one CPU hosts a resource manager program, wherein the transaction monitor is configured to begin a transaction, and if no CPU failure occurs:
register one or more resource managers to participate in the transaction, the CPUs hosting the participating resource managers being participating CPUs; cause the one or more participating resource managers to perform work required by the transaction, including obtaining any locks needed by the transaction; upon completion of the transaction work by the participating resource managers, cause a phase 1 operation to be performed in which a flush request is broadcast to each participating CPU, the flush request instructing each participating CPU to send a response to the transaction monitor indicating that information in volatile storage is flushed to stable storage; upon completion of the phase 1 operation, cause a phase 2 operation by broadcasting a lock-release request to each participating CPU, except the CPU hosting the transaction monitor, any locks acquired for the transaction while performing work required by the transaction being released in response to the phase 2 request; and receive a message indicating that phase 2 is completed.
- 23. A method of performing a transaction as recited in claim 22, wherein the transaction monitor is further configured to:
if a failure occurs during registering,
broadcast a begin transaction message to all CPUs, except the CPU hosting the transaction monitor; cause the one or more resource managers to perform work required by the transaction on behalf of the transaction, including obtaining any locks needed by the transaction; upon completion of the transaction work by the resource managers working on behalf of the transaction, cause a phase 1 operation to be performed in which a flush request is broadcast to each CPU, the flush request instructing each CPU working behalf of the transaction to send a response indicating that information in volatile storage is flushed to stable storage and instructing CPUs not working on behalf of the transaction to so indicate; upon completion of the phase 1 operation, cause a phase 2 operation in which a release-lock request is broadcast to each CPU, except the CPU hosting the transaction monitor; any locks acquired for the transaction while performing work required by the transaction being released in response to the release-lock request; and receive a message that phase 2 is completed.
- 24. A method of performing a transaction as recited in claim 22, wherein the transaction monitor is further configured to:
if a failure occurs during a phase 1 operation,
cause a phase 1 operation to be performed in which a flush request is broadcast to each CPU, the flush request instructing each CPU working behalf of the transaction to send a response indicating that information in volatile storage is flushed to stable storage and instructing CPUs not working on behalf of the transaction to so indicate; upon completion of the phase 1 operation, causing a phase 2 operation in which a release-lock request is broadcast to each CPU, except the CPU hosting the transaction monitor; any locks acquired for the transaction while performing work required by the transaction being released in response to the release-lock request; and receive a message that phase 2 is completed.
- 25. A method of performing a transaction as recited in claim 22, wherein the transaction monitor is further configured to:
if a failure occurs during a phase 2 operation,
cause a phase 2 operation in which a release-lock request is broadcast to each CPU, except the CPU hosting the transaction monitor; any locks acquired for the transaction while performing work required by the transaction being released in response to the release-lock request; and receive a message that phase 2 is completed.
CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] This application claims priority to U.S. provisional Application, entitled “METHOD FOR HANDLING CLUSTER FAILURES AND RELOADS IN A FAULT TOLERANT CLUSTERED DATABASE SUPPORTING TRANSACTION REGISTRATION AND FAULT-IN LOGIC”, filed on Apr. 25, 2002, S No. 60/375,783, which is incorporated by reference into the present document.
[0002] This application claims priority to U.S. provisional application, entitled “HYBRID METHOD FOR FLUSHING TRANSACTION STATE IN A FAULT-TOLERANT CLUSTERED DATABASE”, filed on Apr. 25, 2002, S No. 60/375,703, which is incorporated by reference into the present document.
Provisional Applications (2)
|
Number |
Date |
Country |
|
60375783 |
Apr 2002 |
US |
|
60375703 |
Apr 2002 |
US |