JPH077351B2 - How to end transaction processing - Google Patents
How to end transaction processingInfo
- Publication number
- JPH077351B2 JPH077351B2 JP1229174A JP22917489A JPH077351B2 JP H077351 B2 JPH077351 B2 JP H077351B2 JP 1229174 A JP1229174 A JP 1229174A JP 22917489 A JP22917489 A JP 22917489A JP H077351 B2 JPH077351 B2 JP H077351B2
- Authority
- JP
- Japan
- Prior art keywords
- node
- transaction
- commit
- request
- processing unit
- 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.)
- Expired - Lifetime
Links
Landscapes
- Information Transfer Between Computers (AREA)
- Computer And Data Communications (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
【発明の詳細な説明】 〔産業上の利用分野〕 本発明はネットワークで接続された分散システムにおけ
る複数ノード間の交信回数を削減させるトランザクショ
ン処理の終了方法に関する。The present invention relates to a transaction processing termination method for reducing the number of communications between a plurality of nodes in a distributed system connected by a network.
従来は1つのノードから他の各ノードごとにネットワー
ク用の回線が接続され、1対nの関係でトランザクショ
ン処理を行っていた。また、1ノードと1ノードのトラ
ンザクション処理を行う場合に、たがいのノードどうし
が確認しあいながらコミット処理を実行する2相コミッ
ト方式を採用していたため、1ノードから他の1ノード
に対してのコミット処理実行後、その逆に他の1ノード
から1ノードに対するコミット処理を実行し、互いにコ
ミット処理完了後、1ノードからの終了処理、その逆に
他の1ノードからの終了処理で1トランザクション処理
を終了していた。Conventionally, a network line is connected from one node to each of the other nodes, and transaction processing is performed in a one-to-n relationship. In addition, when performing transaction processing of 1 node and 1 node, since the two-phase commit method is adopted in which the commit processing is executed while confirming each other's nodes, commit from 1 node to another 1 node After the processing is executed, on the contrary, the commit processing is executed from one other node to one node, and after the commit processing is completed with each other, one transaction processing is executed by the end processing from one node and vice versa. It was finished.
しかしこれでは各ノード間どうしの処理ごとにノード間
のコミット処理、終了処理の交信が必要となり、全くデ
ータの更新がなされなかったとき、もしくは1ノードの
みで行われた際には、他のノードとのコミット処理の交
信の必要がなくなる。However, this requires communication between nodes for commit processing and end processing for each processing between nodes, and when data is not updated at all or when it is performed by only one node, other nodes Eliminates the need for communication of commit processing with.
このような問題を解決する技術として、例えば特開昭63
-259742号公報に開示される処理方式がある。As a technique for solving such a problem, for example, JP-A-63
There is a processing method disclosed in Japanese Patent Publication No.-259742.
これは上記のような理由によりコミット処理の必要がな
い場合に、あらかじめ更新が行われたかどうか管理する
テーブルを設けておき、このテーブルを参照することで
コミット処理を実行せずに終了処理のみを行い、更新回
数の削減を行っている。This is because if there is no need for commit processing for the above reasons, a table that manages whether updates have been made beforehand is provided, and by referencing this table, only commit processing is executed without executing commit processing. Yes, the number of updates is reduced.
従来のネットワークを利用した分散システムでは1ノー
ドから他の複数の各ノードごとに回線が接続されていた
ため、1対nの関係でトランザクション処理を行い、ま
た2相コミット方式による処理方法だったので、2ノー
ド(仮にAノードとBノード)における交信回数は、A
ノードからBノードへのコミット処理、逆にBノードか
らAノードへのコミット処理、コミット処理完了後にA
ノードからBノードへの終了処理、逆にBノードからA
ノードへの終了処理の合計4回となり、n個のノードに
おけるトランザクション処理の場合にはn×4回の交信
回数となる。In a conventional distributed system using a network, a line is connected from one node to each of a plurality of other nodes, so transaction processing is performed in a one-to-n relationship, and the processing method is a two-phase commit method. The number of communications at two nodes (probably A node and B node) is A
Commit processing from node to B node, conversely from B node to A node, A after completion of commit processing
End processing from node to B node, conversely from B node to A
The end processing to the node is 4 times in total, and in the case of transaction processing in n nodes, the number of times of communication is n × 4 times.
また、上記のn×4回の交信回数を削減する上記公知例
の処理の方法では、全く更新が行われなかった場合、も
しくは1ノードのみで更新が行われなかった場合にのみ
コミット処理が必要ないために更新回数が削減できるよ
うになっていた。Further, in the above-described processing method of the above-described known example that reduces the number of times of communication of n × 4 times, the commit processing is necessary only when the update is not performed at all or when the update is not performed by only one node. Since it was not there, the number of updates could be reduced.
本発明は、上記のような条件つきの更新回数削減方法で
はなく、ネットワーク構成とコミット方式を変えること
で、いかなる場合でも従来同様の確実性で更新回数を削
減でき、トランザクション処理の高速化を図るトランザ
クション処理の終了方法を提供することにある。The present invention is not a conditional update count reduction method as described above, but by changing the network configuration and the commit method, it is possible to reduce the update count with the same certainty as in the conventional case in any case, and to increase the transaction processing speed. It is to provide a method of ending the processing.
上記目的を達成するために、本発明は複数のノードを有
し、環状のネットワーク構成を利用した分散システムに
おいて、トランザクション終了処理を行うノードから環
状のネットワークの両方向にコミット準備要求を送信
し、これら2つの要求に対する回答が戻ってきた時にト
ランザクションの終了処理を行うようにしたものであ
る。In order to achieve the above-mentioned object, the present invention has a plurality of nodes, and in a distributed system using a ring network configuration, a node that performs transaction termination processing sends a commit preparation request to both directions of the ring network, The transaction end processing is performed when the responses to the two requests are returned.
環状のネットワークを利用した分散システムにおいて、
要求指示を受けたノードは、その要求に対する処理を行
い、要求指示を送ったノードと反対方向のノードに要求
指示を送るようにして、交信する相手ノードを決定す
る。In a distributed system using a ring network,
The node that receives the request instruction performs processing for the request and sends the request instruction to the node in the opposite direction to the node that sent the request instruction to determine the partner node with which to communicate.
ネットワークには要求の流れる方向と応答を返す方向の
2つの方向が存在し、要求方向のノードからコミット準
備要求を受けた1ノードは、コミット準備を行い、コミ
ット準備終了後、要求方向に従ってコミット準備要求を
出す。There are two directions in the network, a request flow direction and a response return direction. One node that receives a commit preparation request from the request direction node prepares for commit, and after completion of commit preparation, prepares for commit according to the request direction. Make a request.
左右の両ノードからコミット準備要求を受信した1ノー
ドは、コミット準備を完了するとただちにコミット処理
を行う。コミット処理終了後、応答方向に従ってコミッ
ト処理終了応答を返す。このようにして、1ノードがコ
ミット準備完了となれば、他の全てのノードがコミット
準備完了か否かを判定せず、応答を返してきたノードの
応答内容に従ってトランザクション処理を実行し、終了
させることにより交信回数の削減が可能となり、トラン
ザクション処理の高速化が図れる。Upon receiving the commit preparation requests from both the left and right nodes, one node immediately executes the commit process after completing the commit preparation. After the commit process ends, a commit process end response is returned according to the response direction. In this way, when one node is ready to commit, all other nodes do not judge whether or not they are ready to commit, execute transaction processing according to the response content of the node that has returned a response, and terminate it. As a result, the number of communications can be reduced, and transaction processing can be speeded up.
以下、本発明の一実施例を図面により詳細に説明する。 An embodiment of the present invention will be described in detail below with reference to the drawings.
第1図は、本発明の一実施例の分散システムの構成図で
あり、通信ネットワーク41によって複数のノードが連絡
可能な状況を示す図である。FIG. 1 is a configuration diagram of a distributed system according to an embodiment of the present invention, and is a diagram showing a situation in which a plurality of nodes can communicate with each other via a communication network 41.
通常、ノードAシステム1において、アプリケーション
プログラム5からのデータアクセス要求が自ノードにあ
るデータに対してのものであれば、トランザクショント
リー管理部6は自ノードに対するアクセスである事を認
識し、トランザクション管理処理部7、データ管理処理
部8を通じて自ノードのデータベース9をアクセスす
る。Normally, in the node A system 1, if the data access request from the application program 5 is for the data in the own node, the transaction tree management unit 6 recognizes that the access is to the own node, and manages the transaction. The database 9 of the own node is accessed through the processing unit 7 and the data management processing unit 8.
アクセス要求が他ノード2,3,4に対するものであれば、
トランザクショントリー管理部6によって生成されたト
ランザクショントリー情報を、通信制御処理部10から、
他ノード2,3,4に送信し、アクセス要求を行う。ノード
Bシステム2,ノードCシステム3,ノードDシステム4で
は、トランザクショントリー情報と、データアクセス要
求をそれぞれの通信管理処理部10,20,30で受信し、それ
ぞれのトランザクショントリー管理部16,26,36とトラン
ザクション管理処理部17,27,37に送る。If the access request is for another node 2, 3, 4
The transaction tree information generated by the transaction tree management unit 6 is transferred from the communication control processing unit 10 to
It transmits to the other nodes 2, 3 and 4 and requests access. In the node B system 2, the node C system 3, and the node D system 4, the transaction tree information and the data access request are received by the respective communication management processing units 10, 20, 30 and the respective transaction tree management units 16, 26, 26, 36 and the transaction management processing units 17, 27, 37.
各トランザクション管理処理部17,27,37は、データ管理
処理部18,28,38を通じて各自のデータベース19,29,39へ
アクセスする。その後トランザクション管理部17,27,37
が認識しているトランザクショントリー情報により応答
を返すノードAシステム1を認識し、それぞれの通信管
理処理部10,20,30によって応答を返す。Each transaction management processing unit 17, 27, 37 accesses its own database 19, 29, 39 through the data management processing unit 18, 28, 38. After that transaction management department 17,27,37
The node A system 1 that returns a response is recognized based on the transaction tree information recognized by the node A, and the response is returned by the respective communication management processing units 10, 20, and 30.
第2図は、トランザクショントリー管理部6,16,26,36に
よって認識された従来のトランザクショントリーを表わ
した図である。FIG. 2 is a diagram showing a conventional transaction tree recognized by the transaction tree management units 6, 16, 26 and 36.
ノードAシステム1にノードBシステム2,ノードCシス
テム3,ノードDシステム4のそれぞれが連絡されてお
り、ノードBシステム2,ノードCシステム3,ノードDシ
ステム4はノードAシステム1とのみ連絡可能、逆にノ
ードAシステム1はノードBシステム2,ノードCシステ
ム3,ノードDシステム4と連絡可能という、1対nの対
応関係を持ち、要求はノードAシステム1からノードB
システム2,ノードCシステム3,ノードDシステム4へ、
応答はノードBシステム2,ノードCシステム3,ノードD
システム4からノードAシステム1へ送信すると、トラ
ンザクショントリー管理部6,16,26,36は認識する。Node B system 2, node C system 3 and node D system 4 are in communication with node A system 1, and node B system 2, node C system 3 and node D system 4 can communicate only with node A system 1. On the contrary, the node A system 1 has a one-to-n correspondence that the node B system 2, the node C system 3, and the node D system 4 can communicate with each other, and the request is from the node A system 1 to the node B.
System 2, node C system 3, node D system 4,
The response is node B system 2, node C system 3, node D
When transmitted from the system 4 to the node A system 1, the transaction tree management units 6, 16, 26 and 36 recognize it.
第6図は、各ノードのトランザクショントリー管理部6,
16,26,36によって認識した本発明によるトランザクショ
ントリーを表す図である。FIG. 6 shows the transaction tree management unit 6 of each node.
FIG. 6 is a diagram showing a transaction tree according to the present invention recognized by 16, 26 and 36.
ノードAシステム1,ノードBシステム2,ノードCシステ
ム3,ノードDシステム4が環状に並び、要求はノードA
システム1からノードBシステム2,ノードDシステム4
へ、更にノードBシステム2,ノードDシステム4からノ
ードCシステム3へと送られる。Node A system 1, node B system 2, node C system 3, node D system 4 are lined up in a ring, and the request is node A
System 1 to Node B system 2, Node D system 4
To the node C system 3 from the node B system 2 and the node D system 4.
一方、応答は、ノードCシステム3からノードBシステ
ム2,ノードDシステム4へ、更にノードBシステム2,ノ
ードDシステム4からノードAシステム1へと送信する
と、各トランザクショントリー管理部6,16,26,36は認識
する。On the other hand, when the response is transmitted from the node C system 3 to the node B system 2 and the node D system 4, and further from the node B system 2 and the node D system 4 to the node A system 1, the transaction tree management units 6, 16, 26,36 recognize.
第3図,第5図,第7図,第8図,第9図は,トランザ
クショントリー情報の一例を示す図である。FIG. 3, FIG. 5, FIG. 7, FIG. 8, FIG. 9 and FIG. 9 are diagrams showing an example of transaction tree information.
第10図は、従来のトランザクショントリー(第2図)を
利用した1トランザクションの流れ図である。FIG. 10 is a flow chart of one transaction using the conventional transaction tree (FIG. 2).
トランザクション開始要求(1000)をアプリケーション
プログラム5から受け取ったノードAシステムのトラン
ザクショントリー管理部6は、第2図に示すようなトラ
ンザクショントリーを認識し、トランザクション管理処
理部7でデータ処理要求を生成して、トランザクション
トリー情報とデータ処理要求を同時に通信制御処理部10
を用いて、ノードBシステム2,ノードCシステム3,ノー
ドDシステム4に送信する(1001,1006,1011)。Upon receiving the transaction start request (1000) from the application program 5, the transaction tree management unit 6 of the node A system recognizes the transaction tree as shown in FIG. 2, and the transaction management processing unit 7 generates a data processing request. , The transaction tree information and the data processing request at the same time, the communication control processing unit 10
Is transmitted to the node B system 2, the node C system 3, and the node D system 4 by using (1001, 1006, 1011).
ノードBシステム2,ノードCシステム3,ノードDシステ
ム4では、トランザクショントリー情報とデータ処理要
求をそれぞれの通信制御処理部10,20,30で受信し、トラ
ンザクショントリー情報はトランザクショントリー管理
部16,26,36で、データ処理要求はトランザクション管理
処理部17,27,37で認識する(1002,1007,1012)。それぞ
れのトランザクション管理処理部17,27,37では、データ
管理処理部18,28,38を通じて各データベース19,29,39で
処理を実行する(1003,1008,1013)。実行完了後、応答
は各トランザクション管理処理部17,27,37からそれぞれ
の通信制御処理部20,30,40を用いてノードAシステム1
に返される(1004,1009,1014)。In the node B system 2, the node C system 3, and the node D system 4, the transaction tree information and the data processing request are received by the respective communication control processing units 10, 20, 30 and the transaction tree information is stored in the transaction tree management unit 16, 26. , 36, the data processing request is recognized by the transaction management processing units 17, 27, 37 (1002, 1007, 1012). In each transaction management processing unit 17, 27, 37, processing is executed in each database 19, 29, 39 through the data management processing unit 18, 28, 38 (1003, 1008, 1013). After the execution is completed, the response is sent from each transaction management processing unit 17, 27, 37 using the respective communication control processing units 20, 30, 40 to the node A system 1
Returned to (1004,1009,1014).
応答を通信制御処理部10で受け取ると(1005,1010,101
5)、トランザクション管理処理部7はデータ管理処理
部8を通じてデータベース9でデータ処理を行う(101
6)。When the communication control processing unit 10 receives the response (1005,1010,101
5) The transaction management processing unit 7 performs data processing on the database 9 through the data management processing unit 8 (101
6).
次にアプリケーションプログラム5からトランザクショ
ン終了要求を受け取る(1017)と、トランザクション管
理処理部7がデータ管理処理部8を通じてデータベース
9においてコミット準備を行いコミット準備処理が成功
すれば、トランザクショントリー管理部6は、コミット
準備要求を生成して、第3図で示すようなトランザクシ
ョントリー情報とコミット準備要求を通信制御処理部10
を用いて、ノードBシステム2,ノードCシステム3,ノー
ドDシステム4に送信する(1018,1023,1028)。Next, when a transaction end request is received from the application program 5 (1017), the transaction management processing unit 7 makes a commit preparation in the database 9 through the data management processing unit 8 and if the commit preparation processing succeeds, the transaction tree management unit 6 A commit preparation request is generated and transaction tree information and a commit preparation request as shown in FIG.
Is transmitted to the node B system 2, the node C system 3 and the node D system 4 by using (1018, 1023, 1028).
ノードBシステム2,ノードCシステム3,ノードDシステ
ム4では送信されてきたトランザクショントリー情報と
コミット準備要求をそれぞれの通信制御処理部10,20,30
で受信し、トランザクショントリー情報はトランザクシ
ョントリー管理部16,26,36で、コミット準備要求はトラ
ンザクション管理処理部17,27,37で認識する(1019,102
4,1029)。The node B system 2, the node C system 3, and the node D system 4 respectively transmit the transaction tree information and the commit preparation request transmitted by the communication control processing units 10, 20, 30.
The transaction tree information is received by the transaction tree management units 16, 26, 36, and the commit preparation request is recognized by the transaction management processing units 17, 27, 37 (1019, 102).
4,1029).
各ノードのトランザクション管理処理部17,27,37は、デ
ータ管理処理部18,28,38を通じてデータベース19,29,39
においてコミット準備を実行する(1020,1025,1030)。The transaction management processing units 17, 27, 37 of the respective nodes are connected to the databases 19, 29, 39 through the data management processing units 18, 28, 38.
Execute the commit preparation in (1020,1025,1030).
実行完了後、応答は各自のトランザクション管理処理部
17,27,37から通信制御処理部20,30,40を用いてノードA
システム1に返される(1021,1026,1031)。After execution is complete, the response is the transaction management processing unit
Node A from 17, 27, 37 using communication control processing units 20, 30, 40
It is returned to the system 1 (1021, 1026, 1031).
ノードAシステムは、応答を通信制御処理部10で受け取
る(1022,1027,1032)と、トランザクション管理部7が
ノードBシステム2,ノードCシステム3,ノードDシステ
ム4の全てからコミット準備完了応答が返ったか判定し
(1033)、全ノードがコミット準備完了ならば、データ
管理処理部8を通じでデータベース9においてコミット
処理を行う(1035)。When the communication control processing unit 10 of the node A system receives the response (1022, 1027, 1032), the transaction management unit 7 receives a commit preparation completion response from all of the node B system 2, the node C system 3, and the node D system 4. It is judged whether or not it has returned (1033), and if all nodes are ready for commit, commit processing is performed in the database 9 through the data management processing unit 8 (1035).
その後、トランザクション管理処理部7に6制御が戻る
と、通信制御処理部10を用いてノードBシステム2,ノー
ドCシステム3,ノードDシステム4にコミット要求を生
成して、第2図で示すようなトランザクショントリー情
報と一緒に送信する(1036,1041,1046)。After that, when 6 control is returned to the transaction management processing unit 7, the communication control processing unit 10 is used to generate a commit request to the node B system 2, the node C system 3, and the node D system 4, and as shown in FIG. And send it along with detailed transaction tree information (1036,1041,1046).
ノードBシステム2,ノードCシステム3,ノードDシステ
ム4では、トランザクショントリー情報とコミット要求
をそれぞれの通信制御処理部10,20,30で受信し、トラン
ザクショントリー情報はトランザクショントリー管理部
16,26,36で、コミット要求はトランザクション管理部1
7,27,37で認識する(1037,1042,1047)。In the node B system 2, the node C system 3, and the node D system 4, the transaction tree information and the commit request are received by the respective communication control processing units 10, 20, 30 and the transaction tree information is stored in the transaction tree management unit.
16, 26, 36, the commit request is the transaction management unit 1
Recognize at 7,27,37 (1037,1042,1047).
各トランザクション管理処理部17,27,37はデータ管理処
理部18,28,38を通じて各自のデータベース19,29,39にお
いてコミットを実行する(1038,1043,1048)。コミット
実行完了応答は、トランザクション管理処理部17,27,37
から通信制御処理部20,30,40を用いてノードAシステム
1に返される(1039,1044,1049)。Each transaction management processing unit 17, 27, 37 executes a commit in its own database 19, 29, 39 through the data management processing unit 18, 28, 38 (1038, 1043, 1048). The commit execution completion response is returned to the transaction management processing units 17, 27, 37.
Is returned to the node A system 1 using the communication control processing units 20, 30, 40 (1039, 1044, 1049).
ノードAシステム1では、応答を通信制御処理部10で受
取り(1040,1045,1050)、トランザクションは終了する
(1051)。In the node A system 1, the communication control processing unit 10 receives the response (1040, 1045, 1050), and the transaction ends (1051).
第4図からわかる様に、トランザクション終了時に、ノ
ードAシステム,ノードBシステム,ノードCシステ
ム,ノードDシステム間の交信回数は(相手ノード数)
×4=3×4=12回である。As can be seen from FIG. 4, the number of communications between the node A system, node B system, node C system, and node D system at the end of the transaction is (the number of partner nodes).
× 4 = 3 × 4 = 12 times.
第11図は、本発明の基本となる2フェーズコミットプロ
トコルの最適化を行なった1トランザクションの流れ図
である。FIG. 11 is a flow chart of one transaction in which the two-phase commit protocol which is the basis of the present invention is optimized.
2ノード間でトランザクションを実行する場合におい
て、トランザクションを開始したノード(ノードAとす
る)がコミット準備処理を完了した後に、相手ノード
(ノードBとする)に対してコミット準備要求を送信
し、ノードBは、コミット準備処理を実行した後、成功
ならコミット処理を実行しコミット完了応答を、失敗な
らばロールバック処理を実行しロールバック完了応答
を、ノードAに対して送信する事でトランザクション整
合性を保ちながら、交信回数を削減する事に特徴を持っ
ている。In the case of executing a transaction between two nodes, after the node that initiated the transaction (called node A) completes the commit preparation process, it sends a commit preparation request to the other node (called node B), and the node After executing the commit preparation process, B executes the commit process if successful and sends the commit completion response, and if it fails, executes the rollback process and sends the rollback completion response to node A, thereby ensuring transaction consistency. It is characterized by reducing the number of communications while maintaining.
トランザクション開始要求(1000)からデータ処理実行
(1016)は同じ処理であるが、アプリケーションプログ
ラム5から、トランザクション終了要求(1017)を受け
取ったトランザクション管理処理部7は、コミット処理
準備をデータ管理処理部8を通してデータベース9にお
いて実行しコミット準備処理が成功すれば、トランザク
ショントリー管理部6は、コミット準備要求を通信制御
処理部10からノードBシステム2に送る(1102)。Although the transaction start request (1000) to the data processing execution (1016) are the same processing, the transaction management processing unit 7 that has received the transaction end request (1017) from the application program 5 prepares the commit processing and prepares the data management processing unit 8. If the commit preparation process succeeds in the database 9 through the transaction tree management unit 6, the transaction tree management unit 6 sends a commit preparation request from the communication control processing unit 10 to the node B system 2 (1102).
ノードBシステム2では、通信制御処理部20が受信し
(1103)、コミット準備要求はトランザクション管理処
理部17が認識し、データ管理処理部18を通じてデータベ
ース19でコミット準備を実行し(1104)、コミット準備
処理が成功すると即ちにコミットを実行し(1105)、制
御がトランザクション管理処理部17に戻って来るとコミ
ット完了応答をノードAシステム1に送る(1106)。In the node B system 2, the communication control processing unit 20 receives (1103), the commit preparation request is recognized by the transaction management processing unit 17, and the commit preparation is executed in the database 19 through the data management processing unit 18 (1104) and the commit is made. When the preparation process is successful, that is, the commit is executed (1105), and when the control returns to the transaction management processing unit 17, the commit completion response is sent to the node A system 1 (1106).
ノードAシステム1では、通信制御処理部10が受信し
(1107)、ノードBシステム2からの応答がコミット完
了応答であるか否かをトランザクション管理処理部7で
判定する(1108)。In the node A system 1, the communication control processing unit 10 receives (1107), and the transaction management processing unit 7 determines whether the response from the node B system 2 is a commit completion response (1108).
送信されて来た応答がコミット完了応答であれば、デー
タ管理処理部8を通じてデータベース9でコミットが実
行され(1109)、トランザクションは終了する(111
0)。If the transmitted response is the commit completion response, the commit is executed in the database 9 through the data management processing unit 8 (1109), and the transaction ends (111).
0).
第11図からもわかる様に、トランザクション終了時に、
ノードAシステム,ノードBシステム間の交信回数は、
(相手ノード数)×2=2回であり、2相コミットプロ
トコルを最適化しない場合の交信回数よりも半減する。As you can see from Figure 11, at the end of the transaction,
The number of communications between node A system and node B system is
(Number of partner nodes) × 2 = 2 times, which is half the number of communications when the two-phase commit protocol is not optimized.
第12図は、本発明のトランザクショントリー(第6図)
を利用した1トランザクションの流れ図である。FIG. 12 shows the transaction tree of the present invention (FIG. 6).
It is a flow chart of one transaction using the.
トランザクション開始要求(1000)からノードAシステ
ム1のトランザクション終了開始要求からコミット準備
処理(1017)までは同じ処理であるが、次にトランザク
ション管理処理部7はコミット準備要求をトランザクシ
ョントリー情報(第7図)と一緒に、通信制御処理部10
を用いてトランザクショントリー情報を従ったノードB
システム2とノードDシステム4に送る(1201)。The process from the transaction start request (1000) to the transaction end start request of the node A system 1 to the commit preparation process (1017) is the same, but next, the transaction management processing unit 7 sends a commit preparation request to the transaction tree information (see FIG. 7). ) Together with the communication control processing unit 10
Node B subject to transaction tree information using
It is sent to the system 2 and the node D system 4 (1201).
ノードBシステム2、ノードDシステム4では各通信制
御処理部20,40が受信し(1202,1205)トランザクション
トリー情報はトランザクショントリー管理部16,36が、
コミット準備要求はトランザクション管理処理部17,37
がそれぞれ認識し、各データ管理処理部18,38を通じて
各々のデータベース19,39でコミット準備を実行し(120
3,1206)、制御がトランザクション管理処理部17,37に
戻って来ると、トランザクショントリー情報(第7図)
とコミット準備処理を一緒に各通信制御処理部20,40を
用いて、トランザクショントリー情報に従ったノードC
システム3に送る(1204,1207)。In the node B system 2 and the node D system 4, the transaction tree management units 16 and 36 receive the transaction tree information received by the respective communication control processing units 20 and 40 (1202 and 1205).
The commit preparation request is issued by the transaction management processing unit 17, 37.
Recognizes each of them, and executes commit preparation in each database 19, 39 through each data management processing unit 18, 38 (120
(3, 1206), when control returns to the transaction management processing unit 17, 37, the transaction tree information (Fig. 7)
And the commit preparation process together using the respective communication control processing units 20 and 40, the node C according to the transaction tree information.
Send to system 3 (1204, 1207).
もう一端であるノードAシステム1に対しては、既にコ
ミット準備要求を受信しているので、コミット準備要求
は再度送信しない。Since the commit preparation request has already been received for the other end, the node A system 1, the commit preparation request is not transmitted again.
ノードCシステム3では、通信制御処理部30が受信し
(1208)、トランザクショントリー情報はトランザクシ
ョントリー管理部26が、コミット準備要求はトランザク
ション管理処理部27が認識する。トランザクション管理
処理部26は、両ノードからの要求がコミット準備要求か
否かを判定し(1209)、両ノードからの要求がコミット
準備要求であればデータ管理処理部28を通じてデータベ
ース29でコミット準備を実行し(1210)コミット準備が
完了すると即ちにコミット処理を行う(1211)。トラン
ザクション管理処理部27に制御が戻ってくると、トラン
ザクショントリー情報(第7図)とコミット完了応答を
一緒に通信制御処理部30を用いて、トランザクショント
リー情報に従ったノードBシステム2とノードDシステ
ム4に送る(1212)。In the node C system 3, the communication control processing unit 30 receives (1208), the transaction tree information is recognized by the transaction tree management unit 26, and the commit preparation request is recognized by the transaction management processing unit 27. The transaction management processing unit 26 determines whether the request from both nodes is a commit preparation request (1209). If the requests from both nodes are commit preparation requests, the transaction management processing unit 26 prepares a commit preparation in the database 29 through the data management processing unit 28. It is executed (1210), and when the preparation for commit is completed, that is, the commit process is performed (1211). When the control returns to the transaction management processing unit 27, the transaction tree information (FIG. 7) and the commit completion response are used together with the communication control processing unit 30 to use the node B system 2 and the node D according to the transaction tree information. Send to system 4 (1212).
ノードBシステム2とノードDシステム4では、各通信
制御処理部20,40が受信し(1213,1216)、トランザクシ
ョントリー情報はトランザクショントリー管理部16,36
が、ノードCシステム3からの応答はトランザクション
管理処理部17,37がそれぞれ認識し、応答がコミット完
了応答であれば各データ管理処理部18,38を通じて各々
のデータベース19,39でコミットを実行し(1214,121
7)、制御がそれぞれのトランザクション管理処理部17,
37に戻って来るとトランザクショントリー情報(第7
図)とコミット完了応答を一緒に、各通信制御処理部2
0,40を用いてトランザクショントリー情報に従ったノー
ドAシステム1に送る(1215,1218)。In the node B system 2 and the node D system 4, each communication control processing unit 20, 40 receives (1213, 1216), and the transaction tree information is transaction tree management unit 16, 36.
However, the transaction management processing units 17 and 37 recognize the response from the node C system 3, and if the response is the commit completion response, the commit is executed in the respective databases 19 and 39 through the data management processing units 18 and 38. (1214,121
7), the control is performed by each transaction management processing unit 17,
Returning to 37, transaction tree information (7th
Figure) and commit completion response together, each communication control processing unit 2
It is sent to the node A system 1 according to the transaction tree information using 0, 40 (1215, 1218).
もう一端であるノードCシステム3に対しては、既にコ
ミット完了応答を受信しているので、コミット完了応答
は再度送信しない。Since the commit completion response has already been received for the other end, the node C system 3, the commit completion response is not transmitted again.
ノードAシステム1では、通信制御処理部10が受信し
(1219)、ノードBシステム2からの応答かノードDシ
ステム4からの応答のいずれかがノードAシステム1に
送信されてくれば即ち、応答がコミット完了応答である
か否かをトランザクション管理処理部7で判定する(12
30)。In the node A system 1, the communication control processing unit 10 receives (1219), and if either the response from the node B system 2 or the response from the node D system 4 is transmitted to the node A system 1, that is, the response. Is a commit completion response by the transaction management processing unit 7 (12
30).
送信されて来た応答がコミット完了応答であれば、デー
タ管理処理部8を通じてデータベース9でコミット処理
が実行され(1231)、トランザクショントリー情報によ
り自ノードでコミットが完了すればトランザクションは
終了しても良いと認識しているので、トランザクション
は終了する(1232)。ここでは、ノードBシステム2か
らの応答が早く返ってきた例を示す。If the transmitted response is the commit completion response, the commit processing is executed in the database 9 through the data management processing unit 8 (1231), and if the commit is completed in the own node according to the transaction tree information, the transaction is completed. Since we know it is good, the transaction ends (1232). Here, an example in which the response from the node B system 2 is returned early is shown.
第12図からもわかる様に、トランザクション終了時に、
ノードAシステム1,ノードBシステム2,ノードCシステ
ム3,ノードDシステム4間の交信回数は(相手ノード数
+1)×2回=8回であり、第10図の例より減少する。As you can see from Figure 12, at the end of the transaction,
The number of communications between the node A system 1, the node B system 2, the node C system 3, and the node D system 4 is (the number of partner nodes + 1) × 2 times = 8 times, which is smaller than the example of FIG.
第13図は、本発明のトランザクショントリー(第6図)
を利用した1トランザクションの流れ図である。但し、
ノードDシステム4が、両ノードからコミット準備要求
を受信した場合を説明する。FIG. 13 shows the transaction tree of the present invention (FIG. 6).
It is a flow chart of one transaction using the. However,
A case where the node D system 4 receives a commit preparation request from both nodes will be described.
トランザクション開始要求(1000)からノードAシステ
ム1のトランザクション終了開始要求受信及びコミット
準備処理(1017)までは同じ処理であるが、次にトラン
ザクション管理処理部7はコミット準備要求をトランザ
クショントリー情報(第7図)と一緒に、通信制御処理
部10を用いてトランザクショントリー情報に従ったノー
ドBシステム2とノードDシステム4に送る(1301)。The processing from the transaction start request (1000) to the transaction end start request reception and commit preparation processing (1017) of the node A system 1 is the same, but next the transaction management processing unit 7 sends a commit preparation request to the transaction tree information (seventh). (Fig. 2) together with the node B system 2 and node D system 4 according to the transaction tree information using the communication control processing unit 10 (1301).
ノードBシステム2では通信制御処理部20が受信し(13
02)トランザクショントリー情報はトランザクショント
リー管理部16が、コミット準備要求はトランザクション
管理処理部17が認識し、データ管理処理部18を通じてデ
ータベース19でコミット準備を実行し(1303)、制御が
トランザクション管理処理部17に戻って来ると、トラン
ザクショントリー情報(第7図)とコミット準備要求を
一緒に通信制御処理部20を用いて、トランザクショント
リー情報に従ったノードCシステム3に送る(1304)。In the node B system 2, the communication control processing unit 20 receives (13
02) The transaction tree management unit 16 recognizes the transaction tree information, and the transaction management processing unit 17 recognizes the commit preparation request, and the database 19 is executed through the data management processing unit 18 to execute commit preparation (1303). When returning to 17, the transaction tree information (FIG. 7) and the commit preparation request are sent together to the node C system 3 according to the transaction tree information using the communication control processing unit 20 (1304).
もう一端であるノードAシステムに対しては、既にコミ
ット準備要求を受信しているので、コミット準備要求は
再度送信しない。Since the commit preparation request has already been received for the node A system at the other end, the commit preparation request is not transmitted again.
ノードCシステム3では通信制御処理部30が受信し(13
05)、トランザクショントリー情報はトランザクション
トリー管理部26が、コミット準備要求はトランザクショ
ン管理処理部27が認識し、データ管理処理部28を通じて
データベース29でコミット準備を実行し(1306)、制御
がトランザクション管理処理部27に戻って来ると、トラ
ンザクショントリー情報(第7図)とコミット準備要求
を一緒に通信制御処理部30を用いて、トランザクション
トリー情報に従ったノードDシステム4に送る(130
7)。In the node C system 3, the communication control processing unit 30 receives (13
05), the transaction tree management unit 26 recognizes the transaction tree information, and the transaction management processing unit 27 recognizes the commit preparation request, and executes commit preparation in the database 29 through the data management processing unit 28 (1306). When returning to the section 27, the transaction tree information (FIG. 7) and the commit preparation request are sent together to the node D system 4 according to the transaction tree information by using the communication control processing section 30 (130).
7).
もう一端であるノードBシステムに対しては、既にコミ
ット準備要求を受信しているので、コミット準備要求は
再度送信しない。Since the commit preparation request has already been received, the commit preparation request is not transmitted again to the node B system at the other end.
ノードDシステム4では、通信制御処理部40が受信し
(1310)、トランザクショントリー情報はトランザクシ
ョントリー管理部46が、ノードAシステム1,ノードCシ
ステム3からの要求はトランザクション管理処理部47が
認識する。トランザクション管理処理部46は、両ノード
からの要求がコミット準備要求か否かを判定し(131
1)、両ノードからの要求がコミット準備要求であれば
データ管理処理部48を通じてデータベース49でコミット
準備を実行し(1312)コミット準備が完了すると即ちに
コミットを行う(1313)。トランザクション管理処理部
47に制御が戻ってくると、トランザクショントリー情報
(第7図)とコミット完了応答を一緒に通信制御処理部
40を用いて、トランザクショントリー情報に従ったノー
ドAシステム1とノードCシステム3に送る(1314)。In the node D system 4, the communication control processing unit 40 receives (1310), the transaction tree information is recognized by the transaction tree management unit 46, and the requests from the node A system 1 and the node C system 3 are recognized by the transaction management processing unit 47. . The transaction management processing unit 46 determines whether the request from both nodes is a commit preparation request (131
1) If the request from both nodes is a commit preparation request, the data management processing unit 48 executes commit preparation in the database 49 (1312). When the commit preparation is completed, that is, commit is executed (1313). Transaction management processing unit
When the control returns to 47, the transaction tree information (Fig. 7) and the commit completion response are put together with the communication control processing unit.
40 is sent to the node A system 1 and the node C system 3 according to the transaction tree information (1314).
ノードCシステム3では通信制御処理部30が受信し(13
19)、トランザクショントリー情報はトランザクション
トリー管理部26が、ノードCシステム3からの応答はト
ランザクション管理処理部27が認識し、応答がコミット
完了応答であればデータ管理処理部28を通じてデータベ
ース29でコミット処理を実行し(1320)、制御がトラン
ザクション管理処理部37に戻って来るとトランザクショ
ントリー情報(第7図)とコミット完了応答を一緒に、
通信制御処理部30を用いてトランザクショントリー情報
に従ったノードBシステム2に送る(1321)。In the node C system 3, the communication control processing unit 30 receives (13
19), the transaction tree information is recognized by the transaction tree management unit 26, the response from the node C system 3 is recognized by the transaction management processing unit 27, and if the response is a commit completion response, the database 29 is committed through the data management processing unit 28. (1320), and when control returns to the transaction management processing unit 37, the transaction tree information (FIG. 7) and the commit completion response are put together,
It is sent to the node B system 2 according to the transaction tree information using the communication control processing unit 30 (1321).
もう一端であるノードDシステム4に対しては、既にコ
ミット完了応答を送信しているので、コミット完了応答
は再度送信しない。Since the commit completion response has already been transmitted to the other end, the node D system 4, the commit completion response is not transmitted again.
ノードBシステム2では通信制御処理部20が受信し(13
22)、トランザクショントリー情報はトランザクション
トリー管理部16が、ノードCシステムからの応答はトラ
ンザクション管理処理部17が認識し、応答がコミット完
了応答であればデータ管理処理部18を通じてデータベー
ス19でコミットを実行し(1323)、制御がトランザクシ
ョン管理処理部17に戻って来るとトランザクショントリ
ー情報(第7図)とコミット完了応答を一緒に、通信制
御処理部20を用いてトランザクショントリー情報に従っ
たノードAシステム1に送る(1324)。In the node B system 2, the communication control processing unit 20 receives (13
22), the transaction tree management unit 16 recognizes the transaction tree information, the transaction management processing unit 17 recognizes the response from the node C system, and if the response is the commit completion response, the data management processing unit 18 executes the commit in the database 19. Then (1323), when the control returns to the transaction management processing unit 17, the transaction tree information (FIG. 7) and the commit completion response are put together, and the communication control processing unit 20 is used to comply with the transaction tree information. Send to 1 (1324).
ノードAシステム1では、通信制御処理部10が受信し
(1315)、ノードBシステム2からの応答かノードDシ
ステム4からの応答のいずれかがノードAシステム1に
送信されてくれば、即ちに応答がコミット完了応答であ
るか否かをトランザクション管理処理部7で判定する
(1316)。In the node A system 1, if the communication control processing unit 10 receives (1315) and either the response from the node B system 2 or the response from the node D system 4 is transmitted to the node A system 1, that is, The transaction management processing unit 7 determines whether the response is a commit completion response (1316).
送信されて来た応答がコミット完了応答であれば、デー
タ管理処理部8を通じてデータベース9でコミット処理
が実行され(1317)、トランザクショントリー情報によ
り自ノードでコミットが完了すればトランザクションは
終了しても良いと認識しているので、トランザクション
は終了する(1318)。ここではノードDシステムからの
応答が早く返ってきた例を示す。If the sent response is the commit completion response, the commit process is executed in the database 9 through the data management processing unit 8 (1317), and if the commit is completed in the own node according to the transaction tree information, the transaction is completed. Since we know it is good, the transaction ends (1318). Here, an example in which the response from the node D system is returned early is shown.
第13図からもわかる様に、トランザクション終了時に、
ノードAシステム1,ノードBシステム2,ノードCシステ
ム3,ノードDシステム間の交信回数は(相手ノード数+
1)×2回=8回であり、第10図の例より減少する。As you can see from Figure 13, at the end of the transaction,
The number of communications between node A system 1, node B system 2, node C system 3, node D system is (number of partner nodes +
1) × 2 times = 8 times, which is smaller than the example in FIG.
第14図は、本発明のトランザクショントリー(第6図)
の認識による1トランザクションの流れであるが、ノー
ドCシステム3でコミット準備が失敗した場合、どの様
にしてトランザクションの整合性を保つかを示した図だ
ある。FIG. 14 is a transaction tree of the present invention (FIG. 6).
The flow of one transaction by recognizing the above is a diagram showing how to maintain transaction consistency when commit preparation fails in the node C system 3.
トランザクション開始要求(1000)からノードCシステ
ム3による両ノードからのコミット準備要求を判定する
(1209)までは第12図と同じ処理であるが、ノードCシ
ステム3においてデータ管理処理部28を通じてデータベ
ース29でコミット準備処理が失敗(1410)すると、次に
ロールバック処理を行う(1411)。The process from the transaction start request (1000) to the commit preparation request from both nodes by the node C system 3 (1209) is the same as in FIG. 12, but in the node C system 3, the database 29 is executed through the data management processing unit 28. If the commit preparation processing fails in (1410), rollback processing is performed next (1411).
トランザクション管理処理部27に制御が戻ってくると、
トランザクショントリー情報とロールバック完了応答を
一緒に通信制御処理部30を用いてトランザクショントリ
ー情報に従ったノードBシステム2とノードDシステム
4に送る(1412)。When control is returned to the transaction management processing unit 27,
The transaction tree information and the rollback completion response are sent together to the node B system 2 and the node D system 4 according to the transaction tree information using the communication control processing unit 30 (1412).
ノードBシステム2,ノードDシステム4ではそれぞれの
通信制御処理部が受信し(1413,1416)、トランザクシ
ョントリー情報はトランザクショントリー管理部16,36
が、ノードCシステムからの応答はトランザクション管
理処理部17,37がそれぞれ認識し、応答がロールバック
完了応答なので、各データ管理処理部18,38を通じて各
々のデータベース19,39においてロールバック処理が実
行され(1414,1417)、制御がそれぞれのトランザクシ
ョン管理処理部17,37に戻って来ると、トランザクショ
ントリー情報とロールバック完了応答を一緒に、各通信
制御処理部20,40から、トランザクショントリー情報に
従ったノードAシステム1に送られる(1415,1418)。In the node B system 2 and the node D system 4, each communication control processing unit receives (1413, 1416), and the transaction tree information is transaction tree management units 16, 36.
However, the transaction management processing units 17 and 37 recognize the response from the node C system, and the response is a rollback completion response. Therefore, the rollback processing is executed in the databases 19 and 39 through the data management processing units 18 and 38, respectively. (1414,1417) and control returns to the respective transaction management processing units 17,37, the transaction tree information and rollback completion response are sent together from each communication control processing unit 20,40 to the transaction tree information. It is sent to the following node A system 1 (1415, 1418).
もう一端であるノードCシステム3に対しては、既にロ
ールバック完了応答を受信しているので、ロールバック
完了応答は再度送信しない。Since the rollback completion response has already been received for the other end, the node C system 3, the rollback completion response is not transmitted again.
ノードAシステム1では、通信制御処理部10が受信し
(1419)、ノードBシステム2からの応答か、ノードD
システム4からの応答いずれかがノードAシステム1に
送信されてくれば、即ちに受信した応答がコミット完了
応答であるか否かをトランザクション管理処理部7で判
定する(1430)。送信されてきた応答がロールバック完
了応答であれば、データ管理処理部8を通じてデータベ
ース9でロールバック処理が実行され(1431)、トラン
ザクショントリー情報により自ノードでロールバックが
完了すればトランザクションは終了しても良いと認識し
ているのでトランザクションは終了する(1432)。ここ
では、ノードBシステム2からの応答が早く返ってきた
例を示している。In the node A system 1, the communication control processing unit 10 receives (1419), and either the response from the node B system 2 or the node D
If any response from the system 4 is transmitted to the node A system 1, that is, the transaction management processing unit 7 determines whether the received response is a commit completion response (1430). If the response sent is a rollback completion response, the data management processing unit 8 executes rollback processing in the database 9 (1431), and if the rollback is completed in the own node according to the transaction tree information, the transaction ends. Since it recognizes that it is okay, the transaction ends (1432). Here, an example is shown in which the response from the node B system 2 is returned early.
第15図は、本発明のトランザクショントリー(第6図)
の認識による1トランザクションの流れであるが、ノー
ドBシステム2でコミット準備が失敗した場合、どの様
にしてトランザクションの整合性を保つかを示した図で
ある。FIG. 15 shows the transaction tree of the present invention (FIG. 6).
It is a flow of one transaction by recognizing the above, but is a diagram showing how to maintain the transaction consistency when the commit preparation fails in the node B system 2.
トランザクション開始要求(1000)からノードAシステ
ムがコミット準備要求とトランザクショントリー情報を
ノードBシステム2、ノードDシステム4に送信し、ノ
ードBシステム2、ノードDシステム4では、各通信制
御処理部が受信し(1202,1205)、トランザクショント
リー情報はトランザクショントリー管理部16,36がコミ
ット準備要求はトランザクション管理処理部17,37がさ
れぞれ認識するまでは同じ処理であるが、ノードBシス
テム2がデータ管理処理部18を通じてデータベース19で
コミット準備処理を実行したが、ここで失敗し(150
3)、即ちにロールバック処理を行う(1504)。From the transaction start request (1000), the node A system sends a commit preparation request and transaction tree information to the node B system 2 and node D system 4, and in the node B system 2 and node D system 4, each communication control processing unit receives them. (1202, 1205), the transaction tree information is the same until the transaction tree management units 16 and 36 recognize the commit preparation request, and the transaction management processing units 17 and 37 recognize the transaction preparation information. The commit preparation process was executed in the database 19 through the management processing unit 18, but it failed here (150
3) That is, the rollback process is performed (1504).
トランザクション管理処理部17に制御が戻ってくると、
トランザクショントリー情報に従い、トランザクション
トリー情報と一緒にノードAシステム1に対してはロー
ルバック完了応答を、ノードCシステム3にはロールバ
ック処理要求を送る(1505),(ノードAシステム1か
らは、既にコミット準備要求を受信しているので、ロー
ルバック処理要求ではなくロールバック完了応答を送信
する。) ノードAシステム1では通信制御処理部10が受信し(15
06)、受信した応答が、コミット完了応答であるか否か
をトランザクション管理処理部7で判定し(1507)、ロ
ールバック完了応答であるのでデータ管理処理部8を通
じてデータベース9でロールバック処理を行う(150
8)。トランザクショントリー情報により、自ノードで
ロールバックが完了すればトランザクションは終了して
も良いと認識しているのでトランザクションは終了する
(1509)。When the control returns to the transaction management processing unit 17,
According to the transaction tree information, a rollback completion response is sent to the node A system 1 together with the transaction tree information, and a rollback processing request is sent to the node C system 3 (1505). Since the commit preparation request is received, the rollback completion response is transmitted instead of the rollback processing request.) In the node A system 1, the communication control processing unit 10 receives (15
06), the transaction management processing unit 7 determines whether the received response is a commit completion response (1507). Since it is a rollback completion response, rollback processing is performed in the database 9 through the data management processing unit 8. (150
8). Since the transaction tree information recognizes that the transaction may be terminated if the rollback is completed in the own node, the transaction is terminated (1509).
一方、ノードDシステム4は第12図と同様に、ノードA
システム1よりコミット準備要求を送信(1205)しコミ
ット準備を行い(1207)コミット準備要求をノードCシ
ステム3に送信する(1206)。On the other hand, the node D system 4 is similar to the node A in FIG.
The system 1 sends a commit preparation request (1205) and prepares for commit (1207), and sends a commit preparation request to the node C system 3 (1206).
もう一端であるノードAシステム1に対しては、既にコ
ミット準備要求を受信しているので、コミット準備要求
は再度送信しない。Since the commit preparation request has already been received for the other end, the node A system 1, the commit preparation request is not transmitted again.
ノードCシステム3では、通信制御処理部30が受信し
(1513)、トランザクショントリー情報はトランザクシ
ョントリー管理部26が、ノードBシステム2,ノードDシ
ステム4からの要求はトランザクション管理処理部27が
認識する。両ノードともコミット準備要求を送信して来
たか否かの判定を行い(1514)ノードBシステムからは
ロールバック要求を、ノードDシステムからはコミット
準備要求を受信したので、即ちにロールバック処理を行
い(1515)、ノードDのシステム4に対してのみロール
バック完了応答を送信する(1516)。(ノードBのシス
テムからはロールバック要求を受信したのでロールバッ
ク完了応答は送信しない。) ノードDシステム4では、通信制御処理部40が受信し
(1517)、トランザクショントリー情報はトランザクシ
ョントリー管理部36が、ロールバック完了応答はトラン
ザクション管理処理部37が認識し、データ管理処理部38
を通じてデータベース39でロールバック処理を行い(15
18)制御がトランザクション管理処理部37に戻って来る
とトランザクショントリー情報とロールバック完了応答
を一緒に、通信制御処理部40を用いてトランザクション
トリー情報に従ったノードAシステム1に送る(151
9)。In the node C system 3, the communication control processing unit 30 receives (1513), the transaction tree information is recognized by the transaction tree management unit 26, and the requests from the node B system 2 and the node D system 4 are recognized by the transaction management processing unit 27. . Both nodes judge whether or not they have transmitted the commit preparation request (1514). Since the rollback request is received from the node B system and the commit preparation request is received from the node D system, that is, the rollback process is executed. The operation is performed (1515), and the rollback completion response is transmitted only to the system 4 of the node D (1516). (Since the rollback request has been received from the node B system, the rollback completion response is not transmitted.) In the node D system 4, the communication control processing unit 40 receives (1517), and the transaction tree information is transaction tree management unit 36. However, the rollback completion response is recognized by the transaction management processing unit 37, and the data management processing unit 38
Rollback processing is performed on the database 39 through (15
18) When the control returns to the transaction management processing unit 37, the transaction tree information and the rollback completion response are sent together to the node A system 1 according to the transaction tree information using the communication control processing unit 40 (151).
9).
もう一端であるノードCシステム3に対しては、既にロ
ールバック完了応答を受信しているので、ロールバック
完了応答は再度送信しない。Since the rollback completion response has already been received for the other end, the node C system 3, the rollback completion response is not transmitted again.
ノードAシステム1では、既にノードBシステム2から
のロールバック完了応答を受信してロールバック処理を
実行しているので何ら処理は行わない。Since the node A system 1 has already received the rollback completion response from the node B system 2 and executed the rollback process, no process is performed.
第16図は、本発明のトランザクショントリー(トランザ
クショントリーは第3図、トランザクショントリー情報
は第8図)を利用し、更にトランザクションを決定する
ノード(コミット準備処理の結果によりコミット処理、
またはロールバック処理を行ないコミット及びロールバ
ック完了応答を送信するノードを示す)が、トランザク
ション完了応答をブロードキャスト化して、当該トラン
ザクションに関係した全ノードに対して送信する1トラ
ンザクションの流れ図である。FIG. 16 uses a transaction tree (transaction tree in FIG. 3 and transaction tree information in FIG. 8) of the present invention, and further determines a transaction node (commit processing depending on the result of commit preparation processing,
Or showing a node that performs rollback processing and sends a commit and rollback completion response) is a flow chart of one transaction in which a transaction completion response is broadcast and sent to all nodes related to the transaction.
トランザクション開始要求(1000)からノードCシステ
ム3が、データベース29でコミット準備を実行し(121
0)、コミット準備が完了すると即ちにコミット処理を
実行する(1211)までは第12図と同じ処理であるが、ト
ランザクション管理処理部27に制御が戻ってくると、コ
ミッタ完了応答とトランザクション情報をトランザクシ
ョントリー情報により通信制御処理部30を用いて、当該
トランザクションに関係した全ノードのシステム(ノー
ドAシステム1,ノードBシステム2,ノードDシステム
4)に対して送信する(1601)。From the transaction start request (1000), the node C system 3 executes the commit preparation in the database 29 (121
0), when the commit preparation is completed, that is, until the commit process is executed (1211), the process is the same as that of FIG. 12, but when control is returned to the transaction management processing unit 27, the committer completion response and the transaction information are displayed. Using the transaction tree information, the communication control processing unit 30 is used to transmit to the systems (node A system 1, node B system 2, node D system 4) of all nodes related to the transaction (1601).
ノードAシステム1,ノードBシステム2,ノードDシステ
ム4では各通信制御処理部10,20,40が受信し(1604,160
2,1603)、トランザクショントリー情報はトランザクシ
ョントリー管理部6,16,36が、ノードCシステムからの
コミット完了応答はトランザクション管理処理部7,17,3
7がそれぞれ認識し、応答がコミット完了応答であれば
各データ管理処理部8,18,38を通じて各々のデータベー
ス9,19,39でコミット処理を実行し(1610,1605,160
6)、制御がそれぞれのトランザクション管理処理部7,1
7,37に戻って来ると、ノードAシステム1では、トラン
ザクショントリー情報により自ノードでコミットが完了
すればトランザクションは終了しても良いと認識してい
るので、トランザクションは終了する(1611)。In the node A system 1, the node B system 2, and the node D system 4, each communication control processing unit 10, 20, 40 receives (1604, 160
2,1603), the transaction tree information is provided by the transaction tree management units 6,16,36, and the commit completion response from the node C system is provided by the transaction management processing units 7,17,3.
7 recognizes each, and if the response is a commit completion response, commit processing is executed in each database 9, 19, 39 through each data management processing unit 8, 18, 38 (1610, 1605, 160).
6), control is performed by each transaction management processing unit 7,1
When returning to 7,37, the node A system 1 recognizes from the transaction tree information that the transaction may be completed if the commit is completed in the own node, and the transaction is completed (1611).
ノードBシステム2,ノードDシステム4は、トランザク
ショントリー情報でブロードキャストによってコミット
完了応答を受信したことを認識できる為、ノードAシス
テム1は既にトランザクションを終了したとしてコミッ
ク完了応答はノードAシステム1には送信しない。Since the node B system 2 and the node D system 4 can recognize that the commit completion response has been received by broadcasting in the transaction tree information, the node A system 1 assumes that the transaction has already been completed and the comic completion response is not sent to the node A system 1. Do not send.
ノードAシステム1は、ノードBシステム2,ノードDシ
ステム4からのコミット完了応答送信を待たずにトラン
ザクション処理を早く完了させる事が可能となる。The node A system 1 can quickly complete the transaction processing without waiting for the transmission of the commit completion response from the node B system 2 and the node D system 4.
また、交信回数は第10図,第12図の場合と比較して明ら
かに減少する。Also, the number of communications is clearly reduced compared to the cases of Figs.
これは、第13図,第14図,第15図の場合にも同様に適用
可能である。This is also applicable to the cases of FIGS. 13, 14, and 15.
第9図は、第7図のトランザクショントリー情報を予め
各ノードのトランザクショントリー管理部に登録してお
き、トランザクション終了処理開始の際に第9図のトラ
ンザクショントリー情報を送信する事で、第7図に示す
様な情報により、データの送受信を行う事が可能となる
トランザクションパターン認識化用のトランザクション
トリー情報である。これにより、データの送受信毎にト
ランザクショントリー情報も送受信しなくて済む。FIG. 9 shows that the transaction tree information of FIG. 7 is registered in advance in the transaction tree management unit of each node, and the transaction tree information of FIG. It is transaction tree information for transaction pattern recognition that enables data to be transmitted and received by the information as shown in FIG. As a result, it is not necessary to transmit / receive transaction tree information each time data is transmitted / received.
1トランザクションの流れは第11図,第12図,第13図,
第14図,第15図と全く変わらない。The flow of one transaction is shown in Fig. 11, Fig. 12, Fig. 13,
It is completely the same as Fig.14 and Fig.15.
本発明により、環状のネットワーク構成を利用した分散
システムにおいて、トランザクション終了を行うノード
から環状のネットワークの両方向にコミット準備要求を
送信し、これら2つの要求に対する回答が戻ってきた時
にトランザクションの終了処理を行うことで、交信回数
の削減を行うことができ、システムの性能向上に役立つ
という効果がある。According to the present invention, in a distributed system using a ring network configuration, a node that performs transaction termination sends a commit preparation request in both directions of the ring network, and when the responses to these two requests are returned, transaction end processing is performed. By doing so, the number of communications can be reduced, which is effective in improving system performance.
第1図は、4つのノードが存在する分散システムの構成
図、第2図は、従来の1対nの関係のトランザクション
トリーを示す図、第3図は、従来のトランザクショント
リー管理部が認識していた1対nの関係のトランザクシ
ョントリー情報を示す図、第4図は、本発明の一実施例
の2ノードによるトランザクショントリーを示す図、第
5図は、本発明の一実施例の2ノードの各トランザクシ
ョントリー管理部が認識したトランザクショントリー情
報を示す図、第6図は、本発明の一実施例の環状のトラ
ンザクショントリーを示す図、第7図は、本発明の一実
施例の各ノードのトランザクショントリー管理部が認識
したトランザクショントリー情報を示す図、第8図は、
本発明の一実施例のブロードキャスト化によって送信す
るトランザクショントリー情報を示す図、第9図は、本
発明の一実施例のパターン認識化したトランザクション
トリー情報を示す図、第10図は、従来の1トランザクシ
ョンの流れ図、第11図は、本発明の一実施例の第4図の
トランザクショントリーを使用した2つのノードにおけ
る1トランザクションの流れ図、第12図、第13図は、本
発明の一実施例の第6図のトランザクショントリーを使
用した1トランザクションの流れ図、第14図,第15図
は、第6図のトランザクショントリーを使用した、ある
ノードがコミット準備処理に失敗した場合の1トランザ
クションの流れ図、第16図は、本発明の一実施例のブロ
ードキャスト化した処理の1トランザクションの流れ図
である。 1,2,3,4……各ノードの分散システム、5……アプリケ
ーションプログラム、6,16,26,36……トランザクション
トリー管理部、7,17,27,37……トランザクション管理処
理部、8,18,28,38……データ管理処理部、9,19,29,39…
…データベース、10,20,30,40……通信制御処理部、41
……通信ネットワーク。FIG. 1 is a configuration diagram of a distributed system having four nodes, FIG. 2 is a diagram showing a conventional transaction tree having a one-to-n relationship, and FIG. 3 is a diagram recognized by a conventional transaction tree management unit. FIG. 4 is a diagram showing transaction tree information of a one-to-n relationship, FIG. 4 is a diagram showing transaction tree by two nodes of one embodiment of the present invention, and FIG. 5 is two nodes of one embodiment of the present invention. Showing transaction tree information recognized by each transaction tree management unit of FIG. 6, FIG. 6 is a diagram showing a circular transaction tree of one embodiment of the present invention, and FIG. 7 is each node of one embodiment of the present invention. FIG. 8 shows transaction tree information recognized by the transaction tree management unit of FIG.
FIG. 9 is a diagram showing transaction tree information transmitted by broadcasting according to an embodiment of the present invention, FIG. 9 is a diagram showing transaction tree information which is pattern-recognized according to one embodiment of the present invention, and FIG. A transaction flow chart, FIG. 11 is a flow chart of one transaction in two nodes using the transaction tree of FIG. 4 of one embodiment of the present invention, and FIGS. 12 and 13 are of the embodiment of the present invention. Flow chart of one transaction using the transaction tree of Fig. 6, Figs. 14 and 15 are flow charts of one transaction when a node fails the commit preparation process using the transaction tree of Fig. 6, Fig. FIG. 16 is a flow chart of one transaction of the broadcasted processing according to the embodiment of the present invention. 1,2,3,4 …… Distributed system of each node, 5 …… Application program, 6,16,26,36 …… Transaction tree management unit, 7,17,27,37 …… Transaction management processing unit, 8 , 18,28,38 …… Data management processor, 9,19,29,39…
… Database, 10, 20, 30, 40 …… Communication control processing unit, 41
...... Communication network.
フロントページの続き (56)参考文献 情報処理学会研究報告88「84」(1988− 11−17)(データーベース・システム研究 会報告NO.68−5) 疋田定幸「COMシリーズ図解分散型デ ータベースシステム入門」(1989−5− 25)、オーム社、P99−107 松下温「情報処理シリーズ5コンピュ タ・ネットワーク」(1983−10−25)培風 館P.220Front Page Continuation (56) References Information Processing Society of Japan Research Report 88 "84" (1988-11-17) (Database System Research Group Report No. 68-5) Sadayuki Hikita "COM Series Graphical Distributed Database System Introduction "(1989-5-25), Ohmsha, P99-107 Atsushi Matsushita" Information Processing Series 5 Computer Network "(1983-10-25) P.F. 220
Claims (3)
構成を利用した分散システムにおいて、 a) トランザクション終了処理を行うノードから環状
のネットワークの両方向にコミット準備要求を送信し、 b) コミット準備要求を受けたノードは、コミット準
備処理を行い、コミット準備要求を送ったノードと反対
方向のノードのコミット準備要求を送り、 c) 隣合う両端のノードからコミット準備要求を受け
るノードに達するまで上記b)の処理をくり返し、 d) 隣合う両端のノードからコミット準備要求を受け
たノードは、コミット準備処理とコミット処理を行い、
これらの処理に成功した場合は隣合う両端のノードにコ
ミット要求をし、これらの処理に失敗した場合は隣合う
両端のノードにロールバック要求を送り、 e) 要求を受けたノードは、指定されたコミット処理
又はロールバック処理を行い、要求を送ったノードと反
対方向のノードに次の要求を送り、 f) 上記a)のトランザクション終了処理を行うノー
ドに達するまで上記e)の処理を繰り返し、 g) トランザクション終了処理を行うノードは、受け
取った要求に応じてコミット処理又はロールバック処理
を行ってトランザクション処理を終了することを特徴と
するトランザクション処理の終了方法。1. In a distributed system having a ring network configuration having a plurality of nodes, a) a commit preparation request is sent from a node which performs transaction termination processing to both directions of the ring network, and b) a commit preparation request. The node which has received the commit preparation process sends a commit preparation request of a node in the opposite direction to the node which has sent the commit preparation request, and c) the above b until reaching the node which receives the commit preparation request from the nodes on both ends adjacent to each other. ) Is repeated, and d) the node that receives the commit preparation request from the nodes on both ends adjacent to each other performs the commit preparation processing and the commit processing,
If these processes are successful, a commit request is sent to the adjacent nodes, and if these processes are unsuccessful, a rollback request is sent to the adjacent nodes. E) The node that receives the request is designated. Commit process or rollback process, send the next request to the node in the opposite direction to the node that sent the request, and f) repeat the process of e) until the node that performs the transaction end process of a) above is reached, g) A method of terminating transaction processing, characterized in that a node that performs transaction termination processing performs commit processing or rollback processing according to a received request to terminate transaction processing.
を受けたノードでコミット準備処理が失敗した場合は、
コミット準備要求を送ったノードと反対方向のノードに
コミット準備要求に代えてロールバック要求を送り、 i) 上記d)のステップでは、コミット準備処理とコ
ミット処理の代わりにロールバックを行い、隣合う両端
のノードにロールバック要求を送ることを特徴とするト
ランザクション処理の終了方法。2. The method according to claim 1, wherein in the step b) above, if the commit preparation process fails in the node that receives the commit preparation request,
Send a rollback request instead of the commit preparation request to the node in the opposite direction to the node that sent the commit preparation request. I) In step d) above, rollback is performed instead of the commit preparation process and the commit process, and they are adjacent to each other. A method for terminating transaction processing, characterized by sending a rollback request to the nodes at both ends.
上記隣合う両端のノードにロールバック要求を送るかわ
りに、ブロードキャスト化して、当該トランザクション
処理に関係した他のすべてのノードに対してロールバッ
ク要求を送信することを特徴とするトランザクション処
理の終了方法。3. In the step i) of claim 2,
A method for terminating transaction processing, characterized in that instead of sending a rollback request to the nodes on both ends adjacent to each other, the rollback request is broadcast and the rollback request is sent to all other nodes related to the transaction processing.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1229174A JPH077351B2 (en) | 1989-09-06 | 1989-09-06 | How to end transaction processing |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1229174A JPH077351B2 (en) | 1989-09-06 | 1989-09-06 | How to end transaction processing |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH0392945A JPH0392945A (en) | 1991-04-18 |
| JPH077351B2 true JPH077351B2 (en) | 1995-01-30 |
Family
ID=16887951
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP1229174A Expired - Lifetime JPH077351B2 (en) | 1989-09-06 | 1989-09-06 | How to end transaction processing |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH077351B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2006057061A1 (en) * | 2004-11-29 | 2006-06-01 | Fujitsu Limited | Distributed transaction processing method, device, and program |
| JP5783008B2 (en) * | 2011-11-21 | 2015-09-24 | 富士通株式会社 | Storage device, storage system, data update method, and data management program |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS59111564A (en) * | 1982-12-17 | 1984-06-27 | Fujitsu Ltd | Cyclic two phase commitment controlling system |
-
1989
- 1989-09-06 JP JP1229174A patent/JPH077351B2/en not_active Expired - Lifetime
Non-Patent Citations (3)
| Title |
|---|
| 情報処理学会研究報告88「84」(1988−11−17)(データーベース・システム研究会報告NO.68−5) |
| 松下温「情報処理シリーズ5コンピュタ・ネットワーク」(1983−10−25)培風館P.220 |
| 疋田定幸「COMシリーズ図解分散型データベースシステム入門」(1989−5−25)、オーム社、P99−107 |
Also Published As
| Publication number | Publication date |
|---|---|
| JPH0392945A (en) | 1991-04-18 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2675968B2 (en) | Extension of subscriber distributed two-phase commit protocol | |
| JPH0552973B2 (en) | ||
| US7624112B2 (en) | Asynchronously storing transaction information from memory to a persistent storage | |
| EP0477123B1 (en) | A method of managing unit-of-work identifiers in a distributed transaction processing system | |
| EP0101609B1 (en) | Data communication method | |
| JP3525933B2 (en) | Synchronization procedure at the routing node | |
| JP2002500791A (en) | A method for doing transactions in a distributed database | |
| JPS5835297B2 (en) | data processing system | |
| CN106325978A (en) | Distributed transaction processing method and apparatus | |
| US5258982A (en) | Method of excluding inactive nodes from two-phase commit operations in a distributed transaction processing system | |
| CN116775325A (en) | Distributed transaction processing method and system | |
| Wang et al. | Distributed nonblocking commit protocols for many-party cross-blockchain transactions | |
| Raz | The dynamic two phase commitment (d2pc) protocol | |
| JP3462064B2 (en) | Distributed simulation system | |
| JPH077351B2 (en) | How to end transaction processing | |
| JP2643356B2 (en) | Transaction consistency assurance control method in distributed system | |
| EP1127310B1 (en) | Method and apparatus for evaluating a data processing request performed by distributed processes | |
| KR100233238B1 (en) | Two-stage acknowledgment communication method using multiple threads in distributed transaction system | |
| JPH0464146A (en) | Optimizing system for commitment processing in distributed system | |
| WO2003038614A2 (en) | Method and system for guaranteeing sequential consistency in distributed computations | |
| CN112351053B (en) | Remote access method, device, equipment and medium for embedded database | |
| EP4726568A1 (en) | Sharding method for improving scalability in byzantine environment | |
| JPH08235096A (en) | Inter-process link connection setting system and its setting method | |
| JPH06259388A (en) | Distributed transaction commit control method for distributed system | |
| WO2023124431A1 (en) | Database processing method and related device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080130 Year of fee payment: 13 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080130 Year of fee payment: 13 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090130 Year of fee payment: 14 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090130 Year of fee payment: 14 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100130 Year of fee payment: 15 |
|
| EXPY | Cancellation because of completion of term | ||
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100130 Year of fee payment: 15 |