JPH08235038A - Resource updating decision system - Google Patents

Resource updating decision system

Info

Publication number
JPH08235038A
JPH08235038A JP7064831A JP6483195A JPH08235038A JP H08235038 A JPH08235038 A JP H08235038A JP 7064831 A JP7064831 A JP 7064831A JP 6483195 A JP6483195 A JP 6483195A JP H08235038 A JPH08235038 A JP H08235038A
Authority
JP
Japan
Prior art keywords
update
flag
updating
resource
actual
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.)
Pending
Application number
JP7064831A
Other languages
Japanese (ja)
Inventor
Kenichi Abe
賢一 阿部
Hitoshi Kirita
仁 切田
Toshiyuki Inoue
利行 井上
Tadao Odanaka
忠雄 小田中
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
N T T DATA TSUSHIN KK
NTT Data Corp
Original Assignee
N T T DATA TSUSHIN KK
NTT Data Communications Systems Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by N T T DATA TSUSHIN KK, NTT Data Communications Systems Corp filed Critical N T T DATA TSUSHIN KK
Priority to JP7064831A priority Critical patent/JPH08235038A/en
Priority to PCT/JP1996/000440 priority patent/WO1996027157A1/en
Priority to US08/737,040 priority patent/US6052695A/en
Priority to EP96903243A priority patent/EP0758114A4/en
Publication of JPH08235038A publication Critical patent/JPH08235038A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PURPOSE: To provide a resource updating decision system which decides the necessity for execution of the actual updating of resources in a resource management system of a data base, etc. CONSTITUTION: The updating flags are prepared at the prescribed points or an updating management table 33 and then allocated to the transactions under processing. In a transaction processing mode, a work program 21 produces an updating instruction of resources and an updating flag history management part 23 acquires the inverted value of the updating flags allocated to the transactions on the table 33 through an updating flag history file 25. Then an updating flag management part 31 gives an actual updating instruction to a resource manager 29 to carry out the actual updating of resources and then to invert the value of the updating flag of each transaction. If a fault occurs during the actual updating processing, the part 23 compares the value of the updating flag corresponding to the relevant transaction with the corresponding inverted value stored in an updating flag history management file via an updating confirmation request part 27 after the fault is recovered. If no coincidence is secured between both value, it is decided that the real updating processing is not carried out yet.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、データベースやメモリ
テーブル等の資源を管理して、トランザクションを処理
する資源管理システムにおいて、トランザクション処理
において資源の実更新が確かに実行されたか否かを後に
判定するための資源更新判定方式及び方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention manages resources such as a database and a memory table to process a transaction, and subsequently determines whether or not the actual updating of the resource is actually executed in the transaction processing. The present invention relates to a resource update determination method and method.

【0002】[0002]

【従来の技術】データベースなどの資源の管理システム
において、トランザクションが処理される度に資源が更
新されるが、トランザクション処理中にシステムダウン
や通信障害などの障害が発生すると、資源の実更新が実
行されないことがある。周知のように、トランザクショ
ン処理は中途半端な状態のままで終了してはならず、完
遂(コミット)されるか、全く処理されない(アボー
ト)かのいずれかの状態で終わらなくてはならない。そ
のため、障害が発生した場合には、障害復旧後に障害発
生時のトランザクション処理で資源の実更新が実行され
たか否かをチェックし、更新が未実行ならば、例えば、
更新をやり直してそのトランザクションを実際にコミッ
トする、或は、トランザクション処理開始前の状態にロ
ールバックしてそのトランザクションをアボートする、
といったリカバリ処理を行わなくてはならない。
2. Description of the Related Art In a resource management system such as a database, resources are updated every time a transaction is processed. However, if a failure such as a system failure or communication failure occurs during transaction processing, the actual updating of resources is executed. It may not be done. As is well known, transaction processing must not end in a half-finished state, but must either be completed (committed) or not processed (abort) at all. Therefore, when a failure occurs, it is checked after the failure recovery whether the actual update of the resource was executed in the transaction processing at the time of the failure occurrence. If the update is not executed, for example,
Redo the update and actually commit the transaction, or roll back to the state before the transaction processing started and abort the transaction.
Such a recovery process must be performed.

【0003】図1は、資源の実更新が実行されたか否か
判定するための従来の方式の一例を示す。尚、図1は、
ネットワーク3で接続された2つのサーバ(=処理装
置)1a、1bの一方1bが資源を管理し、他方1aが
その資源に対する更新をコントロールするような場合を
示しているが、これはあくまで例示にずぎず、別のケー
ス(例えば、一つのサーバ内で資源管理と更新コントロ
ールを共に処理するケース)であっても従来技術の本質
は変わらない。
FIG. 1 shows an example of a conventional method for determining whether an actual resource update has been executed. In addition, FIG.
The case where one of the two servers (= processing devices) 1a and 1b connected by the network 3 manages the resource and the other 1a controls the update of the resource is shown, but this is merely an example. As a matter of course, even in another case (for example, the case where the resource management and the update control are processed together in one server), the essence of the conventional technique does not change.

【0004】図1に示すように、一方のサーバ1aにお
いて、トランザクション処理の中心的主体となる業務処
理プログラム(以下、APと略称する)5は、トランザ
クション処理時に資源更新を他方のサーバ1bに依頼す
る更新依頼部13と、障害復旧時などに他のサーバ1b
での資源更新が完了しているか否かを確認する更新確認
部15とを有する。そして、このAP5は、資源更新の
履歴を記録した履歴ファイル7を有している。
As shown in FIG. 1, in one server 1a, a business processing program (hereinafter abbreviated as AP) 5, which is the main subject of transaction processing, requests the other server 1b to update resources during transaction processing. Update requesting unit 13 and another server 1b for recovery from a failure
And an update confirmation unit 15 for confirming whether or not the resource update has been completed. The AP 5 has a history file 7 recording the history of resource updates.

