JP6530337B2 - Transaction control system and transaction control method - Google Patents
Transaction control system and transaction control method Download PDFInfo
- Publication number
- JP6530337B2 JP6530337B2 JP2016052863A JP2016052863A JP6530337B2 JP 6530337 B2 JP6530337 B2 JP 6530337B2 JP 2016052863 A JP2016052863 A JP 2016052863A JP 2016052863 A JP2016052863 A JP 2016052863A JP 6530337 B2 JP6530337 B2 JP 6530337B2
- Authority
- JP
- Japan
- Prior art keywords
- message
- held
- serial number
- transaction
- transaction control
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Description
本発明は、トランザクション制御システムおよびトランザクション制御方法に関するものであり、具体的には、データベースとメッセージキューのステータスに不整合が生じる状況に対応し、効率的かつ的確な障害回復処理を可能とする技術に関する。 The present invention relates to a transaction control system and a transaction control method, and more particularly, to a technology that enables efficient and appropriate failure recovery processing in response to a situation in which the status of a database and a message queue is inconsistent. About.
証券の決済機関システムと、これに接続する証券会社/取引所のシステムとの間におい
て、チャネルの接続制御や電文の変換・中継といった処理を担うゲートウェイが存在する。 このゲートウェイは、上述の決済機関システム及び業務システムとの間で授受する電文をメッセージキューにより適宜に管理する。また、制御に必要な情報はデータベースに保持している。
A gateway is in charge of processing such as channel connection control and telegram conversion / relay between a securities settlement system and a securities company / exchange system connected thereto. This gateway appropriately manages messages sent and received between the above-mentioned settlement system system and business system using a message queue. Also, information necessary for control is held in a database.
こうしたメッセージキューイングに関連する従来技術としては、例えば、所定の業務を実行する業務システムであって、前記業務の実行を要求する要求情報であるメッセージを一時的に記憶するキューを複数のサーバが共用するクラスタ構成の業務システムにおいて、前記メッセージを入力するプログラムと、前記メッセージを管理するプログラムと、前記メッセージに従い業務を実行するプログラムとを保持する手段と、前記複数のサーバのうち特定のサーバに障害が発生したことを検知する手段と、前記障害が発生した特定のサーバが管理していた前記メッセージを前記複数のサーバのうち障害が発生していない特定のサーバが引き継ぐ手段とを有することを特徴とするクラスタ構成の業務システム(特許文献1参照)などが提案されている。 The prior art related to such message queuing is, for example, a business system that executes a predetermined business, and a plurality of servers execute a queue that temporarily stores a message, which is request information requesting the execution of the business. In a business system of shared cluster configuration, means for holding a program for inputting the message, a program for managing the message, a program for executing the business according to the message, and a specific server among the plurality of servers Having means for detecting that a failure has occurred, and means for taking over, among the plurality of servers, a specific server having no failure that manages the message managed by the specific server where the failure has occurred. A business system (see Patent Document 1) and the like having a cluster configuration as a feature is proposed. That.
また、同じ名称の複数のキューからメッセージの取得を行う複数のノードを備えたクラスタ構成のメッセージキューイングシステムにおける障害時のキュー制御方法であって、障害ノードのキューと同じ名称のキューを持つノードが引継ぎノードとして前記障害ノードのメッセージ処理を引継ぎ、前記障害ノードが持つキューのメッセージを前記引継ぎノードが持つキューのメッセージと合わせて前記引継ぎノードの管理下に置く他ノードキュー情報取得制御ステップと、前記引継ぎノードのユーザアプリケーションからメッセージの取得要求があったとき、前記引継ぎノードの管理下にあるメッセージの中から取得したメッセージを前記ユーザアプリケーションに渡すメッセージ取得制御ステップとを備えることを特徴とする障害時におけるキュー制御方法(特許文献2参照)なども提案されている。 A queue control method in the event of a failure in a clustered message queuing system including a plurality of nodes acquiring messages from a plurality of queues having the same name, the node having a queue having the same name as the queue of the faulty node. An other node queue information acquisition control step of taking over the message processing of the failed node as a takeover node and putting the message of the queue possessed by the failed node with the message of the queue possessed by the takeover node under control of the takeover node; A message acquisition control step of passing a message acquired from among messages under the management of the takeover node to the user application when there is a message acquisition request from the user application of the takeover node Sometimes Such as queue control method (refer to Patent Document 2) has been proposed.
上述したゲートウェイにおいて、トランザクションの管理対象はメッセージキューおよびデータベースとなる。こうした構成においてシステム障害が発生した場合、データベースとメッセージキューの2つのトランザクションの間で整合性を保った回復処理を行う必要がある。 In the above-described gateway, transaction management targets are a message queue and a database. In the case of a system failure in such a configuration, it is necessary to carry out a recovery process that maintains consistency between the two transactions of the database and the message queue.
ところが、或るトランザクションに関して、例えば、データベースではコミットに成功し、メッセージキューではコミットに失敗した、という状況が生じた場合、問題が生じる
。
However, for certain transactions, for example, problems occur when a situation occurs where commit is successful in the database and commit fails in the message queue.
この場合、当該トランザクションに関し、データベースにおいては電文中継に成功したステータスを保持することになる。一方、メッセージキューでは、当該トランザクションに関して、コミット失敗に伴いロールバックして電文中継前のステータスに戻ることになる。 In this case, regarding the transaction, the database holds the status of successful message relay. On the other hand, in the message queue, with respect to the transaction, it rolls back in response to a commit failure and returns to the status before message relay.
そのため、データベースとメッセージキューのステータスに不整合が生じる。またこの時、データベースはコミットされているため、データベースの機能を使用して自動的にロールバックすることはできない。 As a result, the statuses of the database and the message queue become inconsistent. Also, at this time, since the database is committed, it can not be rolled back automatically using the features of the database.
そこで本発明の目的は、データベースとメッセージキューのステータスに不整合が生じる状況に対応し、効率的かつ的確な障害回復処理を可能とする技術を提供することにある。 Therefore, an object of the present invention is to provide a technology that enables efficient and accurate failure recovery processing in response to a situation in which the status of the database and the message queue is inconsistent.
上記課題を解決する本発明のトランザクション制御システムは、他装置とネットワークを介して通信する通信装置と、所定業務に関して所定装置間で授受される各電文に、当該業務で一意の通番を付与し、当該電文をメッセージキューイングによって仲介処理するに際し、当該業務のトランザクションにて送信予定の電文に対する所定処理の実行に伴い、当該業務に関して所定テーブルで管理する通番をインクリメントし、当該電文に関する情報をリカバリキューに格納する処理と、前記業務のトランザクション開始時に当該業務の電文に関して保持している情報をリカバリ情報として記憶装置に格納する処理と、本トランザクション制御システムでの障害発生に際し、前記テーブルで保持する通番と前記リカバリキューで保持する通番とを照合し、前記通番の照合の結果、前記テーブルで保持する通番が前記リカバリキューで保持する通番より大きいことが判明した場合、前記記憶装置で保持するリカバリ情報に基づいて、前記テーブルをロールバックする処理と、を実行する演算装置と、を備えることを特徴とする。 A transaction control system according to the present invention, which solves the above problems, assigns a unique serial number in the business to a communication device communicating with another device via a network and each message exchanged between the predetermined devices regarding the predetermined business, When mediation processing of the message by message queuing, along with execution of predetermined processing for the message to be sent in the transaction of the task, the serial number managed in the predetermined table regarding the task is incremented, and information on the message is recovered queue Processing for storing the information in the transaction of the task at the start of the transaction of the task in the storage device as recovery information, and the serial number held in the table when a failure occurs in this transaction control system And the serial number held in the recovery queue Combined, the result of collation of the serial number, if the serial number held in the table was found to be greater than serial number held in the recovery queue, based on the recovery information held in the storage device, to roll back the table And a processing unit that executes the processing.
また、本発明のトランザクション制御方法は、他装置とネットワークを介して通信する通信装置を備えた情報処理システムが、所定業務に関して所定装置間で授受される各電文に、当該業務で一意の通番を付与し、当該電文をメッセージキューイングによって仲介処理するに際し、当該業務のトランザクションにて送信予定の電文に対する所定処理の実行に伴い、当該業務に関して所定テーブルで管理する通番をインクリメントし、当該電文に関する情報をリカバリキューに格納する処理と、前記業務のトランザクション開始時に当該業務の電文に関して保持している情報をリカバリ情報として記憶装置に格納する処理と、本トランザクション制御システムでの障害発生に際し、前記テーブルで保持する通番と前記リカバリキューで保持する通番とを照合し、前記通番の照合の結果、前記テーブルで保持する通番が前記リカバリキューで保持する通番より大きいことが判明した場合、前記記憶装置で保持するリカバリ情報に基づいて、前記テーブルをロールバックする処理と、を実行することを特徴とする。 Further, according to the transaction control method of the present invention, an information processing system including a communication device that communicates with another device via a network can use a unique serial number in the task for each message sent and received between the predetermined devices in relation to the task. When the message is given and the message is mediated by message queuing, with the execution of the predetermined process for the message to be sent in the transaction of the task, the serial number managed in the predetermined table for the task is incremented, and the information on the message Processing in the recovery queue, processing for storing the information held regarding the message of the task at the start of the transaction of the task in the storage device as recovery information, and in the event of failure in this transaction control system, Hold the serial number and hold in the recovery queue Collates the turn, result of the matching of the serial number, if the serial number held in the table was found to be greater than serial number held in the recovery queue, based on the recovery information held in said storage device, said table And rolling back processing .
本発明によれば、データベースとメッセージキューのステータスに不整合が生じる状況に対応し、効率的かつ的確な障害回復処理が可能となる。 According to the present invention, it is possible to cope with a situation in which the statuses of the database and the message queue become inconsistent, and perform efficient and accurate failure recovery processing.
−−−ネットワーク構成−−−
以下に本発明の実施形態について図面を用いて詳細に説明する。図1は、本実施形態のトランザクション制御システム100を含むネットワーク構成図である。図1に示すトランザクション制御システム100は、データベースとメッセージキューのステータスに不整合が生じる状況に対応し、効率的かつ的確な障害回復処理を可能とするコンピュータシステムである。
--- Network configuration ---
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. FIG. 1 is a network configuration diagram including a
本実施形態のトランザクション制御システム100は、ネットワーク10を介し、業務システム200と証券決済機関システム300との間で、業務に係る電文を適宜に変換、仲介するゲートウェイである。このうち、業務システム200は、証券会社や機関投資家が、株式売買注文を行う際に用いるシステムである。また、証券決済機関システム300は、上述の証券会社や機関投資家の株式売買注文の決済処理を行うシステムである。
The
勿論、トランザクション制御システム100を適用するネットワーク構成は、本実施形態の例に限定されない。電文をメッセージキューイングで仲介するゲートウェイが含まれるネットワークで、メッセージキューとデータベースのトランザクション管理を行う構成であれば、いずれの構成でも適用出来る。
Of course, the network configuration to which the
なお、上述のように、ゲートウェイたるトランザクション制御システム100と、業務システム200および証券決済機関システム300とは、それぞれにメッセージキューイングの仕組みによって電文をやりとりする。
As described above, the
このメッセージキューイングとは、装置間で電文を交換して連携動作させる際に、送信する電文をメッセージキューにいったん保管しておき、相手側の処理の完了を待つことなく次の処理を行う方式である。つまり、このメッセージキューイングの仕組みを導入したシステムであれば、送信側の装置は相手側の装置の都合に無関係に、電文をキュー領域に格納するだけで、確実にメッセージを送り届けることができる。一時的に装置間の通信環境が途絶するとしても、電文は確実に届く。 In this message queuing, when messages are exchanged between devices and linked operation is performed, a message to be sent is temporarily stored in a message queue, and the next processing is performed without waiting for completion of processing on the other side. It is. That is, in a system in which this message queuing system is introduced, the transmitting device can reliably send a message simply by storing the message in the queue area regardless of the convenience of the other device. Even if the communication environment between devices temporarily breaks down, the message will be delivered reliably.
このため、業務システム200、当該トランザクション制御システム100、および、証券決済機関システム300のそれぞれは、受信用メッセージキューと送信用メッセージキューを各自の記憶装置にて有している。
Therefore, each of the
このうち、業務システム200が有するものは、請求経路向け送信用メッセージキュー250と通知経路向け受信用メッセージキュー251である。また、トランザクション制御システム100が有するものは、受信用メッセージキュー150と送信用メッセージキュー155である。同様に、証券決済機関システム300が有するものは、請求経路向け受信用メッセージキュー350と通知経路向け送信用メッセージキュー351である。
Among these, the
更に、トランザクション制御システム100における受信用メッセージキュー150と送信用メッセージキュー155は、それぞれ請求経路向けの受信用メッセージキュー151と送信用メッセージキュー156、通知経路向けの受信用メッセージキュー152と送信用メッセージキュー157、が存在する。
Furthermore, in the
なお、請求経路とは、業務システム200から証券決済機関システム300に宛てた決済要求に伴う電文の処理経路であり、業務システム200から送信された電文を当該トランザクション制御システム100で取得・変換し、証券決済機関システム300に向けた送信用のメッセージキューにPUTする際の一連の経路である。
The billing route is a processing route of a message accompanying a settlement request addressed to the securities
また、通知経路とは、証券決済機関システム300から業務システム200に宛てた決
済結果の通知に伴う電文の処理経路であり、証券決済機関システム300から得た電文を当該トランザクション制御システム100で取得・変換し、業務システム200に向けた送信用のメッセージキューにPUTする際の一連の経路である。
Further, the notification route is a processing route of the message accompanying the notification of the settlement result addressed to the
また、本実施形態のトランザクション制御システム100は、上述のキューの他に、各請求経路向けのリカバリキュー160、161も保持している。このリカバリキュー160、161は、通番管理テーブル126で通番をインクリメントした、当該業務のトランザクションにおける電文の情報を格納するキューである。
The
また、各送信用メッセージキューには、特に図示しないが、伝送キューが付帯しており、更にこの伝送キューを介して、証券決済機関システム300または業務システム200に送信する電文をPUTするものとする。
In addition, although not shown in the figure, transmission queues are attached to each transmission message queue, and a message to be transmitted to the securities
−−−ハードウェア構成−−−
また、トランザクション制御システム100のハードウェア構成は図2に示す如くとなる。本実施形態のトランザクション制御システム100は、SSD(Solid State Drive)やハードディスクドライブなど適宜な不揮発性記憶素子で構成される記憶装置101、RAMなど揮発性記憶素子で構成されるメモリ103、記憶装置101に保持されるプログラム102をメモリ103に読み出すなどして実行し装置自体の統括制御を行なうとともに各種判定、演算及び制御処理を行なうCPUなどの演算装置104、ネットワーク10と接続し他装置との通信処理を担う通信装置105、を備える。
--- Hardware configuration ---
The hardware configuration of the
なお、記憶装置101またはメモリ103には、本実施形態のトランザクション制御システム100として必要な機能を実装する為のプログラム102の他、処理通番管理テーブル125、通番管理テーブル126、および送信ステータス管理テーブル127が格納されたデータベース110を保持する。これらテーブルの具体的な構成については後述する。
In addition to the
また、記憶装置101ないしメモリ103における所定の記憶領域には、業務システム200および証券決済機関システム300との間でやりとりする電文を、一旦格納するためのメッセージキューが確保されている。
Further, in a predetermined storage area in the
−−−データ構造例−−−
続いて、本実施形態のトランザクション制御システム100が用いるテーブルについて説明する。図3に、本実施形態における処理通番管理テーブル125の一例を示す。
--- Data structure example ---
Subsequently, a table used by the
本実施形態の処理通番管理テーブル125は、ゲートウェイたるトランザクション制御システム100が各業務のトランザクションに関し、電文を取得・処理した履歴を管理するテーブルである。この処理通番管理テーブル125で履歴管理の対象となる電文は、トランザクション制御システム100でのフォーマット変換等の所定処理に成功したか否かに関わらず、全ての電文が対象となる。
The processing sequence number management table 125 of the present embodiment is a table for managing the history of acquisition and processing of telegrams regarding transactions of each task by the
そのデータ構造は、業務システム200から決済要求を受けた該当業務(のトランザクション)を一意に特定する業務IDをキーとして、経路種別、および処理通番といったデータから成るレコードの集合体である。
The data structure is a collection of records including data such as a route type and a process sequence number, using as a key a business ID that uniquely identifies (the transaction of) the corresponding business that has received a settlement request from the
このうち経路種別は、当該業務のトランザクションが、電文を業務システム200ないし証券決済機関システム300に向け送信する経路(すなわち送信経路)か、当該電文を業務システム200ないし証券決済機関システム300から受信する経路(すなわち受信経路)、のいずれに対応するか示す値である(図1も併せて参照)。
Among these, the route type is a route (that is, a transmission route) in which the transaction of the business task transmits a message to the
また、処理通番は、当該業務のトランザクションに関して当該電文をメッセージキューから取得(GET)した際に、トランザクション制御システム100がインクリメントする通番である。従って、トランザクション制御システム100が、メッセージキューから該当業務の電文を取得するごとに1つ値が大きくなる。
The processing sequence number is a sequence number which is incremented by the
また図4に、本実施形態の通番管理テーブル126の一例を示す。本実施形態の通番管理テーブル126は、トランザクション制御システム100が各業務のトランザクションに関して電文を取得・処理した際に、フォーマット変換等の所定処理に成功した場合の履歴を管理するテーブルである。
Further, FIG. 4 shows an example of the serial number management table 126 of the present embodiment. The serial number management table 126 of the present embodiment is a table for managing a history when a predetermined process such as format conversion succeeds when the
そのデータ構造は、上述の処理通番管理テーブル125と共通する業務IDをキーとして、経路種別、送信日付、請求経路の管理通番、および通知経路の管理通番といったデータから成るレコードの集合体である。 The data structure is a collection of records including data such as a route type, a transmission date, a management path number of a billing path, and a management path number of a notification path, using a task ID common to the processing serial number management table 125 described above as a key.
このうち、送信日付は当該業務のトランザクションにおいて、送信用のメッセージキューに、直近で当該電文を格納(PUT)した日付となる。 Among these, the transmission date is the date when the message is stored (PUT) most recently in the transmission message queue in the transaction of the business.
また、請求経路の管理通番は、業務システム200から証券決済機関システム300に宛てた決済要求に伴う電文を、当該トランザクション制御システム100で取得・変換し、証券決済機関システム300に向けた送信用のメッセージキューにPUTする一連のトランザクションでの通番である。
In addition, the management sequence number of the billing route is for transmission / transmission toward the
また、通知経路の管理通番は、証券決済機関システム300から業務システム200に宛てた決済結果の通知に伴う電文を、当該トランザクション制御システム100で取得・変換し、業務システム200に向けた送信用のメッセージキューにPUTする一連のトランザクションでの通番である。
Further, the management sequence number of the notification route is for transmission / transmission toward the
また図5に、本実施形態の送信ステータス管理テーブル127の一例を示す。本実施形態の送信ステータス管理テーブル127は、上述の通番管理テーブル126で処理の履歴を管理しているトランザクションに関して、受信用のメッセージキューから当該電文をGETした時点(仕掛中)と、当該電文を処理して送信用のメッセージキューにPUTした時点(送信済)とで、当該電文のメッセージキューでのコミット状況を管理するテーブルである。 Further, FIG. 5 shows an example of the transmission status management table 127 of this embodiment. The transmission status management table 127 of this embodiment relates to the point in time when the corresponding telegram is GET from the message queue for reception (due to work in progress) with respect to the transaction whose history of processing is managed in the above-mentioned serial number management table 126 It is a table that manages the commit status of the message in the message queue at the time of processing and PUT in the message queue for transmission (sent).
そのデータ構造は、上述の処理通番管理テーブル125および通番管理テーブル126と共通する業務IDをキーとして、経路種別、送信ステータス、およびリカバリ情報といったデータから成るレコードの集合体である。 The data structure is a collection of records including data such as path type, transmission status, and recovery information, using a task ID common to the process serial number management table 125 and the serial number management table 126 described above as a key.
このうち、送信ステータスは、上述のGET事象に応じた「仕掛中」とPUT事象に応じた「送信済」のいずれかの値となる。また、リカバリ情報は、上述のPUT処理に先立ち、当該業務のトランザクションに関して通番管理テーブル126で保持している情報を格納したものである。 Among them, the transmission status is one of “in progress” corresponding to the above-mentioned GET event and “sent” according to the PUT event. Further, the recovery information stores information held in the serial number management table 126 regarding the transaction of the business prior to the above-mentioned PUT processing.
−−−フロー例1−−−
以下、本実施形態におけるトランザクション制御方法の実際手順について図に基づき説明する。以下で説明するトランザクション制御方法に対応する各種動作は、トランザクション制御システム100がメモリ等に読み出して実行するプログラムによって実現される。そして、このプログラムは、以下に説明される各種の動作を行うためのコードから構成されている。
--- Flow example 1--
Hereinafter, the actual procedure of the transaction control method in the present embodiment will be described based on the drawings. Various operations corresponding to the transaction control method described below are realized by a program which the
図6は、本実施形態におけるトランザクション制御方法のフロー例1を示す図である。ここでは、ゲートウェイたるトランザクション制御システム100が実行する、通常の処理フローについて説明する。一方、障害発生に伴う処理についてはフロー例2で示すものとする。
FIG. 6 is a diagram showing a flow example 1 of the transaction control method in the present embodiment. Here, a normal process flow executed by the
例えば、業務システム200から決済要求の電文が、請求経路たるチャネルを介して、請求経路の受信用メッセージキュー151に格納されたとする。こうしたチャネルを介した電文の授受自体は既存のメッセージキューイング技術を適宜に採用する。この場合、トランザクション制御システム100は、当該受信用メッセージキューでの電文格納事象に伴い、当該業務システム200の決済要求業務に関するトランザクションを開始する(s100)。ここで開始するトランザクションは、受信用メッセージキュー150、送信用メッセージキュー155、およびデータベース110の更新管理に関するトランザクションである。
For example, it is assumed that the telegram of the settlement request from the
次にトランザクション制御システム100は、上述の受信用メッセージキュー151から電文をGETする(s101)。
Next, the
また、トランザクション制御システム100は、当該業務のトランザクションに関して、処理通番管理テーブル125、通番管理テーブル126、および送信ステータス管理テーブル127の各テーブルが現時点で保持する情報を抽出し、当該情報を、送信ステータス管理テーブル127の当該レコードのリカバリ情報欄に格納する(s102)。
In addition, the
続いてトランザクション制御システム100は、当該業務のトランザクションに関して、処理通番管理テーブル125の当該レコードの処理通番をインクリメントする(s103)。
Subsequently, the
またトランザクション制御システム100は、当該電文に対して、証券決済機関システム300向けの電文フォーマットに変換する処理を実行して、当該業務のトランザクションに関して、通番管理テーブル126の当該レコードの処理通番をインクリメントする(s104)。ここでは、上述の変換処理に成功する形態を想定してフローを説明するものとする。
Further, the
次にトランザクション制御システム100は、当該業務のトランザクションに関して、送信ステータス管理テーブル127の送信ステータス欄を「仕掛中」に更新する(s105)。
Next, the
また、トランザクション制御システム100は、上述のs104で通番管理テーブル126の処理通番をインクリメントした対象電文に関して、処理通番と共に業務、経路種別、といった情報を、(この場合は請求経路向けの)リカバリキュー160に格納する(106)。
In addition, the
また、トランザクション制御システム100は、当該電文を、請求経路向け送信用メッセージキュー156にPUTする(s107)。
In addition, the
トランザクション制御システム100は、上述のPUTの実行に伴い、データベース110に関するトランザクションをコミットする(s108)。また同様に、トランザクション制御システム100は、メッセージキュー150、155に関するトランザクションをコミットする(s109)。トランザクションとは、当該トランザクションの「開始」処理から「コミット/ロールバック」処理に至る間の、データベース110およびメッセ
ージキュー150、155に対する複数の操作が全て完了(「コミット」)するか、全てキャンセル(「ロールバック」)されることを保証するものである。よって、コミットとは、当該トランザクションがコミットされると、データベース110およびメッセージキュー150、155に加えられた更新内容が恒久的なものとなる。
The
上述のコミットを実行したトランザクション制御システム100は、当該業務に関して新たなトランザクションとして、送信ステータス管理テーブル127の更新業務を開始する(s110)。
The
この場合、トランザクション制御システム100は、送信ステータス管理テーブル127の当該業務に関する送信ステータス欄を「送信済」に更新する(s111)。
In this case, the
また、トランザクション制御システム100は、上述の送信ステータス欄の更新に伴い、当該トランザクションに関してコミットし(s112)、処理を終了する。
Further, the
−−−フロー例2−−−
次に、当該トランザクション制御システム100にて障害が発生した場合の対応処理について図に基づき説明する。図7は、本実施形態におけるトランザクション制御方法のフロー例2を示す図である。
--- Flow example 2--
Next, the handling process when a failure occurs in the
この場合、トランザクション制御システム100は、自身が或いは他装置が備える障害監視機能から、障害発生の通知を受けたとする(s200)。
In this case, it is assumed that the
トランザクション制御システム100は、この通知を受けた時点が、上述のフロー例1のうち、s100〜s108の間であった場合(s201:y)、メッセージキュー150、155に関してロールバック処理を実行する(s202)。また同様に、トランザクション制御システム100は、データベース110に関してロールバック処理を実行する(s203)。こうしたロールバックは、従来のロールバックと同様、当該トランザクション開始前の状態に関する情報(例:送信ステータス管理テーブル127のリカバリ情報)に基づくリストア処理となる。
The
一方、上述の通知を受けた時点が、上述のフロー例1のうち、s108〜s112の間であった場合(s201:n)、トランザクション制御システム100は、通番管理テーブル126で当該業務のトランザクションに関して保持する処理通番と、リカバリキュー160で保持する情報が示す処理通番とを照合する(s204)。
On the other hand, if the time when the above notification is received is between s108 and s112 (s201: n) in the above flow example 1 (s201: n), the
上述の照合の結果、通番管理テーブル126で保持する処理通番がリカバリキュー160で保持する処理通番より大きいことが判明した場合(s205:大)、トランザクション制御システム100は、送信ステータス管理テーブル127で当該業務のトランザクションに関して保持するリカバリ情報に基づいて、データベース110に含まれる各テーブル125〜127をロールバックし(s206)、当該フローを終了する。
If it is determined that the process sequence number held in the sequence number management table 126 is larger than the process sequence number held in the recovery queue 160 (s 205: large), the
この処理は、上述のデータベース110において当該トランザクションをコミットしたタイミング(s108)から、メッセージキュー150、155において当該トランザクションをコミット(s109)するまでの間に、当該トランザクション制御システム100(ゲートウェイ)に何らかの障害が発生した状況に対応したものとなる。
This process involves any failure in the transaction control system 100 (gateway) from the timing (s108) of committing the transaction in the
こうした状況は、障害発生に応じてメッセージキュー150、155においてロールバックが生じて当該トランザクションの開始時まで処理通番が戻されている一方、データベース110においてはロールバックが生じておらず、処理通番は最新のステータスのまま
、という状況である。つまり、データベース110とメッセージキュー150、155のステータスに不整合が生じた状況である。当該トランザクション制御システム100は、こうした状況において、データベース110に関してロールバックを実行し、そのステータスを、メッセージキュー150、155におけるステータスと一致させることとなる。
In such a situation, rollback occurs in the
一方、上述の照合の結果、通番管理テーブル126で保持する処理通番とリカバリキュー160で保持する処理通番とが一致した場合(s205:一致)、トランザクション制御システム100は、送信ステータス管理テーブル127において当該業務のトランザクションに関して保持する送信ステータスを「送信済」に更新し(s207)、当該フローを終了する。
On the other hand, if the process serial number held in the serial number management table 126 matches the process serial number held in the
この場合、上述のデータベース110およびメッセージキュー150、155の各々において当該トランザクションがコミットした後に障害が発生した状況に対応し、当該トランザクションに関する送信ステータスを更新する対応のみ実行し、ロールバック等の処理を回避可能である。
In this case, in response to the situation where a failure occurs after the transaction commits in each of the
他方、上述の照合の結果、通番管理テーブル126で保持する処理通番がリカバリキュー160で保持する処理通番より小さいことが判明した場合(s205:小)、トランザクション制御システム100は、所定のエラー通知を、システム管理者用の端末など所定装置に出力し(s208)、当該フローを終了する。
On the other hand, if it is determined that the process sequence number held in the sequence number management table 126 is smaller than the process sequence number held in the recovery queue 160 (s205: small), the
この状況は、通常の障害では起こりえない状況であるため、その旨をシステム管理者等に迅速かつ確実に通知し、ひいては、効率的かつ的確な障害回復処理を可能とする。 This situation is a situation that can not occur in a normal failure, so that the system administrator etc. can be notified promptly and surely to that effect, and in turn, efficient and appropriate failure recovery processing can be made.
以上、本発明を実施するための最良の形態などについて具体的に説明したが、本発明はこれに限定されるものではなく、その要旨を逸脱しない範囲で種々変更可能である。 As mentioned above, although the best mode etc. for carrying out the present invention were concretely explained, the present invention is not limited to this, and can be variously changed in the range which does not deviate from the gist.
こうした本実施形態によれば、データベースとメッセージキューのステータスに不整合が生じる状況に対応し、効率的かつ的確な障害回復処理が可能となる。 According to the present embodiment, it is possible to cope with the situation where the statuses of the database and the message queue become inconsistent, and perform efficient and appropriate failure recovery processing.
本明細書の記載により、少なくとも次のことが明らかにされる。すなわち、本実施形態のトランザクション制御システムにおいて、前記演算装置は、前記業務のトランザクション開始時に当該業務の電文に関して保持している情報をリカバリ情報として記憶装置に格納する処理を更に実行し、前記通番の照合の結果、前記テーブルで保持する通番が前記リカバリキューで保持する通番より大きいことが判明した場合、前記記憶装置で保持するリカバリ情報に基づいて、前記テーブルをロールバックするものであるとしてもよい。 At least the following matters will be made clear by the description of the present specification. That is, in the transaction control system of the present embodiment, the arithmetic unit further executes a process of storing the information held regarding the message of the task at the start of the transaction of the task in the storage device as recovery information, and If it is determined that the serial number held in the table is larger than the serial number held in the recovery queue as a result of the collation, the table may be rolled back based on recovery information held in the storage device. .
この場合、上述のテーブルにおいて当該トランザクションをコミットしたタイミングから、メッセージキューにおいて当該トランザクションをコミットするまでの間に、当該システム(ゲートウェイ)に何らかの障害が発生した状況に対応可能となる。こうした状況は、障害発生に応じてメッセージキューにおいてロールバックが生じて当該トランザクションの開始時まで通番等のステータスが戻されている一方、テーブルにおいてはロールバックが生じておらず通番等は最新のステータスのまま、という状況である。つまり、テーブル(を格納したデータベース)とメッセージキューのステータスに不整合が生じた状況である。当該トランザクション制御システムは、こうした状況において、テーブルに関してロールバックを実行し、そのステータスを、メッセージキューにおけるステータスと一致させることが可能となる。従って、効率的かつ的確な障害回復処理が可能となる。 In this case, it is possible to cope with a situation where some failure has occurred in the system (gateway) between the timing of committing the transaction in the above table and the commit of the transaction in the message queue. In such a situation, rollback occurs in the message queue in response to the occurrence of a failure, and status such as serial number is returned until the start of the transaction, while rollback does not occur in the table and serial number etc is the latest status. It is a situation that is as it is. In other words, there is a situation where the status of the table (the database in which it is stored) and the status of the message queue are inconsistent. The transaction control system can perform rollback on the table in such situations and make its status consistent with the status in the message queue. Therefore, efficient and accurate failure recovery processing is possible.
また、本実施形態のトランザクション制御システムにおいて、前記演算装置は、前記通番の照合の結果、前記テーブルで保持する通番と前記リカバリキューで保持する通番とが
一致した場合、前記テーブルにおいて当該トランザクションに関して保持するステータスを電文送信済に更新するものである、としてもよい。
Further, in the transaction control system according to the present embodiment, when the serial number held in the table matches the serial number held in the recovery queue as a result of the collation of the serial numbers, the arithmetic unit holds the transaction in the table with respect to the transaction. Status may be updated to have been sent a message.
この場合、上述のテーブルおよびメッセージキューの各々において当該トランザクションがコミットした後に障害が発生した状況に対応し、当該トランザクションに関する送信ステータスを更新する対応のみ実行し、ロールバック等の処理を回避可能である。ひいては、効率的かつ的確な障害回復処理が可能となる。 In this case, in response to a situation where a failure occurs after the transaction commits in each of the above-mentioned table and message queue, only the response to update the transmission status regarding the transaction can be executed, and processing such as rollback can be avoided. . As a result, efficient and accurate failure recovery processing is possible.
また、本実施形態のトランザクション制御システムにおいて、前記演算装置は、前記通番の照合の結果、前記テーブルで保持する通番が前記リカバリキューで保持する通番より小さいことが判明した場合、所定のエラー通知を所定装置に出力するものであるとしてもよい。 Further, in the transaction control system according to the present embodiment, when the arithmetic device determines that the serial number held in the table is smaller than the serial number held in the recovery queue as a result of the collation of the serial numbers, a predetermined error notification is issued. It may be output to a predetermined device.
この状況は、通常の障害では起こりえない状況であるため、その旨をシステム管理者等に迅速かつ確実に通知し、ひいては、効率的かつ的確な障害回復処理を可能とする。 This situation is a situation that can not occur in a normal failure, so that the system administrator etc. can be notified promptly and surely to that effect, and in turn, efficient and appropriate failure recovery processing can be made.
本実施形態のトランザクション制御方法において、前記情報処理システムが、前記業務のトランザクション開始時に当該業務の電文に関して保持している情報をリカバリ情報として記憶装置に格納する処理を更に実行し、前記通番の照合の結果、前記テーブルで保持する通番が前記リカバリキューで保持する通番より大きいことが判明した場合、前記記憶装置で保持するリカバリ情報に基づいて、前記テーブルをロールバックするとしてもよい。 In the transaction control method of the present embodiment, the information processing system further executes a process of storing the information held regarding the message of the task at the start of the transaction of the task in the storage device as recovery information, and collating the serial number As a result, when it is determined that the serial number held by the table is larger than the serial number held by the recovery queue, the table may be rolled back based on the recovery information held by the storage device.
本実施形態のトランザクション制御方法において、前記情報処理システムが、前記通番の照合の結果、前記テーブルで保持する通番と前記リカバリキューで保持する通番とが一致した場合、前記テーブルにおいて当該トランザクションに関して保持するステータスを電文送信済に更新するとしてもよい。 In the transaction control method of the present embodiment, when the serial number held by the information processing system matches the serial number held by the table as a result of the collation of the serial numbers, the information processing system holds the transaction in the table. The status may be updated to sent message.
本実施形態のトランザクション制御方法において、前記情報処理システムが、前記通番の照合の結果、前記テーブルで保持する通番が前記リカバリキューで保持する通番より小さいことが判明した場合、所定のエラー通知を所定装置に出力するとしてもよい。 In the transaction control method of the present embodiment, when the information processing system determines that the serial number held in the table is smaller than the serial number held in the recovery queue as a result of the collation of the serial numbers, a predetermined error notification is given. It may be output to the device.
10 ネットワーク
100 トランザクション制御システム
101 記憶装置
102 プログラム
103 メモリ
104 演算装置
105 通信装置
110 データベース
125 処理通番管理テーブル
126 通番管理テーブル
127 送信ステータス管理テーブル
150 受信用メッセージキュー
151 (請求経路向け)受信用メッセージキュー
152 (通知経路向け)受信用メッセージキュー
155 送信用メッセージキュー
156 (請求経路向け)送信用メッセージキュー
157 (通知経路向け)送信用メッセージキュー
160 (請求経路向け)リカバリキュー
161 (通知経路向け)リカバリキュー
200 業務システム
250 (請求経路向け)送信用メッセージキュー
251 (通知経路向け)受信用メッセージキュー
300 証券決済機関システム
350 (請求経路向け)受信用メッセージキュー
351 (通知経路向け)送信用メッセージキュー
10
Claims (6)
所定業務に関して所定装置間で授受される各電文に、当該業務で一意の通番を付与し、当該電文をメッセージキューイングによって仲介処理するに際し、当該業務のトランザクションにて送信予定の電文に対する所定処理の実行に伴い、当該業務に関して所定テーブルで管理する通番をインクリメントし、当該電文に関する情報をリカバリキューに格納する処理と、前記業務のトランザクション開始時に当該業務の電文に関して保持している情報をリカバリ情報として記憶装置に格納する処理と、本トランザクション制御システムでの障害発生に際し、前記テーブルで保持する通番と前記リカバリキューで保持する通番とを照合し、前記通番の照合の結果、前記テーブルで保持する通番が前記リカバリキューで保持する通番より大きいことが判明した場合、前記記憶装置で保持するリカバリ情報に基づいて、前記テーブルをロールバックする処理と、を実行する演算装置と、
を備えることを特徴とするトランザクション制御システム。 A communication device that communicates with other devices via a network;
A unique serial number is assigned to each message sent and received among the predetermined devices regarding the predetermined job, and when the message is brokered by message queuing, the predetermined process for the message to be sent in the transaction of the job With execution, the serial number managed by the predetermined table regarding the business is incremented, processing of storing the information about the electronic message in the recovery queue, and the information held regarding the electronic message of the business at the start of the transaction of the business as recovery information The processing stored in the storage device and the serial number held in the table are collated with the serial number held in the recovery queue when a failure occurs in the transaction control system, and the serial number held in the table as a result of the collation of the serial number Is greater than the serial number held in the recovery queue If you bright, on the basis of the recovery information held in the storage device, an arithmetic unit for executing a process of rolling back the table,
A transaction control system comprising:
前記通番の照合の結果、前記テーブルで保持する通番と前記リカバリキューで保持する通番とが一致した場合、前記テーブルにおいて当該トランザクションに関して保持するステータスを電文送信済に更新するものである、
ことを特徴とする請求項1に記載のトランザクション制御システム。 The arithmetic device is
If, as a result of the collation of the serial numbers, the serial numbers held in the table and the serial numbers held in the recovery queue match, the status held for the transaction in the table is updated to the transmitted message.
The transaction control system according to claim 1, characterized in that:
前記通番の照合の結果、前記テーブルで保持する通番が前記リカバリキューで保持する通番より小さいことが判明した場合、所定のエラー通知を所定装置に出力するものである、 ことを特徴とする請求項1に記載のトランザクション制御システム。 The arithmetic device is
As a result of the collation of the serial numbers, when it is found that the serial numbers held in the table are smaller than the serial numbers held in the recovery queue, a predetermined error notification is outputted to a predetermined device. Transaction control system according to 1.
所定業務に関して所定装置間で授受される各電文に、当該業務で一意の通番を付与し、当該電文をメッセージキューイングによって仲介処理するに際し、当該業務のトランザクションにて送信予定の電文に対する所定処理の実行に伴い、当該業務に関して所定テーブルで管理する通番をインクリメントし、当該電文に関する情報をリカバリキューに格納する処理と、
前記業務のトランザクション開始時に当該業務の電文に関して保持している情報をリカバリ情報として記憶装置に格納する処理と、
本トランザクション制御システムでの障害発生に際し、前記テーブルで保持する通番と前記リカバリキューで保持する通番とを照合し、前記通番の照合の結果、前記テーブルで保持する通番が前記リカバリキューで保持する通番より大きいことが判明した場合、前記記憶装置で保持するリカバリ情報に基づいて、前記テーブルをロールバックする処理と、
を実行することを特徴とするトランザクション制御方法。 An information processing system provided with a communication device that communicates with another device via a network,
A unique serial number is assigned to each message sent and received among the predetermined devices regarding the predetermined job, and when the message is brokered by message queuing, the predetermined process for the message to be sent in the transaction of the job A process of incrementing a serial number managed by a predetermined table in relation to the task and storing information on the message in a recovery queue according to the execution;
A process of storing, as recovery information, information held about a message of the task at the start of the transaction of the task in a storage device;
When a failure occurs in this transaction control system, the serial number held in the table and the serial number held in the recovery queue are collated, and as a result of the collation of the serial number, the serial number held in the table is held in the recovery queue If it is found to be larger , processing for rolling back the table based on recovery information held by the storage device ;
A transaction control method characterized in that:
前記通番の照合の結果、前記テーブルで保持する通番と前記リカバリキューで保持する通番とが一致した場合、前記テーブルにおいて当該トランザクションに関して保持するステータスを電文送信済に更新する、
ことを特徴とする請求項4に記載のトランザクション制御方法。 The information processing system
If, as a result of the collation of the serial numbers, the serial numbers held in the table and the serial numbers held in the recovery queue match, the status held for the transaction in the table is updated to the transmitted message.
5. A transaction control method according to claim 4 , wherein:
前記通番の照合の結果、前記テーブルで保持する通番が前記リカバリキューで保持する通番より小さいことが判明した場合、所定のエラー通知を所定装置に出力する、
ことを特徴とする請求項4に記載のトランザクション制御方法。 The information processing system
When it is determined that the serial number held in the table is smaller than the serial number held in the recovery queue as a result of the collation of the serial numbers, a predetermined error notification is output to a predetermined device.
5. A transaction control method according to claim 4 , wherein:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016052863A JP6530337B2 (en) | 2016-03-16 | 2016-03-16 | Transaction control system and transaction control method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016052863A JP6530337B2 (en) | 2016-03-16 | 2016-03-16 | Transaction control system and transaction control method |
Publications (3)
Publication Number | Publication Date |
---|---|
JP2017167842A JP2017167842A (en) | 2017-09-21 |
JP2017167842A5 JP2017167842A5 (en) | 2018-05-10 |
JP6530337B2 true JP6530337B2 (en) | 2019-06-12 |
Family
ID=59908941
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2016052863A Active JP6530337B2 (en) | 2016-03-16 | 2016-03-16 | Transaction control system and transaction control method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6530337B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110489253A (en) * | 2019-07-05 | 2019-11-22 | 中国平安财产保险股份有限公司 | Data processing method, device, equipment and computer readable storage medium |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2933095B2 (en) * | 1993-10-08 | 1999-08-09 | インターナシヨナル・ビジネス・マシーンズ・コーポレーシヨン | Method and system for inter-program communication in a transaction-oriented data processing network |
US6816873B2 (en) * | 2001-05-15 | 2004-11-09 | International Business Machines Corporation | Method for managing distributed savepoints across multiple DBMS's within a distributed transaction |
JP4286786B2 (en) * | 2002-12-18 | 2009-07-01 | 富士通株式会社 | Distributed transaction processing apparatus, distributed transaction processing program, and distributed transaction processing method |
JP2004341926A (en) * | 2003-05-16 | 2004-12-02 | Toshiba Corp | Database management system and database management program |
US8347292B2 (en) * | 2007-08-30 | 2013-01-01 | International Business Machines Corporation | Transaction aggregation to increase transaction processing throughout |
-
2016
- 2016-03-16 JP JP2016052863A patent/JP6530337B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2017167842A (en) | 2017-09-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5075736B2 (en) | System failure recovery method and system for virtual server | |
CN107301536B (en) | Resource transfers method and device | |
US7895602B2 (en) | System and article of manufacture for duplicate message elimination during recovery when multiple threads are delivering messages from a message store to a destination queue | |
US9141480B2 (en) | Handling failed transaction peers in a distributed hash table | |
US7823008B2 (en) | Maintaining consistency in a remote copy data storage system | |
US20080114827A1 (en) | Message forwarding backup manager in a distributed server system | |
JP2011103030A (en) | Incident management method and operation management server | |
CN111209142A (en) | Cross-database transaction management method, device, equipment and storage medium | |
JP5007239B2 (en) | Distributed transaction matching service | |
WO2012171349A1 (en) | Method, apparatus and system for implementing distributed auto-incrementing counting | |
JP6530337B2 (en) | Transaction control system and transaction control method | |
JP6549245B2 (en) | Data management system | |
US11483158B2 (en) | Distributed ledger device, distributed ledger system, and distributed ledger management method | |
CN104463014A (en) | Snapshot-based Oracle database protection method | |
JP2017045389A (en) | Bank system, and method and program executed by bank system | |
JP7243207B2 (en) | Information processing system, information processing device and program | |
US10417038B2 (en) | Batched commit in distributed transactions | |
US9092258B2 (en) | Task concurrency limiter | |
JP4994128B2 (en) | Storage system and management method in storage system | |
JP5466740B2 (en) | System failure recovery method and system for virtual server | |
CN112596867A (en) | Suspension transaction processing method and distributed database system | |
US9110850B2 (en) | Method for accelerating start up of a computerized system | |
JP5515286B2 (en) | Distributed transaction processing system, server apparatus, and distributed transaction failure recovery method used therefor | |
JP5094495B2 (en) | Data transfer system, data transfer method, and data transfer program | |
WO2016157358A1 (en) | Data processing system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20180323 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20180323 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20190328 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20190402 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20190419 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20190514 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20190516 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6530337 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |