Source: https://patents.google.com/patent/KR100983300B1/en
Timestamp: 2020-02-27 06:05:25
Document Index: 414606747

Matched Legal Cases: ['Application No. 09', 'Application No. 0009989', 'Application No. 09', 'Application No. 10', 'Application No. 0207969', 'Application No. 10', 'Application No.0207967', 'Application No. 09', 'Application No. 09']

KR100983300B1 - Recovery from failures within data processing systems - Google Patents
KR100983300B1
KR100983300B1 KR1020057016931A KR20057016931A KR100983300B1 KR 100983300 B1 KR100983300 B1 KR 100983300B1 KR 1020057016931 A KR1020057016931 A KR 1020057016931A KR 20057016931 A KR20057016931 A KR 20057016931A KR 100983300 B1 KR100983300 B1 KR 100983300B1
KR1020057016931A
KR20060004915A (en
조스 에미르 가자
로버트 다니엘 밀러
로버트 프랭크 벅스톤
피터 싯달
스테픈 리챠드 워커
폴 케틀리
데이비드 제임스 피셔
폴 호프웰
스테픈 제임스 홉슨
2003-10-22 Application filed by 레노보 (싱가포르) 피티이. 엘티디. filed Critical 레노보 (싱가포르) 피티이. 엘티디.
2006-01-16 Publication of KR20060004915A publication Critical patent/KR20060004915A/en
2010-09-20 Publication of KR100983300B1 publication Critical patent/KR100983300B1/en
Provided are methods, data processing systems, recovery components, and computer programs for recovering from storage failures affecting a data store. At least some recovery processing is performed while the data store can receive new data and enable retrieval of this new data. Although new data items can be received in the store and retrieved from it during recovery processing, updates to the data store recovered to the store by recovery processing after being performed prior to the failure are recovered within the recovery unit of work and restored Processes other than the recovery process become inaccessible until the successful completion of the. This recovery processing ensures that the recovered store is consistent with the state of the store at the time of failure and available for addition and retrieval of new data items prior to completion of the recovery processing.
Data store, recovery process, new data, storage failure, backup copy
Fault recovery within a data processing system {RECOVERY FROM FAILURES WITHIN DATA PROCESSING SYSTEMS}
FIELD OF THE INVENTION The present invention relates to fault recovery in data processing systems and, more particularly, to recovery components and methods implemented with computer programs and data processing systems.
Very many reliable data processing systems can be vulnerable to storage failures such as disk failures and failures or software failures that cause loss or corruption of data on primary storage. In order to prevent such disturbances that cause permanent loss of data, it is known to provide recovery capabilities, such as creating a backup copy of stored data and performing log records describing updates to the stored data since the most recent backup.
Many communications manager software products, including IBM's MQSeries ™ and WebSphere ™ MQ family's messaging products, provide facilities for storing messages in data repositories such as message queues or database tables during message transfer between sender and receiver. As with other data processing systems and computer programs, there is a need for a solution that recovers from potential system or program failures to prevent loss of important messages and ensures that application program work can be completed successfully.
In a message queuing system in which a queue manager program handles the transfer of messages between queues, it is known that the recovery facility within the queue manager program recovers the queue and its message contents if the primary storage used to receive the message has failed. It is. The recovery facility restores messages to the queue so that the final state of the queue is the same as when the storage failed. These recovery facilities recreate a snapshot of the message queue and its contents from the backup copy of the queue, and then apply the changes back to the queue with reference to the queue manager's log records. In this known solution, the queue manager must complete recovery processing before any messages are retrieved from the queue and before any new messages are added to the queue. This ensures that the state of the queue after recovery is the same as the state of the queue at the time of failure, and that message sequencing is not lost as a result of the failure.
However, the remaining problem with this solution is the availability of messaging functionality and message storage while recovery processing is in process. Many applications require optimal message availability but have a complete requirement that the messaging system provides guaranteed one-time message delivery. If an application becomes able to access the queue during recovery processing, there is a risk that a single message can be processed twice by the application. A bank customer who borrows twice from his account in response to a single fund transfer order can be very dissatisfied.
US Pat. No. 6,377,959, issued to Carlson on April 23, 2002, describes a transaction processing system that continues to process incoming transactions during failure and recovery of either of two redundant databases. One of the two duplicates is assigned to the "active" state and the other remains in the "redundant" state. All incoming queries are sent only to the active database and all incoming updates are sent to both the active and redundant databases. If one database fails, the other database is assigned an active state (if it is not already active) to continue processing incoming queries and update repairs and restarts of the failed database. Repairing and restarting a failed database involves the use of interleaved copy and update operations in a single pass through the active database. The interleaving of the incoming update and the operation of the copy are performed according to the queue threshold method, which controls the copy operation in response to the number of incoming transaction updates. The transaction processing system will continue to operate during both failure and recovery activities. Since full replication is maintained, log records are written only when one of the databases has failed, and access to the failed database is not required while the database is under repair. While continuous availability is highly desirable, this solution has significant processing and storage overhead that enables the exchange of operational states (active or redundant) of each of the two database systems while maintaining two complete database replications. Moreover, since duplication does not protect against software corruption, recovery operations may be required in addition to duplication in some circumstances.
US Patent Application Publication No. 2002/0049776 (Aronoff et al., Published April 25, 2002) also relates to a replicated database for high availability. This document describes a method for resynchronization of the source and target databases after a crash by restarting replication after the recovery of the target database and eliminating stale transactions that have already been applied to the target database during recovery.
Another way for message queuing systems clustered together in a single file on a single disk to store messages and status information for the messages is shown in US Pat. No. 6,353,834, issued March 5, 2002 to Wong. This system seeks to achieve efficient writing of data by preventing the writing of updates to three different disks (data disks, index structure disks and log disks). The Queue Entry Map Table is used to enter control information, message blocks and log records. U. S. Patent No. 6,353, 834 shows the use of existing RAID technology and redundant writes of data, and in the absence of redundant writes of data, it does not provide protection against storage failures that cause loss of data maintained on a single disk.
International Patent Application Publication No. WO 02/073409 discloses a method for recovery of database nodes that does not abort a write transaction. A failed node is recovered by copying the fragments that have changed since the old version was created, using the old version of the database fragment in the failed node and the latest version of the fragment in the other node. The deletion log is used to enable recovery processing considering deletion after the old version is generated. The write transaction after the start of the recovery process is performed on the recovery node during the recovery process.
Aspects of the present invention provide a method, a data processing system, a recovery component, and a computer program for recovering from failures affecting a data store, wherein at least some of the recovery processing includes the data store receiving new data and retrieving such new data. Is performed while it is possible. This failure may be a hardware failure or failure, or a software failure, which causes loss or corruption of data in the data store on the primary storage medium.
New data items (i.e. received after a failure) can be received by the repository and retrieved from it during recovery processing, but updates to the data store performed before the failure and then stored back in the repository by the recovery processing complete the recovery processing. Will not be accessible until. Recovery processing can ensure that the recovered store will respond to the state of the store in the event of failure while achieving rapid availability of the data store.
In a first aspect, the present invention provides a method of recovering a data store from failures affecting a primary copy of the data store, wherein the method provides sufficient data to regenerate the primary copy of the data store and the data items maintained thereon. Maintaining a secondary copy; In response to a failure affecting the primary copy of the data store, regenerate the primary copy of the data store from the secondary data copy and use a recovery process to recover the primary from the secondary copy within a recovery unit of work. Restoring a data item to a copy, wherein the data item restored to the primary copy of the data midnight within the recovery unit of work becomes inaccessible to processes other than the recovery process until completion of the recovery unit of work; Prior to completion of the recovery unit of work, the data store enables addition of data items to the data store independently of the recovery step and allows processes other than the recovery process to access the independently added data items. Constructing a primary copy of the; And in response to successful completion of the recovery step, completing a recovery unit of work such as releasing the inaccessibility of the recovered data.
According to a preferred embodiment of the present invention, an update to a messaging store during normal forward processing of the messaging system includes a message transfer operation to add a message to the store and a message retrieval operation to delete the message. In this document, a 'message repository' can be a message queue, a database table or any other data structure that holds a message or message queue. After a failure affecting the message store, the message store is recreated in an empty state, and preferably, the transfer and retrieval operations are applied back to the store with reference to the backup copy and log records of the store. This message store is regenerated as a preliminary recovery step, and the messaging function can send new messages to / from the message store before completion of recovery. Updates to the message store that include reapplying operations from backup storage and log records are treated as non-completed operations in the recovery unit of work and are only completed at the completion of the recovery unit of work (that is, a homeostasis check is performed so that other programs can Final and accessible update is made). The recovery unit of work includes a series of actions required to recover the contents of the message store (after regeneration of the message store) in response to the state of the store in the event of a failure. The message store is available for receipt of new messages as soon as it is regenerated, but any messages restored to the queue within the recovery unit of work cannot be recovered from the store by the target application program until completion of the recovery unit of work.
The present invention is useful for applications in which it is not important to process data items in the same order that they are added to the data store. In the first application example, each data item or message is a request for the performance of a particular task. If the order in which the tasks are performed is not important, new requests can be received in the repository and processed without having to wait for all previous requests to be recovered.
One embodiment of the present invention provides a data communication system for transmitting a message between a sender and a receiver, wherein the message is maintained in the message store after the message transfer operation and later retrieved for delivery from the store to the recipient. Message transfer and message retrieval events, including backup copies of the store being created, updated periodically or in response to certain events, and log records written to update the transaction state of messages, such as events that have occurred since the most recent backup operation. Record it. The system controls the data communication system, in response to storage failures affecting the primary copy of the message store, regenerates the primary copy of the data store, and makes a primary copy by reference to the backup copy and log records of the store. And a recovery component for performing the step of recovering the data item. Backup copies and log records are created during normal forward processing before failure. The system is configured to allow new messages to be added to the repository and retrieved therefrom without waiting for the completion of recovery processing. Updates applied to the store by reference to messages and backup copies or log records recovered to the store are accessed by the searcher until all message store updates corresponding to transport and retrieval actions performed prior to the failure are reapplied to the message store. It becomes impossible. In this document, 'new message' is the first message added to the repository after a failure. Messages added to the queue before the failure and then restored to the queue after the failure are hereinafter referred to as 'old messages'.
Another problem with many known communication solutions is the tendency to accumulate data in the repository while recovery processing is completed, possibly allowing the repository (or structure within the repository) to achieve a 'full' condition. . This result may be that some data communication returns to the sender and accumulates at an intermediate network location until significant further processing is performed to prevent this. Improved availability due to the solutions described above helps to solve this problem, but further improvements can be achieved.
A further embodiment of the present invention is a method of performing recovery from a storage failure affecting a data store, wherein the data update applied to the store in normal forward processing is used in a system where the transaction is applied within a transactional unit of work. Provides computer program and recovery components. After a storage failure that affects the primary copy of the data store, the actions required to recover data items to the primary copy of the data store are identified with reference to the secondary storage, but the original actions corresponding to each identified action There is a delay until a determination is made of the status of the unit of work, at the time of failure. Thereafter, the recovery operation is appropriately performed or discarded according to the determined state of the original unit of work.
In addition, if a pair of updates to the message store correspond to a message addition and retrieval of the same message, and if a pair of updates were completed prior to the failure, the pairs of actions may be together within recovery processing without risk of leaving the store in an inconsistent state. Can be performed. In a preferred embodiment of the present invention, this add-search pair is identified when the log record is reproduced. This pair of operations may be omitted from recovery processing (ie, considered to have been performed as a pair because their effects on the queue erase each other) or this pair of operations may be performed and completed outside the scope of the recovery unit of work. Each of these options prevents unnecessary processing and reduces the possible accumulation of messages.
A preferred embodiment of the present invention enables recovery from a primary storage failure in a shared queue messaging system, including recovery of old messages (messages prior to queue failure) to a shared queue from backup copies of the queue and log records. do. The shared queue can be used by one or more application programs to process new messages (messages sent to the queue after a failure) while old message store updates are being retrieved from the log records. This message recovery can also be performed by treating the entire recovery processing as a single unit of work to provide guaranteed one-time message delivery.
By allowing a message to be added to and retrieved from the queue during recovery of the message to the queue, the present invention can achieve improved availability of messaging functionality after a storage failure.
Another aspect of the invention provides a data communication system, the data communication system comprising: data storage for storing a primary copy of a data store; Secondary data storage for storing a secondary copy of data representing a data store having sufficient secondary data to regenerate a primary copy of said data store and data held therein; A recovery component for controlling the operation of the data communication system to recover from storage failures affecting the primary copy of the data store, wherein the recovery component is operative to control the data communication system, thereby copying the secondary data copy. Regenerating a primary copy of the data store from and recovering a data item to the primary copy using a recovery process, wherein the recovery step is performed within a recovery unit of work and within the recovery unit of work. The data item recovered in the primary copy is inaccessible to processes other than the recovery process prior to completion of the recovery unit of work; Prior to completion of the recovery unit of work, a primary copy of the data store to enable addition of data items independently to the recovery step and to allow components other than the recovery component to add the independently added data items. Configuring a; And in response to successful completion of the recovery step, completing the recovery unit of work such as releasing the inaccessibility of the recovered data.
The method and recovery component described above may be implemented within a computer program for controlling the performance of a data processing apparatus that the program code executes. The program code may be made commercially available as a program product containing the program code recorded on the recording medium, or may be made available for download via a network such as the Internet.
1 illustrates a message communication network in which messages are transmitted between queues via a target application program.
2 is a representation of a series of queue managers with shared access to queues in a combined facility list structure.
3 shows a series of steps in a recovery method according to an embodiment of the invention.
4 illustrates a series of steps of a recovery unit of work in accordance with an embodiment of the present invention.
A first embodiment of the present invention describes an asynchronous message communication system queued in a message store between the steps of a sender program sending a message and a searcher program retrieving a message. Failure of primary storage can cause loss or corruption of message data if recovery characteristics are not available to recreate the queue and recover messages onto the queue. Although available for other data repositories, the present invention includes the usual individual independent items (messages) where such a queue is added and then deleted, instead of the message being added and its contents updated and finally deleted. This is especially useful for message queues.
As will be apparent to one of ordinary skill in the art, some embodiments of the present invention may cause a failure to cause loss or corruption of data within a database table, thus requiring the regeneration of the database table and the recovery of the data item to the table. It is equally available in a database environment. Embodiments of the present invention are also used in other data processing environments where hardware or software failures require, for example, recovery from backup storage and log records and minimize the loss of availability of data while recovery processing is performed. It is possible.
Loss or corruption of data on the primary storage medium can be due to hardware failure or failure, software failure, or even human error (such as deletion due to errors in queues and all messages). For ease of reference, all these different types of failures affecting the data store may be referred to as 'storage failures' below. This loss or damage can affect only a single queue, or a database table or file, or this failure can affect one or more queues (or tables, etc.), such as multiple queues maintained within a single join facility list structure. (See the description of the CF list structure below). Normally, this can affect all queues for CF list structures other than a single queue.
The IBM MQSeries ™ and WebSphere ™ MQ family of messaging products are examples of known products that use message queuing to support the interaction between application programs that can run on different systems in a distributed heterogeneous environment.
Message queuing and commercially available message queuing products can be found in B. Blakeley, H. Harris, and R. Lewis, "Messaging and Queuing Using the MQI," McGraw-Hill, 1994, and IBM's publication "An Introduction to Messaging and Queuing" ( IBM document number GC33-0805-00) and the "MQSeries-Message Queue Interface Technical Reference" (IBM document number SC33-0850-01). The network with which the computer communicates using message queuing can be the Internet, an intranet, or any computer network. MQSeries and WebSphere are trademarks of IBM Corporation.
As is known in transaction processing systems, a 'unit of work' is a series of processing operations that must all be backed up so that data integrity is not compromised if they are successfully performed together or cannot complete a complete set of operations. All operations within a unit of work become inaccessible from other processes that may depend on the update until the solution of the entire unit of work allows all updates to be completed (all finished and accessible).
IBM's MQSeries and WebSphere MQ messaging products support transactional messaging, providing within a logical unit of work according to a messaging protocol that provides guaranteed one-time delivery of messages even in the event of a system or communication failure. This guaranteed delivery is achieved by not finally deleting the message from the storage on the sender system until the message has been confirmed as securely stored by the recipient system and by the use of sophisticated recovery facilities. Prior to the completion of the transmission of the message upon confirmation of successful storage, both the deletion of the message from the storage on the sender system and the insertion into the storage on the receiver system are both incomplete ('in-flight' or 'in doubt' ( in-doubt) and can be automatically backed up in the event of a failure.The message transfer protocol and associated transaction concepts and recovery facilities are described in WO 95/10805 and US Pat. No. 5,465,328. It is explained.
The program-to-program communication facility of IBM's MQSeries and WebSphere MQ products allows each application program to send messages to any other target application program's input queue, and each target application can process these messages from its input queue for processing. Can be taken asynchronously. This achieves the transfer of messages between application programs that can be spread across distributed heterogeneous computer networks without requiring dedicated logical end-to-end connections between application programs.
The latest version of IBM's MQSeries for OS / 390 queue manager software provides support for shared queues using the OS / 390 Coupling Facility (CF) as primary storage for shared queues. Messages for shared queues are stored as list entries in the CF list structure. Applications running on multiple queue managers in the same queue-sharing group anywhere in a parallel sysplex can then access these shared queue messages so that the messages are accessed in the order of the primary keys assigned. From the point of view of the binding facility, the assignment of the primary key is determined at random and is associated with each message by the queue manager. Because the queue manager sets the key for each message, the entire order is the correct order for the search (as described below, for FIFO ordering).
Shared access to this particular queue is highly available through automatic workload balancing and redundancy (allowing for failures affecting one or more queue managers within a group) because the message is retrieved by the next available application. Has the advantage. This provides a fairly scalable architecture for high message throughput.
The present invention is advantageous because it is available for the system architecture described above and thus many applications operate in an environment requiring high availability, but embodiments of the present invention are also available when other storage structures are used. The term message store is used hereinafter to mean a message queue and other data structure in which messages can be maintained, whether implemented in a CF list structure, database table, or other known structure.
As discussed above, in the OS / 390 operating system environment the message queuing system provides support for shared queues that can be made available to a queue-sharing group of queue managers through a CF list structure. System components, data structures, and methods available for such systems, including a number of recovery features suitable for use within such a system, are described in the specification of co-pending and co-transferred patent applications, each of which is described below. Included here by reference:
U.S. Patent Application No. 09/605589 (corresponding to UK Patent Application No. 0009989.5-Representative Clearance No. GB920000031),
U.S. Patent Application No. 09/912279 (Agent No. GB920000032),
US Patent Application No. 10/228615 (corresponding to UK Patent Application No. 0207969.7-Representative Clearance No. GB920010101-),
U.S. Patent Application No. 10/228636 (corresponding to UK Patent Application No.0207967.1-Representative Clearance No. GB920020001),
US patent application Ser. No. 10/256093 (corresponding to British patent application Ser. No. 0208143.8—Agent No. GB920020015).
Embodiments of the invention described below are compatible with the recovery features described in the references listed and included above.
Methods and apparatus for implementing a message queue within a list structure and processing the list structure, as well as solutions for distinguishing between operating states using unique keys, are described in the specification of a pending and jointly assigned patent application described below: US Patent Application No. 09 / 677,339 (Representative Application No. POU920000043), entitled "Method and Apparatus for Processing a List Structure", filed Oct. 2, 2000; And US Patent Application No. 09 / 677,341 filed on October 2, 2000 (Method and Apparatus for Implementing a Shared Message Queue Using a List Structure).
1 schematically illustrates a messaging network 10 in which messages are transmitted between queues 20 under the control of a queue manager program 30 in a distributed computer network 80. The sender application program 40 places the messages in their local queues, the target application program 50 retrieves the messages from their input queues, and sends all messages across the network to the input queues of the target application program. Is handled by queue manager 30 without loss of persistent messages. Each queue manager maintains a backup copy 60 of its local queue and writes a log record 70 to reflect updates whenever messages are added or deleted or their status changes.
2 shows a group of queue managers 30 with shared access to queues 100 maintained in a coalescing facility (CF) list structure 110. The CF list structure is used to queue messages in both directions to and from the queue sharing group. In addition to the primary copy of the shared queue, a secondary backup copy 60 is maintained on disk 120. Backup copies of queues are stored periodically on disk, including queue definition information and information about all messages held in the queue at the time of backup. The log record 70 is written to disk 120 for each update to the queue in the CF list structure. The combination of the backup copy and the log record, which reflects all updates since the last backup, enables the regeneration of the primary copy of the queue in response to media failure.
The log record includes an indication of the operation performed (insert, delete or update status) and the unique key for the associated message in which the key is generated when the message is added to the CF. In the insert operation (and in some implementations in the update operation), the log record also contains the complete content of the message. The log record for the delete operation does not include the contents of the database record. In some implementations, only the information needed to track the change is logged for the update operation.
Some computer systems and applications may allow for "out of sequence" updates to the data store. In other words, this system will work correctly even if the update order in the store does not accurately reflect the order in which the updates were added. This applies to some systems and applications that use the Message Queue Manager to transfer messages to and from queues when handling message transfer between application programs.
The inventors of the present invention have recognized that such systems and applications may benefit from improved availability by allowing new messages to be added to the queue and retrieved from the queue prior to the completion of recovery of data on the queue after failure. However, before this can be achieved, a number of problems must be overcome.
If an application can access a newly created queue in parallel with the old message recovered to the queue by replaying the log record, there is a risk that the same message can be processed twice by the application. For example, a message may be added to a queue, and after the add operation is completed, the message may be retrieved from the queue. In most cases, this message is deleted from the queue when the search operation is complete. If a queue storage failure has since occurred, this queue can be reapplied from the log record after it has been regenerated from backup storage. During log replay, messages are restored to the queue and made available to the searcher application when the completion of the add operation is replayed, and then disappears when the message retrieval action is replayed. However, if the application program can access the queue during recovery, the application program can retrieve the message as soon as it becomes available (that is, before replaying the message search log record) and process previously processed messages. Can be.
Other examples of such sequences of events may cause unacceptable deviations from guaranteed one-time message delivery.
The solution to this problem is described below, which can be recovered from primary storage failure by restoring messages to the shared queue while the shared queue is in use by the application processing the new message without deviating from guaranteed one-time message delivery. have. In this document, a new message is the first message added to a queue after a failure. Old messages are messages that have been added to the queue before the failure and restored to the queue after the failure.
Recovery processing within a recovery unit of work
In this embodiment, the recovery process is performed as a recovery unit of work. In other words, a sequence of recovering messages to the queue, updating message status on the queue from backup storage, and replaying logs is performed to complete within a newly defined unit of work.
For example, replaying, or synchronizing, out-of-syncpoint message 'Put' actions (adding messages to a queue) or 'Get' actions (retrieving messages from queues). Regeneration of the completion of an in-syncpoint put or get is performed as a put and a get within a sync point within a recovery unit of work. The recovery unit of work covers the entire process of replaying the actions of restoring messages to a queue and changing the state of those messages.
A unit of work is a series of operations that must be performed together (or not together at all) if the data affected by the series of operations must be left in a consistent state at the end of the series of operations. The sync point is an identifiable point in the processing where the data is in a consistent state, and the sync point is recorded at the end of each unit of work to record this consistency point. The reference to the recorded sync point allows a determination to be made how far in time until rollback processing to return to the point of data homeostasis. A single transaction may include multiple put message and get message actions that are processed as a single unit of work. When the transaction completes, all put and get operations within the unit of work are completed so that the message put on the queue appears as a searchable message on the queue and the message on which the get operation was performed is finally deleted. However, in some transaction systems, certain put and get messages can take immediate effect without waiting for the final resolution of the transaction, so they are called "out of sync point" put and get operations.
As mentioned above, failures can affect a single rule or multiple queues (eg all queues within a particular CF list structure). If multiple queues are to be recovered, it is desirable that a single invocation of the recovery process initiate recovery of all affected queues. Improved processing efficiency can be achieved by recreating a series of affected queues and then performing a message update on the entire set of affected queues and a single unit of work that involves the recovery of messages.
This recovery process accesses and uses the log or logs containing information related to changes to the recovered queue or queues. In a shared queue environment, each queue manager can maintain its own physically separate log, and each log can contain a series of files. The recovery process can read all the logs in parallel to form a logically single, merged log. A single merged log (which usually does not exist as a single physical file) contains all changes to the queue or queues being recovered, as well as changes to other queues that are not affected by the failure. The recovery process ignores changes to queues that are not currently required for recovery processing.
The specific order of recovery processing operations is described in more detail below with reference to FIG. 3. For ease of reference, the following description of recovery processing shows an example of recovering a single queue.
The first step 200 of this method is identification of storage failures. In many cases, software using a data store may be managed by hardware or operating systems (which may be inaccessible for example) or by other runtime environments, such as the Java virtual machine (which may return an error indication if an access is attempted). It can be recognized that it is lost or damaged. In a preferred embodiment, the software using the data store automatically initiates recovery processing (200) when the software becomes aware of the problem. In particular, a queue manager program using a failed queue or queues responds to a specific set of error conditions by initiating a recovery process that is a component of the queue manager.
In another embodiment, the software may be written to provide appropriate error notification in response to human intervention of failing-prompting manually initiating recovery processing. In addition, the operation of the operator may normally be necessary to initiate recovery if the storage failure is due to accidental or malicious data deletion.
If initiated in response to the identification of the failure, the recovery process accesses secondary storage to retrieve a backup copy of the queue definition corresponding to the failed queue (s) (210) and uses the retrieved definition in the primary storage. Recreates an empty copy of the queue (210).
In a preferred embodiment, the definition of the queue (or other data store) is maintained in backup secondary storage separately from the contents of the queue. The backup of the queue definition as a step independent from the backup of the snapshot of the queue content is advantageous because it facilitates the reproduction of the queue in an empty state as a separate step before the content is recovered. This queue can be made available for the receipt of new messages as soon as it is played from primary queue definition in primary storage.
In a conventional recovery solution, a lock is obtained on the newly regenerated data store from when the store is regenerated until the recovery processing is completed, and the lock is recognized to be necessary to prevent duplication of messages. Such a lock is not required in the present invention, so the data store (ie, no queue or database table, but no update within the recovery unit of work) becomes available to the application as soon as the data store is regenerated.
After recreating the queue (in an empty state), a recovery unit of work for restoring the message and messages to the mu is then initiated 230. In addition to the queue definitions required for the regeneration of the queue in its empty state, the secondary storage contains a backup copy of the queue contents corresponding to a snapshot of the messages on the queue when the backup was taken. The messages in the backup copy are recovered (240) to the primary copy of the associated queue using a copy operation with the step of displaying each message to indicate that they are part of an incomplete recovery unit of work. This indication may otherwise make the application accessible to retrieved messages from the queue.
In a preferred embodiment, the presentation of the message is implemented by assigning a unit of work ID and a unique primary key for each message, with the value of the one-byte key indicating the status of the message. The queue manager can then interpret the byte value of the primary key to determine whether the message is retrieved by the application program. Any message update within an incomplete recovery unit of work cannot be accessed by the application at this stage (until the byte value changes at the completion of the recovery unit of work). This is described in more detail below under the name 'unique key'. The unit of work ID is useful when recovery processing is interrupted (such as when the queue manager has partially failed through recovery processing) because it allows easy deletion of all operations performed within the recovery unit of work. MQSeries queue manager programs on IBM are known to have peer recovery capability that allows them to take on queue recovery processing in such environments.
As recovery processing proceeds, the restoring queue manager also generates a list of all messages for which operations are performed within the recovery unit of work. This list is used later during completion processing.
Log records written between the time of the backup copy and the time of the storage failure are then reproduced (250) to provide information about all updates to the lost queue as a result of the failure. Each log record corresponds to a message addition operation (such as a foot message operation), a message deletion operation (such as a destructive get message operation), or a status update (such as completion or backout). As each log record is replayed, this queue is updated by the corresponding action, and the message is updated with the byte value within the byte value in the in-recovery range as described above with the unit of work ID of the recovery unit of work. This is indicated by assigning a primary key to contain. This continues up to the point of the corresponding log record in case of failure.
When recovery processing reaches a point in the log record corresponding to the point of storage failure, the message store is added to the recovery process independently and restored to the state of the point of failure for the retrieved message.
At this point, recovery processing is completed by completing a recovery unit of work (260). The sync point is taken to record the consistent state of the queue data so that all messages are available to the application. In particular, the completion of the unit of work involves identifying all relevant updates by referring to the list of messages that are added, deleted or updated during the performance of the recovery operation for the recovery unit of work, for each message in the list, the bytes in the unique primary key Indicating the value to a value indicating a new state of the message. Changing the higher byte value moves the completed message to a new position in the queue because this key value not only indicates the desired message retrieval order but also the message state.
If the old message is recovered and the message update phase for the queue has failed, the individual performed regeneration of the queue should allow for continued use of the queue for new messages while the recovery phase of the recovery processing is retried. Thus, the sequence of operations to perform the first regeneration phase and later reapply the update by reference to the log record may not only make the queue available for new messages in the early stages, but also any affecting recovery processing. It prevents queue regeneration and new message processing from problems. The combination of these features not only provides a significant improvement in the availability of the messaging function, but can also prevent the exceptional processing required in response to the full fill condition of the queue.
From this point, assuming that recovery was successful, normal message processing operations can continue for all messages on the queue. When using a recovered queue, when the queue manager checks the status indication byte value of the queue, it can determine whether a new state of the message can be retrieved.
The get operation in sync point within the recovery unit of work is different from the conventional application get operation in that the new get operation specifies which message the operation should retrieve in order to reproduce the operation from the log in the correct order. Conventional get operations typically retrieve the first available message, but since different messages can be retrieved by the get operation during recovery processing than those retrieved by the original get operation, this approach is a queue of failure points during recovery processing. Can cause inconsistencies between the queue and the recovered queue. Thus, some applications do not themselves require messages to be processed in the same order in which they were placed on the queue, but nevertheless, message updates reproduced from log records are consistent with the order of actions performed prior to failure. Is applied in a way that ensures.
Techniques suitable for defining a particular message that should be retrieved by a get message action are already known in the art and thus are not described in detail herein. In one implementation, the get message operation uses a unique key (unique for all messages in the complex) that is assigned to each message when the message is added to the shared queue.
Delay of recovery operation
In an embodiment of the present invention, recovery does not immediately replay get and put operations within sync points when processing the log. Instead, as shown in FIG. 4, the get and put operations are cached 251 until the replay of the log allows the determination of the state of the corresponding unit of work to be made 252. This log identifies the operation for the message queue or queues that have been replayed and recovered. The identified log records are copied to the cache. When recovery processing reaches a point in the log record corresponding to the point of failure, the cached log record is analyzed to determine the state at the point of failure of each corresponding (original) unit of work (252).
When decision 252 is performed, one of the following actions is taken:
1. When the unit of work is completed, the put or get is performed (as described above) as part of the recovery processing (256);
2. If the unit of work remains suspect at the end of the recovery unit of work, recovery processing performs a put or get but additionally suspects this behavior and coordinates the sync point manager to the original as required for the final solution of the unit of work. Mark 257 as part of a unit of work;
3. For all remaining cases (assuming backout, abort, or abort), cached get and put operations are discarded (255).
Thereafter, as described above, the recovery unit of work is completed.
The recovery processing method described above allows the recovery process to be executed in parallel with the use of the newly regenerated queue without sacrificing guaranteed one-time message delivery.
Optimization Processing of Paired Updates
The inventors of the present invention have recognized that replay in sync point of a get operation completed in a recovery unit of work requires moving a message foot to a queue within the same recovery unit of work. This replay may include replay of completion during the original unit of work after replay of the get message action. Certain messages may be deleted in response to a completed get message action without waiting for the completion of the recovery unit of work at the end of the recovery process. In this embodiment, the put and get pairs within the recovery unit of work are identified (253) and the corresponding cached log records are deleted from the cache without having to delete the update after updating the queue (254). This feature of the present embodiment compensates for the "cache-until-resolution" feature described above so that queue managers that prevent and recover from unnecessary processing can reduce the accumulation of messages on the queue. Prevent unnecessary cues and 'full fill' conditions in storage.
It is known to distinguish between messages in a combined facility (CF) that are in different states using a unique primary key within the existing queue manager's shared key support mechanism. Typically, this condition is completed, in the process of adjusting and in doubt. The use of such unique keys to distinguish states is described, for example, in the specifications of commonly assigned and co-pending US Patent Application Nos. 09 / 677,339 and 09 / 677,341, which are incorporated herein by reference.
This embodiment uses a unique primary key value for the message being reconciled within the recovery unit of work. 'In-flight' is the state of a transaction before the request is completed or backed out (or before preparing to execute the command in the case of two-phase completion). If there is a failure while the transaction is being reconciled, the message status is determined to be backout. This is known as the "presumeabort" approach. 'In-doubt' applies to the completion of phase 2 of a transaction involving an external transaction coordinator. The coordinator issues a 'preliminary' request for a transaction to each resource manager of interest. After completion of the preliminary phase, the transaction is no longer being reconciled and is now called 'in doubt'. Resolution from doubt to completion or abort is performed in response to subsequent calls from the transaction coordinator. Log records may or may not be written for get and put operations performed by transactions during coordination.
Uniqueness of the primary key is achieved using a unique range of values for one byte in the primary key. For example, the first byte of the primary key of a message on a put list (i.e., a list representing messages put to the queue) may have a value in the range X'00 'to X'09' when this message is completed. And a value in the range X'F4 'to X'F6' if the message is not complete. Status assignment of values The specific assignment of byte values within a value achieves FIFO ordering according to the order of the values within this range. Other ways of assigning unique keys are equally possible.
When an application program issues a get message call, the key key value of the message in the queue is examined and compared to the list of key ranges to determine the status of the message. The state of a message, as reflected by the primary key value, determines whether the application can retrieve this message, but also because this key value determines the sorting of messages in the queue, messages that are not retrievable cannot be It has a key value corresponding to the latter stage. This means that whenever a searchable message becomes available in the queue, a simple numeric sort avoids the unsearchable message.
Using unique keys in this way allows the queue manager to selectively access messages in a particular state, and allows simple implementation of other functions such as triggers based on the number of messages completed in the queue. By placing special values in bytes of higher order keys, messages that have been added (put) but not yet completed are placed at the end of the list, ignoring them if the queue manager performs a get message operation on behalf of the application. It is easy to do.
The unique higher order byte value may be used to distinguish between message states of a number of different states after invocation of a put message operation. For example, a first range of byte values may indicate a message in which the put is performed with the first preliminary stage of completion of phase 2 but the put is not yet completed, while a value in the second range may indicate that completion of the preliminary phase is put on. Later it has not been completed.
Two new operational states are defined in the present invention with a corresponding unique key for each operation and message, each one byte key containing a unique value within the range of values identifying the state. The new state is only available for messages placed in the message store (in this case the CF shared queue) as part of the recovery process. One state (UoW being reproduced) corresponds to that which is incomplete in the original unit of work and the recovery unit of work, and the second state corresponds to what is completed in the original unit of work but not yet complete in the recovery unit of work.
These new message states and unique key values provide the following benefits:
The put operation in sync point can be reproduced by storing a message on the CF using a unique key. This unique key prevents the message from being processed by other processes performing operations on the queue, and above all, prevents it from being included in the queue depth calculation. This means that the recovery process does not need to cache these put operations in memory, significantly reducing the code complexity and storage footprint of the recovery process.
The completion of the foot operation within the sync point and the completion of the foot operation outside the sync point can be reproduced by setting a key value that is distinct from the activity outside the sync point. This is accomplished by updating the primary key value (the value from the first range to the value from the second range corresponding to the different state, without the completion of the recovery unit of work requiring the in-memory or CF management structure model of the recovery unit of work). Can be performed). Such a structure is required in other conventional embodiments.
In view of the present disclosure, it will be apparent to those skilled in the art that various modifications to the specific embodiments described above can achieve the advantages of the present invention and are within the scope of the present invention as set forth in the accompanying description.
For example, the above description of the preferred embodiment shows regenerating a data store and restoring data to this store. It will be apparent to those skilled in the art that some solutions within the scope of the present invention include recovering all data that was in storage in the event of a failure. Other solutions, such as restoring only persistent messages and distributing non-persistent messages, require the recovery of a particular class of data. In the latter, log records may not be written for non-persistent messages such as information-only data broadcasts. For example, messages that include weather forecasts or stock prices that are periodically updated may not need to be recovered if the next update becomes available soon, while messages indicative of flight reservation cancellation or inventory sales are guaranteed. It must be recoverable to enable one-time delivery.
Second, while the above description can be achieved by recovering data items into multiple queues within the scope of a single recovery unit of work, another implementation may recover each queue within its own separate unit of work. Can be. This may reduce the impact of certain types of failures during recovery processing.
Third, the above description shows a specific method of displaying a message that makes it unavailable for retrieval by an application program until completion of a recovery unit of work. Other mechanisms are also possible to control the availability of recovered messages while preventing the lock of the store during the entire recovery period. One such example is setting the unit of work identifier and setting the suspect flag for each recovery message that is separate from the unique primary key.
The foregoing description of the preferred embodiment of the present invention uses the definition of the queue and the independently stored backup copy of the contents of the queue. Another embodiment maintains both data storage and information defining data content at the time of backup as a single secondary copy. Nevertheless, recovery processing retrieves stored data from secondary (backup) storage, makes it available for new data items, and then recovers the contents of the repository into a separate step that enables fast regeneration of the repository. Can be processed in order.
Another embodiment of the invention is available for a database solution. In a database table, new rows can be inserted into the table and old rows (rows filled with data before failure) can be processed before recovery. During recovery, an application may refer to a table containing only new rows until the time such as recovery is complete.
The above description of the preferred embodiment discloses a recovery method and apparatus comprising: (i) processing a recovery operation as a recovery unit of work after rebuilding to a data store in an empty state for fast availability; (ii) performing a recovery operation depending on the determined state of the corresponding original unit of work for efficient recovery processing; (iii) performing optimized processing of pair update for efficient processing and to prevent accumulation in the data store; And (iv) indicating a specific in-recovery state of the data item and an update to the data item using a unique primary key. The properties (i) to (iv) are complementary, but as will be apparent to one of ordinary skill in the art, for the operation of any one of these properties (i) to (iv), all properties (i) to (iv) must necessarily It does not have to be implemented together.
A method of recovering a data store from failures affecting a primary copy of the data store,
Maintaining a secondary copy of the data sufficient to recover the primary copy of the data store and the data item maintained thereon;
Responsive to a failure affecting the primary copy of the data store, regenerating the primary copy of the data store from the secondary copy; And
Recovering data items from the secondary copy to the primary copy within a recovery unit of work using a recovery process, wherein the data items recovered to the primary copy of the data store within the recovery unit of work Recovering the data item such that it becomes inaccessible to processes other than the repair process until completion of the unit;
Prior to completion of the recovery unit of work, enabling the addition of data items to the data store independently of the recovery step and allowing processes other than the recovery process to retrieve the independently added data items. Configuring a primary copy of the repository; And
In response to successful completion of the recovery step, completing the recovery unit of work comprising releasing the inaccessibility of the recovered data.
Datastore recovery method comprising a.
Maintaining the secondary data copy includes storing a backup copy of the data store and storing a log record indicating an update to the primary copy that has been performed since the backup copy was stored;
Regenerating the primary copy of the data store comprises copying a data store definition from the backup copy and regenerating the definition by applying the primary copy,
Restoring a data item to the primary copy includes copying the data item from the backup copy and reproducing the log record to identify and reapply updates to the primary copy. Way.
Maintaining the secondary data copy comprises storing a log record indicating an update to the primary copy, wherein recovering the primary copy of the storage includes:
Replaying a log record of actions performed on data items in the primary copy of the data store;
Caching log records of operations performed under syncpoint control within the original unit of work;
Determining from the cached log record the state of the original unit of work at the point of failure; And
Determining which of the sync point controlled syncs are to be performed in the recovery unit of work based on the determined state of the original unit of work.
If the original work unit is completed before the failure, performing a related operation of the completed work unit;
If the original unit of work is in-doubt when the failure occurs, performing an associated operation of the suspected unit of work but marking the operation as suspect; And
According to the procedure of discarding the cached operation, if the original unit of work is neither completed nor suspected,
And performing an operation within the recovery unit of work.
The add and delete operations may be performed to perform any pair of add and delete operations, including adding data items to the primary copy of the data store and deleting the data items from the primary copy of the data store. Discarding from the recovery unit of work under conditions of prior completion.
The data store is a message store,
Restoring data to the primary copy of the data store comprises performing message addition, update, and delete operations in the message store.
For the performance of a messaging communication system, the maintaining of the secondary data stores a log record indicating an update to the primary copy, and restoring the data to the primary copy of the repository within the original unit of work. Caching log records relating to message addition, update, and delete operations performed under the control of sync points, determining the state of the original unit of work from the log record at the time of failure, and of the original unit of work Determining an operation to be performed in the recovery unit of work based on the determined state, wherein the operation determining step includes:
Performing an operation of adding, updating, and deleting related messages when the original unit of work is completed;
If the original unit of work is in doubt, performing an operation for adding, updating, or deleting a related message, and marking the operation as in doubt; And
If the original unit of work is not completed or in doubt, is performed according to the step of discarding the cached operation,
How to recover a data store.
Data restored to the primary copy of the repository within the recovery unit of work becomes inaccessible by setting a flag for each data item restored to the data store, and the flag indicates that the data item is not accessible. Data storage recovery method.
The flag indicates a transaction state of the data item,
Wherein the process of retrieving data items from the repository is adapted to identify one or more predefined transaction states as inaccessible.
The flag comprises a byte value of a unique primary key assigned to the data item when the data item is restored to the data store, wherein the byte value is selected from a range of values representing a transaction state of the data item , Datastore recovery method.
The flag setting step,
Setting a first flag for any data item, wherein the most recent operation performed on the data item prior to the failure for the data item should be restored to the data store within the recovery unit of work. Setting the first flag, which is a completed additional operation; And
Setting a second flag for any data item, wherein the most recent operation performed on the data item prior to the failure for the data item should be restored to the data store within the recovery unit of work. Setting the second flag, which is a suspect add or delete operation
The first flag comprises a byte value of a data item key selected from byte values in a first range indicating a first transaction state,
And wherein the second flag comprises a byte value of a data item key selected from byte values in a second range indicating a second transaction state.
In a data communication system,
Data storage for storing a primary copy of the data store;
Secondary data storage for storing a secondary copy of data indicative of said data store sufficient for secondary data to recover a primary copy of said data store and data held therein; And
A recovery component that controls the operation of the data communication system to recover from failures affecting the primary copy of the data store,
The recovery component,
Regenerating the primary copy of the data store from the secondary copy;
Recovering data items from the secondary copy to the primary copy within a recovery unit of work using a recovery process, wherein the data items restored to the primary copy of the data store within the recovery unit of work are: Restoring the data item to be inaccessible to processes other than the repair process until completion of the unit of work;
Prior to completion of the recovery unit of work, the data may be added to the data store independently of the recovery step and a process other than the recovery process may retrieve the independently added data item. Configuring a primary copy of the repository; And
Controlling the data communication system to perform a data communication system.
14. The system of claim 13, further comprising a data communication system for transmitting messages between a sender and a receiver, wherein the messages are maintained in a data store after a message transfer operation by the sender, and subsequently for delivery to the receiver. Retrieved from a data store, a backup copy of the data store is created, and a log record is written to record message transfer and message retrieval events after creation of the backup copy,
Responsive to a failure affecting the data store, wherein a backup copy refers to a backup copy of the data store created prior to the failure to restore a message to the data store;
Prior to completion of the recovery processing, configuring the data store so that new messages can be added to and retrieved from the data store without waiting for the completion of the recovery processing; And
Re-applying the update to the data store corresponding to the message transfer and message retrieval operation performed prior to the failure, with reference to the log record created prior to the failure
Is adapted to control the data communication system to perform
Restoring a message to the data store and reapplying the update to the data store with reference to the backup copy and log record is performed within a recovery unit of work, wherein the restored messages and the reapplied update are transferred prior to the failure. And all data store updates corresponding to the transmission and retrieval operations performed on the data store become inaccessible until reapplied to the data store.
Program code for performing a method of recovering the data store from failures that are recorded on a recording medium and affecting the primary copy of the data store, wherein the secondary data storage and the secondary copy are excited with the primary copy of the data store. A computer-readable recording medium having a computer program recorded thereon for use in a data processing apparatus having a component for holding a secondary copy in said secondary data storage sufficient to recover a data item retained in said method. silver,
In a failure affecting the primary copy of the data store, regenerating the primary copy of the data store from the secondary copy;
Recovering data items from the secondary copy to the primary copy within a recovery unit of work using a recovery process, wherein the data items restored to the primary copy of the data store within the recovery unit of work Restoring the data item to be inaccessible to a process other than the repair process until completion of the unit;
In response to successful completion of the recovery step, completing the recovery unit of work including releasing the inaccessibility of the recovered data
KR1020057016931A 2003-04-10 2003-10-22 Recovery from failures within data processing systems KR100983300B1 (en)
KR20060004915A KR20060004915A (en) 2006-01-16
KR100983300B1 true KR100983300B1 (en) 2010-09-20
KR1020057016931A KR100983300B1 (en) 2003-04-10 2003-10-22 Recovery from failures within data processing systems
JP5292351B2 (en) * 2010-03-30 2013-09-18 日本電信電話株式会社 Message queue management system, lock server, message queue management method, and message queue management program
JP5292350B2 (en) * 2010-03-30 2013-09-18 日本電信電話株式会社 Message queue management system, lock server, message queue management method, and message queue management program
CA2842563A1 (en) * 2011-08-03 2013-02-07 Correlsense Ltd. A method and apparatus for assembling elements of data transactions
US10509705B2 (en) * 2011-11-04 2019-12-17 Veritas Technologies Llc Application protection through a combined functionality failure manager
US10318911B1 (en) * 2013-03-14 2019-06-11 Jpmorgan Chase Bank, N.A. Persistenceless business process management system and method
CN103136370B (en) * 2013-03-21 2016-05-25 曙光信息产业(北京)有限公司 The restoration methods of metadata and device
US9858151B1 (en) 2016-10-03 2018-01-02 International Business Machines Corporation Replaying processing of a restarted application
US20190278481A1 (en) * 2018-03-06 2019-09-12 International Business Machines Corporation Synchronized safe data commit scans in multiple data storage systems
US7543181B2 (en) 2009-06-02
JP3538766B2 (en) 2004-06-14 Apparatus and method for creating a copy of a data file