【0005】また、他方のサーバ9においては、リソー
スマネージャ9がデータベース11等の資源を管理して
おり、資源中の各レコード毎にその資源の実更新の有無
を記録した履歴情報を記録するためのエリアが設けられ
ている。
In the other server 9, the resource manager 9 manages resources such as the database 11 and records history information indicating whether or not the resource is actually updated for each record in the resource. Area is provided.

【0006】トランザクション処理では、AP5の更新
依頼部13が、まず、タイムスタンプを取得し、更新レ
コードとタイムスタンプを履歴ファイル7に書込み、そ
の後、リソースマネージャ9に対し資源内のレコードの
更新とタイムスタンプの書込みを依頼する。この依頼を
受けたリソースマネージャ9は、データベース11内の
更新レコードに対応するエリアにタイムスタンプ等の履
歴情報を書込むと共に、その更新レコードの実更新を実
行する。
In the transaction processing, the update requesting unit 13 of the AP 5 first acquires a time stamp, writes the update record and the time stamp in the history file 7, and then instructs the resource manager 9 to update the record in the resource and the time. Ask to write a stamp. Upon receiving this request, the resource manager 9 writes history information such as a time stamp in the area corresponding to the update record in the database 11 and actually updates the update record.

【0007】システムダウンなどの障害が発生すると、
その障害復旧後の再起動時等に、AP5の更新確認部1
5が、まず履歴ファイル7より障害発生時の更新レコー
ドとタイムスタンプを読み込み、また、リソースマネー
ジャ9を通じてデータベース11中の対応する更新レコ
ードのタイムスタンプを読み込み、双方のタイムスタン
プを比較する。その結果、タイムスタンプが一致すれ
ば、実更新は実行済であると判断し、一致しなければ実
更新は未実行であると判断する。
When a failure such as system down occurs,
At the time of restart after the failure recovery, the update confirmation unit 1 of AP5
5 reads the update record and time stamp at the time of failure from the history file 7, reads the time stamp of the corresponding update record in the database 11 through the resource manager 9, and compares both time stamps. As a result, if the time stamps match, it is determined that the actual update has been executed, and if they do not match, it is determined that the actual update has not been executed.

【0008】[0008]

【発明が解決しようとする課題】上述の従来の方式の一
つの問題は、AP5が更新判定処理を行うようになって
いるため、AP5の構成が複雑になる。また、データベ
ース11には資源のレコード毎にエリアが設けられ、そ
こにタイムスタンプ等の比較的複雑な履歴情報が記録さ
れ、また、これに対応して履歴ファイル7にもタイムス
タンプと更新レコードが記録されるため、管理テーブル
11及び履歴ファイル7のサイズが大きくなり、無駄な
ファイル容量を必要としていた。
One of the problems of the above-mentioned conventional system is that the AP 5 is adapted to perform the update determination process, and therefore the configuration of the AP 5 becomes complicated. In addition, an area is provided in the database 11 for each resource record, and relatively complicated history information such as a time stamp is recorded therein, and correspondingly, a time stamp and an update record are also recorded in the history file 7. Since the data is recorded, the sizes of the management table 11 and the history file 7 are increased, and a useless file capacity is required.

【0009】従って、本発明の目的は、トランザクショ
ンを処理して資源を更新する資源管理システムにおい
て、できるだけ簡単なプログラム構成で、且つ少ないフ
ァイルエリアで資源の実更新の実行の有無を判定できる
資源更新判定方式を提供することにある。
Therefore, an object of the present invention is to provide a resource management system for processing a transaction and updating a resource, which is capable of determining whether or not an actual resource update is executed with a program structure as simple as possible and with a small file area. It is to provide a judgment method.

【0010】[0010]

【課題を解決するための手段】本発明の資源更新判定方
式は、トランザクションを処理する業務プログラムと、
処理中のトランザクションに割り当てられる更新フラグ
と、更新フラグの履歴を記録するための更新フラグ履歴
ファイルと、更新フラグの初期値を読み込み、業務プロ
グラムからの実更新命令の発行を契機として、前記初期
値の反転値を更新フラグ履歴ファイルに書込むフラグ書
込み部と、実更新命令に基づく資源の実更新が実行され
た場合、前記更新フラグを反転させる更新フラグ管理部
と、資源実更新の実行の有無について確認依頼を発生す
る更新確認依頼部と、この確認依頼を受けて、更新フラ
グの値と更新フラグ履歴ファイル内の反転値とを比較す
ることにより、資源実更新の実行の有無を確認するフラ
グチェック部とを備えることを特徴とする。
The resource update determination method of the present invention comprises a business program for processing a transaction,
The update flag assigned to the transaction being processed, the update flag history file for recording the history of the update flag, and the initial value of the update flag are read, and the initial value is triggered when the actual update command is issued from the business program. Flag writing unit that writes the inversion value of the update flag history file to the update flag history file, an update flag management unit that inverts the update flag when the actual update of the resource is executed based on the actual update instruction, and whether or not the actual resource update is executed The update confirmation requesting unit that issues a confirmation request, and the flag that confirms whether or not the actual resource update is executed by receiving the confirmation request and comparing the value of the update flag with the inverted value in the update flag history file. And a check unit.

【0011】[0011]

【作用】本発明の方式によれば、処理中のトランザクシ
ョンに対して更新フラグが割り当てられる。従って、更
新フラグは、並行処理されるトランザクションの個数分
だけ用意されていればよい。
According to the method of the present invention, the update flag is assigned to the transaction being processed. Therefore, the update flags may be prepared for the number of transactions processed in parallel.

【0012】或るトランザクション処理において、業務
プログラムが資源の実更新命令を発行すると、これを契
機として、そのトランザクションに割り当てられた更新
フラグの初期値(=トランザクション開始時のフラグ
値)の反転値が、更新フラグ履歴ファイルに記録され
る。また、この実更新命令によって資源の実更新が実行
されると、そのトランザクションに割当てられた更新フ
ラグの値が実際に反転される。一方、実更新処理中に障
害等が発生して実更新ができなかった場合は、更新フラ
グは反転されず初期値のままに維持される。従って、実
更新が実行された場合は、更新フラグの値と更新フラグ
履歴ファイルの記録とは一致することになり、一方、実
更新が失敗した場合は、両者は一致しないことになる。
In a transaction process, when a business program issues an actual resource update command, the inverted value of the initial value (= flag value at the start of the transaction) of the update flag assigned to the transaction is triggered by this. , Is recorded in the update flag history file. Further, when the actual update of the resource is executed by this actual update instruction, the value of the update flag assigned to the transaction is actually inverted. On the other hand, when a failure or the like occurs during the actual update processing and the actual update cannot be performed, the update flag is not inverted and is maintained at the initial value. Therefore, when the actual update is executed, the value of the update flag and the record of the update flag history file match, while when the actual update fails, the two do not match.

【0013】障害が発生した場合、その障害から回復し
た後に、その更新フラグの値と更新フラグ履歴ファイル
の記録とが照合され、両者が不一致であると、実更新が
未実行であると判定される。
When a failure occurs, the value of the update flag and the record of the update flag history file are collated after recovery from the failure, and if they do not match, it is determined that the actual update has not been executed. It

【0014】更新フラグや更新履歴ファイルを管理した
り確認依頼を発したりする処理は、業務アプリケーショ
ンとは別の処理部として設けることができる。それによ
り、業務アプリケーションは更新判定処理から解放さ
れ、簡素な構成になり得る。また、更新フラグや更新履
歴ファイルの構成も簡素化できるため、小さいファイル
サイズで構成できる。
The process of managing the update flag and the update history file and issuing the confirmation request can be provided as a processing unit separate from the business application. As a result, the business application can be released from the update determination process and have a simple configuration. Further, since the configuration of the update flag and the update history file can be simplified, the file size can be reduced.

【0015】[0015]

【実施例】図2は、本発明の更新判定処理方式を適用し
た資源管理システムの一実施例のシステム構成を示す。
FIG. 2 shows the system configuration of an embodiment of a resource management system to which the update determination processing method of the present invention is applied.

【0016】図2に示すように、ネットワーク3を介し
て2つのサーバ20a及び20bが接続されている。第
1のサーバ20aは、トランザクション処理の中心的主
体となる業務プログラム(AP)21を有する。また、
第2のサーバ20bは、トランザクション処理で更新さ
れるべきデータベースやテーブルやファイル等の資源
(図示せず)と、この資源を管理するリソースマネージ
ャ29とを有する。
As shown in FIG. 2, two servers 20a and 20b are connected via a network 3. The first server 20a has a business program (AP) 21, which is the main subject of transaction processing. Also,
The second server 20b has resources (not shown) such as databases, tables, and files to be updated in transaction processing, and a resource manager 29 that manages these resources.

【0017】以下、AP21を有する第1サーバ20a
を「主サーバ」、資源を管理する第2サーバ20bを
「従サーバ」と呼ぶ。実際には、2つのサーバ20a、
20bは同一構成であって、それぞれ主サーバにも従サ
ーバにも成り得るが、図2では、説明の都合上、第1サ
ーバ20aが主サーバ、第2サーバ20bが従サーバで
ある場合における、それぞれのサーバで機能する処理要
素のみを図示してある。
Hereinafter, the first server 20a having the AP 21
Is called a "main server", and the second server 20b that manages resources is called a "slave server". In fact, the two servers 20a,
Although 20b has the same configuration and can be a primary server and a secondary server, respectively, in FIG. 2, for convenience of description, in the case where the first server 20a is the primary server and the second server 20b is the secondary server, Only the processing elements that function on each server are shown.

【0018】主サーバ20aは、AP21の他に、更新
フラグ履歴管理部23と、更新フラグ履歴ファイル25
と、更新確認依頼部27とを備える。また、従サーバ2
0bは、リソースマネージャ29以外に、所定個数(本
実施例では3個)の更新フラグ管理部31a、31b、
31cと、更新管理テーブル33とを備える。
In addition to the AP 21, the main server 20a has an update flag history management section 23 and an update flag history file 25.
And an update confirmation request unit 27. In addition, the slave server 2
In addition to the resource manager 29, 0b is a predetermined number (three in this embodiment) of update flag management units 31a, 31b,
31c and an update management table 33.

【0019】従サーバ20bの更新管理テーブル33に
は、更新フラグ管理部31a、31b、31cと同個数
の更新フラグが設けられている。これら3個の更新フラ
グの各々は、ロック管理(空き/使用中)されており、
更新フラグ管理部31a、31b、31cの中のトラン
ザクションを受付けたものに、未ロックの更新フラグ中
の1つが割り当てられる。図2は、更新フラグ管理部3
1aに更新フラグidが“1”の更新フラグが割り当て
られた例を示している。各更新フラグは、“0”又は
“1”の2値をとることができ、それにより資源の実更
新の実行の有無を表示するようになっている。
The update management table 33 of the slave server 20b is provided with the same number of update flags as the update flag management units 31a, 31b, 31c. Each of these three update flags is lock-managed (free / in use),
One of the unlocked update flags is assigned to the one that has accepted the transaction in the update flag management units 31a, 31b, 31c. FIG. 2 shows the update flag management unit 3
An example is shown in which the update flag with the update flag id "1" is assigned to 1a. Each update flag can take a binary value of "0" or "1", thereby displaying whether or not the actual update of the resource is executed.

【0020】従サーバ20bの更新フラグ管理部31
a、31b、31cは、それぞれ別個のトランザクショ
ン処理に割り当てられて、それぞれのトランザクション
処理で資源の実更新が実行されると対応する更新フラグ
を書き換える(反転させる)ものである。これら3個の
更新フラグ管理部31a、31b、31cを有すること
により、従サーバ20bは最大3つのトランザクション
処理を並行実行することができる。
The update flag management unit 31 of the slave server 20b
Each of a, 31b, and 31c is assigned to a separate transaction process and rewrites (inverts) the corresponding update flag when the actual update of the resource is executed in each transaction process. By having these three update flag management units 31a, 31b, 31c, the slave server 20b can execute a maximum of three transaction processes in parallel.

【0021】主サーバ20aの更新フラグ履歴管理部2
3は、概略次の3つの処理を行う。第1は、各トランザ
クション処理において、AP21からのフラグ制御命令
に基づき、従サーバ20bに更新フラグの反転値を問合
せる処理である。第2は、各トランザクション処理にお
いて、AP21が従サーバ20bに対して発行するコミ
ット(実更新)命令を契機として、先に依頼した更新フ
ラグの反転値を更新フラグ履歴ファイル25に取得する
機能である。第3は、障害が発生した場合、障害回復後
に、更新確認依頼部27からの依頼に応じて、従サーバ
20bに更新フラグの内容を問い合せる処理である。
Update flag history management unit 2 of the main server 20a
3 roughly performs the following three processes. First, in each transaction process, the sub-server 20b is inquired about the inverted value of the update flag based on the flag control command from the AP 21. The second is a function of acquiring the inverted value of the update flag requested earlier in the update flag history file 25 in response to a commit (actual update) command issued by the AP 21 to the slave server 20b in each transaction process. . The third is a process of inquiring the content of the update flag from the slave server 20b in response to a request from the update confirmation requesting unit 27 after the failure is recovered when the failure occurs.

【0022】更新フラグ履歴ファイル25には、上述し
た更新フラグ履歴管理部23によって、従サーバ20b
に問合せた各更新フラグの反転値が記録される。
In the update flag history file 25, the slave server 20b is stored in the update flag history management unit 23 described above.
The inverted value of each update flag inquired is recorded.

【0023】更新確認依頼部27は、障害が発生した場
合、障害回復後に、障害発生時のトランザクション処理
で資源の実更新が実行されたか否かの確認を行うこと
を、更新フラグ履歴管理部23に依頼するものである。
When a failure occurs, the update confirmation requesting section 27 confirms, after the failure recovery, whether or not the actual update of the resource has been executed in the transaction processing at the time of the failure occurrence. Is to ask.

【0024】更新フラグ履歴管理部23は、フラグ依頼
部33、第1フラグ書込み部35、フラグチェック部3
7及び確認結果返却部39を有する。また、更新フラグ
管理部31a、31b、31cの各々は、フラグ反転部
41、第2フラグ書込み部及びフラグ読み込み部45を
有する。
The update flag history management section 23 includes a flag request section 33, a first flag writing section 35, and a flag check section 3.
7 and a confirmation result return unit 39. Each of the update flag management units 31a, 31b, 31c has a flag inverting unit 41, a second flag writing unit and a flag reading unit 45.

【0025】図3は、以上の構成を持つ本システムにお
いて、通常にトランザクションを処理する時の各部の処
理流れを示したものである。
FIG. 3 shows a processing flow of each unit when a transaction is normally processed in the present system having the above configuration.

【0026】AP21が一つのトランザクションの処理
を開始すると、そのトランザクションに対し、トランザ
クションid割当て部32によりシステム内で一意のト
ランザクションidが割当てられる(S0)。次に、A
P21が、フラグ制御命令を更新フラグ履歴管理部23
に発行する(S1)。更新フラグ履歴管理部23では、
フラグ依頼部33がフラグ制御命令に応答して、そのト
ランザクションに割り当てられた一つの更新フラグ管理
部、例えば31aに対し、更新フラグ値の読み込み依頼
する(S2)。
When the AP 21 starts processing one transaction, the transaction id assigning section 32 assigns a unique transaction id in the system to the transaction (S0). Next, A
P21 updates the flag control command, flag history management unit 23
Is issued to (S1). In the update flag history management unit 23,
In response to the flag control command, the flag request unit 33 requests one update flag management unit, such as 31a, assigned to the transaction to read the update flag value (S2).

【0027】この読み込み依頼を受けた更新フラグ管理
部31aでは、フラグ反転部41が更新管理テーブル3
3から、対応する更新フラグの初期値(現在値)を読み
込む(S3、S4)。ここで、初期値は“0”又は
“1”であるが、ここでは例えば“0”であったとす
る。次に、フラグ反転部41は、この初期値“0”を反
転して、その反転結果“1”を更新フラグ履歴管理部2
3に返送する(S5)。更新フラグ履歴管理部23で
は、フラグ依頼部33が反転結果“1”を受け取り、こ
れをメモリ上に保持する。
In the update flag management unit 31a that has received this read request, the flag reversing unit 41 causes the update management table 3
The initial value (current value) of the corresponding update flag is read from S3 (S3, S4). Here, the initial value is "0" or "1", but here it is assumed to be "0", for example. Next, the flag inversion unit 41 inverts this initial value “0” and outputs the inversion result “1” to the update flag history management unit 2
It returns to 3 (S5). In the update flag history management unit 23, the flag request unit 33 receives the inversion result “1” and holds it in the memory.

【0028】AP21は、フラグ制御命令を発行した
後、資源の仮更新命令(更新されるべきレコードの指定
やレコードの更新内容等の情報が含まれている)を発行
する。この仮更新命令は、図示してないが、リソースマ
ネージャ29に渡され、リソースマネージャ29はこの
仮更新命令に従って、更新されるべき資源に仮更新を依
頼し、その資源において指定されたレコードの仮更新が
成功すると、リソースマネージャ29からAP21に仮
更新成功の旨が通知される。
After issuing the flag control instruction, the AP 21 issues a temporary resource update instruction (including information such as designation of a record to be updated and update content of the record). Although not shown, this temporary update command is passed to the resource manager 29, and the resource manager 29 requests the resource to be updated for temporary update according to this temporary update command, and temporarily records the record specified in the resource. When the update is successful, the resource manager 29 notifies the AP 21 that the temporary update is successful.

【0029】尚、この仮更新までの段階で、何等かの障
害が発生した場合には、当該トランザクションはロール
バックされるので、今までの処理結果は全て破棄され
て、トランザクション処理開始前の状態が復元される。
In the stage up to this temporary update, if any failure occurs, the transaction is rolled back, so all the processing results so far are discarded and the state before the transaction processing is started. Is restored.

【0030】さて、仮更新が成功した場合には、AP2
1は次に、資源の実更新(コミット)命令を更新フラグ
履歴管理部23に発行する(S6)。更新フラグ履歴管
理部23では、第1フラグ書込み部35がコミット命令
に応答して、先にメモリ上に保持した反転結果“1”を
対応するトランザクションid及び更新フラグの識別子
idと共に更新フラグ履歴ファイル25に書込む(S
7)。
If the temporary update is successful, AP2
1 then issues an actual update (commit) command of the resource to the update flag history management unit 23 (S6). In the update flag history management unit 23, the first flag writing unit 35 responds to the commit command with the inversion result “1” previously held in the memory, together with the corresponding transaction id and update flag identifier id, and the update flag history file. Write to 25 (S
7).

【0031】続いて、第1フラグ書込み部35は、フラ
グ更新依頼を更新フラグ管理部31aに対し発行する
(S8)。更新フラグ管理部31aでは、第2フラグ書
込み部43が、そのフラグ更新依頼に応答して、対応す
る更新フラグの値を初期値“0”から反転値“1”に仮
更新し(S9)、続いて、リソースマネージャ29に対
して実更新(コミット)命令を発行し、このコミット命
令に基づき資源におけるレコードの実更新が成功すれ
ば、更新フラグを反転値“1”に実更新する(S1
0)。尚、ステップS9はフラグ反転部41のフラグ反
転後に行ってもよい。もし、第2サーバ20bでシステ
ムダウンなどの障害が発生して資源での実更新が失敗し
た場合には、リソースマネージャ29は、自身のリカバ
リ処理により、AP21からの資源の仮更新をロールバ
ックし、且つ仮更新した更新フラグをロールバックして
元の初期値“0”に戻す。
Subsequently, the first flag writing section 35 issues a flag update request to the update flag management section 31a (S8). In the update flag management unit 31a, the second flag writing unit 43 tentatively updates the value of the corresponding update flag from the initial value “0” to the inverted value “1” in response to the flag update request (S9), Then, an actual update (commit) command is issued to the resource manager 29, and if the actual update of the record in the resource is successful based on this commit command, the update flag is actually updated to the inverted value "1" (S1).
0). The step S9 may be performed after the flag inversion unit 41 inverts the flag. If a failure such as a system down occurs in the second server 20b and the actual update of the resource fails, the resource manager 29 rolls back the temporary update of the resource from the AP 21 by its own recovery process. In addition, the provisionally updated update flag is rolled back to the original initial value “0”.

【0032】更新フラグ履歴管理部23では、第1フラ
グ書込み部35が、フラグ更新依頼を発行した後に、コ
ミット完了の旨の処理結果をAP21に返送する(S1
1)。これでトランザクション処理が完了する。
In the update flag history management unit 23, the first flag writing unit 35 issues a flag update request, and then returns the processing result indicating that the commit is completed to the AP 21 (S1).
1). This completes the transaction processing.

【0033】この一連の処理により、トランザクション
のコミット命令の発行を契機として、更新管理テーブル
33内の当該トランザクションに対応する更新フラグに
は、資源での実更新の成功/失敗に応じた値が記録され
ることになり、一方、更新フラグ履歴ファイル25に
は、資源での実更新が成功した場合に更新フラグが持つ
べき期待値が記録されることになる。従って、資源での
実更新が成功した場合は、更新フラグの実際の値と、更
新フラグ履歴ファイル25に記録された期待値とが一致
することになる。しかし、資源での実更新が失敗した場
合には、更新フラグの実際の値と、更新フラグ履歴ファ
イル25に記録された期待値とは相違することになる。
By this series of processes, triggered by the issuance of the transaction commit command, the update flag corresponding to the transaction in the update management table 33 records a value according to the success / failure of the actual update of the resource. On the other hand, in the update flag history file 25, the expected value that the update flag should have when the actual update with the resource is successful is recorded. Therefore, when the actual update of the resource is successful, the actual value of the update flag matches the expected value recorded in the update flag history file 25. However, when the actual update with the resource fails, the actual value of the update flag and the expected value recorded in the update flag history file 25 are different.

【0034】尚、図示してはいないが、トランザクショ
ン処理中は、更新されるべき資源のレコードは、他のト
ランザクションによるアクセスを排除するためにロック
状態に維持され、実更新が成功した後にロック状態が解
除されるが、実更新が失敗すると、以後継続してロック
状態が維持される。これに対応し、実更新が失敗する
と、当該トランザクションに割り当てられていた更新フ
ラグも同様に以後継続してロック状態に維持され、後の
トランザクションには割り当てられなくなる。その結
果、実更新の失敗で生じた更新フラグの実際の値と更新
フラグ履歴ファイル25の期待値との間の相違は、その
トランザクションに対する何等かのリカバリ処理(実更
新のやり直し又はロールバック)が行われない限り、以
後継続して維持されることになる。従って、障害復旧後
にこの相違を検出することにより、どのレコードの更新
が未実行なのかを発見することが可能となる。
Although not shown in the figure, during transaction processing, the resource record to be updated is kept in the locked state in order to exclude access by other transactions, and is locked after the actual update is successful. However, if the actual update fails, the locked state is continuously maintained. In response to this, when the actual update fails, the update flag assigned to the transaction is also continuously maintained in the locked state thereafter, and is not assigned to the subsequent transaction. As a result, the difference between the actual value of the update flag caused by the failure of the actual update and the expected value of the update flag history file 25 may be due to some recovery process (redo or rollback of the actual update) for the transaction. Unless done, it will continue to be maintained thereafter. Therefore, by detecting this difference after the failure recovery, it becomes possible to find out which record has not been updated.

【0035】図4は、障害が発生した場合の障害復旧後
の処理の流れを示す。
FIG. 4 shows the flow of processing after recovery from a failure when a failure occurs.

【0036】図4に示すように、障害から復旧するとま
ず、更新確認依頼部27が、更新確認依頼を更新フラグ
履歴管理部23に発行する。更新フラグ履歴確認部23
では、フラグチェック部37がこの更新確認依頼を受
け、更新フラグ履歴ファイル25から読み出したトラン
ザクションidと更新フラグidをもとに、更新フラグ
管理部31a、31b、31cの各々に対し、フラグ読
み込み依頼を発行する(S22)。
As shown in FIG. 4, upon recovery from the failure, the update confirmation requesting unit 27 first issues an update confirmation request to the update flag history managing unit 23. Update flag history confirmation unit 23
Then, the flag check unit 37 receives this update confirmation request, and requests the flag read units to update flag management units 31a, 31b, and 31c based on the transaction id and the update flag id read from the update flag history file 25. Is issued (S22).

【0037】このフラグ読み込み依頼を受けた各更新フ
ラグ管理部31a、31b、31cでは、フラグ読み込
み部45が、更新管理テーブル33から更新フラグの値
を読み込む(S23、S24)。この時、受け取ったト
ランザクションidと、更新管理テーブル33から読み
出したトランザクションidとが同一であれば、障害発
生時実更新中であったことを示し、一方、異なる場合は
そのトランザクションは完了しており、もちろん実更新
も完了していることを示す。このことから、各更新フラ
グ管理部31a、31b、31cは、障害発生時に実更
新中であったトランザクションが自身の受け持ったもの
か否か認識し、自身の受け持ったものである場合(図示
の例では、更新フラグ管理部31aがこれに該当す
る)、先程読取った更新フラグの値を更新フラグ履歴管
理部23に送る(S25)。
In each of the update flag management units 31a, 31b, 31c that have received this flag read request, the flag reading unit 45 reads the value of the update flag from the update management table 33 (S23, S24). At this time, if the received transaction id and the transaction id read from the update management table 33 are the same, it means that the actual update was in progress at the time of failure occurrence, while if they are different, the transaction has been completed. , Of course, shows that the actual update is also completed. From this, each update flag management unit 31a, 31b, 31c recognizes whether the transaction that was actually being updated at the time of the failure was under its own responsibility, and if it is under its own responsibility (the example shown in the figure). Then, the update flag management unit 31a corresponds to this), and sends the value of the update flag read earlier to the update flag history management unit 23 (S25).

【0038】更新フラグ履歴管理部23では、フラグチ
ェック部37が、更新フラグ管理部31aから送られた
更新フラグの値を受取り、そして、更新フラグ履歴ファ
イル25から対応する更新フラグの値を読み込み(S2
6)、両値を比較する。その結果、一致していれば、実
更新は実行済であると確認し、相違していれば、実更新
は未完了であると確認し、その確認結果を確認結果返却
部39に渡す(S27)。
In the update flag history management unit 23, the flag check unit 37 receives the value of the update flag sent from the update flag management unit 31a, and reads the value of the corresponding update flag from the update flag history file 25 ( S2
6) Compare both values. As a result, if they match, it is confirmed that the actual update has been executed, and if they do not match, it is confirmed that the actual update has not been completed, and the confirmation result is passed to the confirmation result returning unit 39 (S27). ).

【0039】確認結果返却部39はその確認結果を更新
確認依頼部27に送り(S28)、更新確認依頼部27
はその確認結果を受け取り、実更新が実行済か未実行か
を認識する。この認識結果に基づいて、図示してはいな
いが、適当なリカバリ処理が行われる。
The confirmation result returning unit 39 sends the confirmation result to the update confirmation requesting unit 27 (S28), and the update confirmation requesting unit 27
Receives the confirmation result and recognizes whether the actual update has been executed or not. Although not shown, an appropriate recovery process is performed based on the recognition result.

【0040】以上のように、本実施例では、2値をとる
更新フラグを用いることにより、資源の実更新の実行/
未実行を判定するようにしている。この更新フラグは、
資源のレコード毎に設けられるのでなく、更新フラグ管
理部31a、31b、31c毎に、つまり、並行処理さ
れるトランザクション毎に設けられる。そのため、更新
管理テーブル33は、従来のそれと比較して、大幅に小
サイズで簡素なものとなり、これに対応する更新フラグ
履歴ファイル25も、同様に小サイズで簡素となり、そ
れらに対するアクセス処理も簡単になる。また、本実施
例では、AP21とは別に更新フラグ履歴管理部23及
び更新確認依頼部27を設けているため、AP21は資
源更新の実行/未実行を管理する必要がなくなり、AP
21のプログラム構成が簡単になる。
As described above, according to the present embodiment, by using the binary update flag, the actual update / execution of the resource is executed.
I have decided to determine the unexecuted. This update flag is
It is not provided for each resource record, but for each update flag management unit 31a, 31b, 31c, that is, for each transaction to be processed in parallel. Therefore, the update management table 33 is much smaller and simpler than that of the conventional one, and the update flag history file 25 corresponding thereto is also small in size and simple, and access processing to them is also easy. become. Further, in the present embodiment, since the update flag history management unit 23 and the update confirmation request unit 27 are provided separately from the AP 21, the AP 21 does not need to manage the execution / non-execution of the resource update, and the AP 21
The program structure of 21 becomes simple.

【0041】以上、本発明の一実施例を説明したが、本
発明は上記実施例以外の種々の態様でも実施することが
できる。例えば、1つの処理装置内で閉じたトランザク
ション処理を行う場合や、複数の処理装置が資源を分散
管理してトランザクションを分散処理するような場合に
も本発明は適用することができる。
Although one embodiment of the present invention has been described above, the present invention can be implemented in various modes other than the above embodiment. For example, the present invention can be applied to a case where closed transaction processing is performed in one processing device, and a case where a plurality of processing devices perform distributed processing by managing resources in a distributed manner.

【0042】[0042]

【発明の効果】本発明によれば、簡単なプログラム構成
及び小さいファイルサイズで資源の実更新の実行の有無
を判定することができる。
According to the present invention, the presence / absence of execution of actual resource update can be determined with a simple program structure and a small file size.

【図面の簡単な説明】[Brief description of drawings]

【図1】 従来の更新判定処理方式を示すブロック図。FIG. 1 is a block diagram showing a conventional update determination processing method.

【図2】 本発明の更新判定処理方式を適用した資源管
理システムの一実施例のシステム構成を示すブロック
図。
FIG. 2 is a block diagram showing a system configuration of an embodiment of a resource management system to which the update determination processing method of the present invention is applied.

【図3】 同実施例の通常トランザクション処理時の動
作を示すフローチャート。
FIG. 3 is a flowchart showing an operation during normal transaction processing of the embodiment.

【図4】 同実施例の障害復旧時の動作を示すフローチ
ャート。
FIG. 4 is a flowchart showing an operation at the time of failure recovery of the embodiment.

【符号の説明】[Explanation of symbols]

3 ネットワーク 20 サーバ 21 業務プログラム(AP) 23 更新フラグ履歴管理部 25 更新フラグ履歴ファイル 27 更新確認依頼部 29 リソースマネージャ 31 更新フラグ管理部 33 フラグ依頼部 35 第1フラグ書込み部 37 フラグチェック部 39 確認結果返却部 41 フラグ反転部 43 第2フラグ書込み部 45 フラグ読み込み部 3 network 20 server 21 business program (AP) 23 update flag history management unit 25 update flag history file 27 update confirmation request unit 29 resource manager 31 update flag management unit 33 flag request unit 35 first flag writing unit 37 flag check unit 39 confirmation Result return unit 41 Flag inversion unit 43 Second flag writing unit 45 Flag reading unit

───────────────────────────────────────────────────── フロントページの続き (72)発明者 小田中 忠雄 東京都江東区豊洲三丁目3番3号 エヌ・ ティ・ティ・データ通信株式会社内 ─────────────────────────────────────────────────── ─── Continued Front Page (72) Inventor Tadao Odanaka 3-3-3 Toyosu, Koto-ku, Tokyo NTT Data Communications Corporation

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 資源管理システムにおける、トランザク
ションにより資源の実更新が実行されたか否かを判定す
る方式において、 トランザクションを処理する業務プログラムと、 処理中のトランザクションに割り当てられる更新フラグ
と、 前記更新フラグの履歴を記録するための更新フラグ履歴
ファイルと、 前記更新フラグの初期値を読み込み、前記業務プログラ
ムからの実更新命令の発行を契機として、前記初期値の
反転値を前記更新フラグ履歴ファイルに書込むフラグ書
込み部と、 前記実更新命令に基づく前記資源の実更新が実行された
場合、前記更新フラグを反転させる更新フラグ管理部
と、 前記実更新の実行の有無について確認依頼を発生する更
新確認依頼部と、 前記確認依頼を受けて、前記更新フラグの値と、前記更
新フラグ履歴ファイル内の前記反転値とを比較すること
により、前記実更新の実行の有無を確認するフラグチェ
ック部と、を備えることを特徴とする資源更新判定方
式。
1. A method for determining whether or not a resource has been actually updated by a transaction in a resource management system, a business program that processes the transaction, an update flag assigned to the transaction being processed, and the update flag. And an update flag history file for recording the history of the update flag, the initial value of the update flag is read, and the inverted value of the initial value is written to the update flag history file upon the issuance of the actual update command from the business program. A flag writing unit that inserts the update flag, an update flag management unit that inverts the update flag when the actual update of the resource based on the actual update instruction is executed, and an update confirmation that issues a confirmation request as to whether or not the actual update is executed. The request unit, the value of the update flag, and the update flag in response to the confirmation request By comparing the inverted value of gravel in the file, resource update determination method characterized by and a flag check unit for confirming whether to execute the real update.
【請求項2】 資源管理システムにおける、トランザク
ションの処理により資源の実更新が実行されたか否かを
判定する方法において、 業務プログラムが処理するトランザクションに更新フラ
グを割り当てる過程と、 前記業務プログラムからの実更新命令の発行に応答し
て、前記更新フラグの初期値の反転値を更新フラグ履歴
ファイルに書込む過程と、 前記実更新命令に基づく前記資源の実更新の実行に伴っ
て、前記更新フラグを反転させる過程と、 前記資源の実更新の有無についての確認依頼を発生する
過程と、 前記確認依頼を受けて、前記更新フラグの値と、前記更
新フラグ履歴ファイル内の前記反転値と比較することに
より、前記実更新の実行の有無を確認する過程と、を備
えることを特徴とする資源更新判定方法。
2. A method of determining whether or not a resource is actually updated by processing a transaction in a resource management system, a process of assigning an update flag to a transaction processed by a business program, and a process from the business program. In response to the issuance of the update command, the process of writing the inverted value of the initial value of the update flag into the update flag history file, and the execution of the actual update of the resource based on the actual update command, Reversing, generating a confirmation request as to whether or not the resource is actually updated, and receiving the confirmation request and comparing the value of the update flag with the inverted value in the update flag history file. And a step of confirming whether or not the actual update has been performed.
JP7064831A 1995-02-28 1995-02-28 Resource updating decision system Pending JPH08235038A (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP7064831A JPH08235038A (en) 1995-02-28 1995-02-28 Resource updating decision system
PCT/JP1996/000440 WO1996027157A1 (en) 1995-02-28 1996-02-27 Cooperative distributed system, and journal and recovery processings therein
US08/737,040 US6052695A (en) 1995-02-28 1996-02-27 Accurate completion of transaction in cooperative type distributed system and recovery procedure for same
EP96903243A EP0758114A4 (en) 1995-02-28 1996-02-27 Cooperative distributed system, and journal and recovery processings therein

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7064831A JPH08235038A (en) 1995-02-28 1995-02-28 Resource updating decision system

Publications (1)

Publication Number Publication Date
JPH08235038A true JPH08235038A (en) 1996-09-13

Family

ID=13269594

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7064831A Pending JPH08235038A (en) 1995-02-28 1995-02-28 Resource updating decision system

Country Status (1)

Country Link
JP (1) JPH08235038A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001195362A (en) * 2000-01-06 2001-07-19 Nippon Telegr & Teleph Corp <Ntt> Device and method for processing transaction and ic card with transaction processing function

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001195362A (en) * 2000-01-06 2001-07-19 Nippon Telegr & Teleph Corp <Ntt> Device and method for processing transaction and ic card with transaction processing function

Similar Documents

Publication Publication Date Title
US5065311A (en) Distributed data base system of composite subsystem type, and method fault recovery for the system
US5724581A (en) Data base management system for recovering from an abnormal condition
US7107294B2 (en) Method and apparatus for interrupting updates to a database to provide read-only access
US5561795A (en) Method and apparatus for audit trail logging and data base recovery
CN113396407A (en) System and method for augmenting database applications using blockchain techniques
JPS62105247A (en) Management of data base system
US20060224639A1 (en) Backup system, program and backup method
JPH08110895A (en) Node device and storage device used in distributed system and restoring method for server for resources management in distributed system
US6754842B2 (en) Facilitating a restart operation within a data processing system
US6526417B1 (en) System and method for change accumulation unmerged update reduction
US6944635B2 (en) Method for file deletion and recovery against system failures in database management system
JPH08328933A (en) File access control system for parallel processing system
JP3042600B2 (en) Distributed file synchronization method
JPH08235038A (en) Resource updating decision system
JPH08235043A (en) Cooperative distributed system
CN112765126A (en) Database transaction management method and device, computer equipment and storage medium
JPH08286964A (en) Method for processing distributed transaction
JPH08129492A (en) Resource exclusion checking system and resource exclusion checking method
JPH02292641A (en) Method for controlling data base
JPH07334397A (en) Deleted file managing system
JP2002297321A (en) Disk unit, data backup method and program
JPH0962554A (en) Quiescent point save generation system
JPH02122362A (en) Decentralized data control system
JPH0713943A (en) Parallel computer
CN117234670A (en) Distributed transaction processing method, system, computer equipment and storage medium