[go: up one dir, main page]

JP3621641B2 - Managing transaction processing - Google Patents

Managing transaction processing Download PDF

Info

Publication number
JP3621641B2
JP3621641B2 JP2000353232A JP2000353232A JP3621641B2 JP 3621641 B2 JP3621641 B2 JP 3621641B2 JP 2000353232 A JP2000353232 A JP 2000353232A JP 2000353232 A JP2000353232 A JP 2000353232A JP 3621641 B2 JP3621641 B2 JP 3621641B2
Authority
JP
Japan
Prior art keywords
transaction
commit
nested
processing
sub
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 - Fee Related
Application number
JP2000353232A
Other languages
Japanese (ja)
Other versions
JP2001188696A (en
Inventor
達徳 金井
敏雄 白木原
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2000353232A priority Critical patent/JP3621641B2/en
Publication of JP2001188696A publication Critical patent/JP2001188696A/en
Application granted granted Critical
Publication of JP3621641B2 publication Critical patent/JP3621641B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

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

Description

【0001】
【発明の属する技術分野】
本発明は、分散処理環境に用いられる分散処理に適用されるトランザクション処理の管理方法に関する。
【0002】
【従来の技術】
分散処理環境においては、各種サービスを行なうサーバ・プロセスが複数の計算機上に分散して存在している。
【0003】
従って、ある計算機上のクライアント・プロセスが、他のサーバ・プロセスの提供する何らかのサービスを受けようとする場合には、そのサービスを提供しているサーバ・プロセスに対してサービス要求を伝えるようになる。このとき、受けたいサービスがどの計算機上のどのサーバ・プロセスで提供されているかを管理するため、従来では、ネーム・サーバ(Name Server)あるいはディレクトリ・サービス(Directory Service)と呼ばれるプロセスが用いられている。
【0004】
ネーム・サーバは、どのサーバ・プロセスがどのような名前のサービスを提供しているかを管理しており、サービスを受けたいクライアント・プロセスがサービス名を伝えると、そのサービスを実行可能なサーバ・プロセスとこのサーバ・プロセスが存在する計算機とを答えるようになっている。また、ネーム・サーバの中には各サービスに属性値を持たせ、サービスを受けたいクライアント・プロセスの伝えてきたサービス名と属性を基に、パターン・マッチングを行なうことで、能力を拡張したものも存在している。
【0005】
一方、このような分散処理には、システムの信頼性を高めるためにトランザクション処理が用いられている。
【0006】
このようなトランザクション処理は、トランザクションと呼ぶ単位で処理を実行するようになっており、一つのトランザクションは、一つ以上のアプリケーション・プログラムやデータベース管理システムなどのプロセスを渡りあるいてこれらを実行することで、一連の処理を完了する。このとき一つのトランザクションを実行する複数のプロセスが、チャネルやネットワークを介して結合された複数の計算機に分散していても構わない。例えば、図25に示すように、トランザクション処理を行なう計算機34上には、処理を実行するプロセス342、342…と、処理を管理するトランザクション管理部341とが存在する。複数の計算機に分散したトランザクション処理を行なう場合には、図26に示すように、それぞれの計算機上にプロセスとトランザクション管理部351が存在し、各計算機上のトランザクション管理部351は通信しあいながらトランザクションの管理を行なう。トランザクション管理部は、各トランザクションが、以下の性質を持つようにその実行を制御するようにしている。
(1)原子性(atomicity)処理が最後まで完全に実行されるか、もしくは完全な実行が不可能な場合には途中までの実行の影響が残らないことを保証する。
(2)一貫性(consistency)処理をすることによって、一貫性のある状態から、一貫性のある状態へ遷移することを保証する。
(3)分離性(isolation)並行して実行する複数の処理の結果は、それらを何らかの順序で直列に実行した場合と同じであることを保証する。
(4)持続性(durability)完全に実行された処理の結果は、障害が発生しても復旧されることを保証する。
【0007】
これらを実現するために、トランザクション管理部は各トランザクションの処理が終了した後に、コミット処理を行なう。コミット処理の方式は、2相コミットが代表的で良く使われる。他にも3相コミットをはじめとして様々な2相コミットを改良した方式が存在する。
【0008】
例えば、図27のようにトランザクション管理部361と二つのプロセス362、363によるトランザクション処理の場合の2相コミット方式の動作を図29に示す。図29は時間の流れに沿った各構成要素間の相互作用を示している。ここではひとつのトランザクションがプロセス362とプロセス363の二つのプロセスによって処理されるている。トランザクションの処理が終了すると、トランザクション管理部361はそのトランザクションの実行に関与したすべてのプロセス(ここではプロセス362とプロセス363)に対してコミット処理を行なう。コミット処理は投票相と決定相の2相からなる。まず投票相では各プロセスに対して、トランザクションをコミットすなわち正しく完了できるかどうかを問い合わせるVOTE−REQ要求を出す。各プロセスはこれに対してYESかNOを答える。YESと答える場合、各プロセスはトランザクションの実行結果をログに記録し、障害が発生しても処理結果を回復可能な状態にしてからYESと返答する。何らかの障害や異常があって正常に処理できない場合にはNOと返答する。すべてのプロセスからトランザクション管理部にYESあるいはNOという返答が返ってくると、投票相は終了して次の決定相に入る。すべてのプロセスがYESと答えた場合のみ、決定相ではトランザクション管理部は各プロセスにCOMMIT要求を出す。COMMIT要求を受けたプロセスは、該当するトランザクションが正常に終了したものとして恒久的なデータの更新等の処理を行なう。
【0009】
もし投票相で一つでもNOと返答したプロセスがあれば、トランザクションが正しく完了できないことになる。このような場合は、図30に示すようにアボート処理を行なう。すなわち、決定相ではすべてのプロセスに対してトランザクションの取り消しを指示するABORT要求を出す。ABORT要求を受けたプロセスは、該当トランザクションによるデータ等の更新を取り消す処理を行ない、トランザクションの原子性を保証する。
【0010】
図27、図29、図30はプロセス362とプロセス363が同じ計算機上で動作している場合の例であった。図28のようにプロセス372とプロセス374が別の計算機で動作している場合は、計算機A上のトランザクション管理部371が図31のように計算機B上のトランザクション管理部373に処理要求を出し、トランザクション管理部373がトランザクション管理部371になり代わってプロセス374にコミット処理を行なう。
【0011】
このようにして処理されるトランザクションは、図32のA、B…に示すように、互いに独立した処理の単位である。
【0012】
一方、J. Eliot B. Moss著の“Nested Transactions−An Approach to Reliable Distributed Computing”(The MITPress, 1985)で開示された入れ子トランザクション(Nested Transaction)は、図33に示すように複数のトランザクション421〜425を入れ子にして階層を持たせることによって、一つのトランザクションをより小さな単位のトランザクションの組合せとして実現する方式である。ここでは図34に示すように、階層の最上位のトランザクション431をトップレベル・トランザクションと呼び、下位のトランザクション432〜434をサブ・トランザクションと呼ぶ。一つのトップレベル・トランザクションとその下位にあるすべてのサブ・トランザクションをまとめてトランザクション・ファミリーと呼ぶ。入れ子トランザクションにおいては、トランザクション・ファミリー間は入れ子でない非入れ子トランザクションと同じ扱いであるが、同じトランザクション・ファミリーに属するサブ・トランザクション間でも非入れ子トランザクションと同様に原子性や独立性を保証することにより、サブ・トランザクション間で並行実行したり、障害によるアボートをサブ・トランザクションのレベルで局所化することができるといった利点がある。
【0013】
入れ子トランザクションを実行するためには、図36に示すように入れ子トランザクションを実行可能なプロセス452と、入れ子トランザクションを実行不可能なプロセス453、入れ子トランザクションを管理可能なトランザクション管理部451が計算機上に存在しなければならない。プロセスが複数の計算機上に分散している場合には、図37に示すように、各計算機に入れ子トランザクションを実行可能なプロセス462とトランザクション管理部461、入れ子トランザクションを実行不可能なプロセス464とトランザクション管理部463を置く。
【0014】
入れ子トランザクションのコミット処理は、非入れ子トランザクションの場合と異なり、トップレベル・トランザクションのコミット処理とサブ・トランザクションのコミット処理の二通りの場合に対応しなければならない。図38および図39に入れ子トランザクションのコミット処理の一例を示す。ここでは図35に示すようなトップレベル・トランザクションT441とそのサブ・トランザクションS442が、共にプロセスによって実行された場合を考えている。図38は二つのプロセスが同じ計算機上に存在して一つのトランザクション管理部がそれらを管理する場合である。図39は各プロセスが異なる計算機上に存在していて、それぞれの計算機上のトランザクション管理部によって管理される場合を示している。
【0015】
まず、サブ・トランザクションのコミット処理を行なう。図38および図39の例ではトランザクション管理部がサブ・トランザクションがコミットしたことを内部に記録するだけで、プロセスに対しては何も指示しない。サブ・トランザクションのコミット時には、この例のように何もしない方式がよく用いられるが、通常の2相コミットと同様の処理をサブ・トランザクションに対して行なうような実現法も可能である。
【0016】
トップレベル・トランザクションのコミット処理も、非入れ子トランザクションの場合と同様である。ただし、トップレベル・トランザクションがコミットする場合には、トップレベル・トランザクションが更新したデータ等だけではなく、そのすべてのサブ・トランザクションが更新したデータ等も恒久的に記録されることを保証する必要がある。トップレベル・トランザクションがアボートする場合も同様に、そのすべてのサブ・トランザクションをアボートさせなくてはならない。このように、サブ・トランザクションに関してはコミットした状態は一時的なものでしかなく、より上位階層のトランザクションによってその状態が覆される場合が存在する。入れ子トランザクションを実行可能なプロセスは、トランザクション管理部からの要求に答えてこのような処理を実行可能でなければならず、この点が入れ子トランザクションを実行不可能なプロセスとは異なる。
【0017】
【発明が解決しようとする課題】
従来のトランザクション処理方式では、入れ子トランザクション処理を行なうためには、入れ子トランザクションを管理可能なトランザクション・マネージャと、入れ子トランザクションを実行可能なプロセスがなければならなかった。そのため、入れ子トランザクションを実行不可能な従来のデータベース管理システムやアプリケーション・プログラムのプロセスを入れ子トランザクション処理に用いようとすると、入れ子トランザクションを実行できるようにプロセスのプログラムを書き換える必要があった。また、入れ子トランザクションを管理不可能な従来のトランザクション管理部とそれに管理される入れ子トランザクションを実行不可能なプロセスが存在する計算機と、入れ子トランザクションを管理可能なトランザクション管理部の存在する計算機とを結合したトランザクション処理は不可能であった。
【0018】
本発明は、上記事情を考慮してなされたもので、入れ子トランザクションを実行不可能なプロセスや入れ子トランザクションを管理不可能なトランザクション管理部を持つ計算機が存在していても、入れ子トランザクション処理を実行可能にするトランザクションの管理方法を提供することを目的とする。
【0019】
【課題を解決するための手段】
本発明は、入れ子トランザクション実行可能なプロセスと入れ子トランザクション実行不可能なプロセスとを含んだトランザクション処理システムにおける(入れ子トランザクションを管理可能なトランザクション管理手段による)トランザクション処理の管理方法であって、前記入れ子トランザクション実行可能なプロセスおよび前記入れ子トランザクション実行不可能なプロセスの各々により、入れ子トランザクションのサブトランザクションを実行させ、前記入れ子トランザクション実行可能なプロセスにより実行されたサブトランザクションについてコミット処理を行い、前記入れ子トランザクションのトップレベルトランザクションを実行させ、実行された前記トップレベルトランザクションのコミット処理を行い、前記トップレベルトランザクションのコミット処理の完了と共に、前記入れ子トランザクション実行不可能なプロセスにより実行されたサブトランザクションについてのコミット処理を完了させることを特徴とする。
【0020】
好ましくは、前記入れ子トランザクション実行不可能なプロセスにより実行されたサブトランザクションについてのコミット処理を、前記トップレベルトランザクションのコミット処理と並行して行うようにしてもよい。
【0021】
好ましくは、前記入れ子トランザクション実行不可能なプロセスにより実行されたサブトランザクションについてのコミット処理の投票相を、前記入れ子トランザクション実行可能なプロセスにより実行されたサブトランザクションについてのコミット処理と並行して行い、前記入れ子トランザクション実行不可能なプロセスにより実行されたサブトランザクションについてのコミット処理の決定相を、前記トップレベルトランザクションのコミット処理と並行して行うようにしてもよい。
【0022】
好ましくは、前記入れ子トランザクション実行不可能なプロセスにより実行されたサブトランザクションについてのコミット処理の投票相を、前記入れ子トランザクション実行可能なプロセスにより実行されたサブトランザクションについてのコミット処理および前記入れ子トランザクションのトップレベルトランザクションの実行と並行して行い、前記入れ子トランザクション実行不可能なプロセスにより実行されたサブトランザクションについてのコミット処理の決定相を、前記トップレベルトランザクションのコミット処理と並行して行うようにしてもよい。
【0023】
好ましくは、前記入れ子トランザクション実行不可能なプロセスにより実行されたサブトランザクションについてのコミット処理の投票相を、前記入れ子トランザクションのトップレベルトランザクションの実行と並行して行い、前記入れ子トランザクション実行不可能なプロセスにより実行されたサブトランザクションについてのコミット処理の決定相を、前記トップレベルトランザクションのコミット処理と並行して行うようにしてもよい。
【0024】
この結果、本発明のトランザクション処理の管理方法によれば、入れ子トランザクション処理を実行不可能なプロセスが入れ子になっていることを意識せずに実行したサブ・トランザクションについては、そのトランザクションのコミット処理の決定相の処理をトップレベル・トランザクションのコミット処理の決定相の処理時まで遅延させるため、そのトランザクションに関する原子性や持続性、一貫性、分離性といったトランザクションとしての性質を犠牲にすることがなくなる。また、入れ子トランザクションを実行不可能なプロセスの実行したトランザクションのコミット処理の投票相と、入れ子のトップレベル・トランザクションのコミット処理の投票相の投票結果を総合して双方のトランザクションの決定可能性を判断するため、入れ子トランザクション全体の原子性や持続性、一貫性、分離性といったトランザクションとしての性質も保証することができる。
【0025】
【発明の実施の形態】
以下、本発明の一実施形態を図面に従い説明する。
【0026】
上述した分散処理に適用されるトランザクション処理方式について説明する。
【0027】
(第1の実施形態)
図6は、トップレベル・トランザクションTとそのサブ・トランザクションSが、図3に示すようにトランザクション管理部121により入れ子トランザクションを実行可能なプロセス122と入れ子トランザクションを実行不可能なプロセス123を管理する場合のコミット処理を示している。
【0028】
そして、図2は、この場合のトランザクション管理部121の構成を示している。この場合、トランザクション管理部121は、プロセス表1211とトランザクション表1212の二つの表を管理している。プロセス表1211には、その計算機上でトランザクション処理に関与するプロセスに対して入れ子トランザクションを実行可能か否かを記録している。トランザクション表1212は、現在処理中のトランザクションに対して、そのトランザクション識別子、階層関係で直接の親にあたるトランザクションのトランザクション識別子、そのトランザクションが実行中かコミット済みかを示す状態、そのトランザクションがどのプロセスによって処理されているか、そのトランザクションが他にどの計算機で処理されているかといった情報を記録している。そして、このようなトランザクション管理部121は、これら二つの表を参照しながら、後述するコミット処理を行なうようになる。
【0029】
この場合、図5に示す流れに従って、トランザクション管理部121は、サブ・トランザクションSのコミット処理を行なう。この時はサブ・トランザクションSがコミットしたことをトランザクション管理部121がトランザクション表に記録するだけで、プロセス122やプロセス123に対して何も指示しない方式を採っている。この時点で従来の2相コミットと同様の処理を行なうような実施方式も可能である。その後、トップレベル・トランザクションTの処理が終了すればトップレベル・トランザクションのコミット処理を開始する。まず投票相では、Tの関与している入れ子トランザクションを実行可能なプロセス122に対してVOTE−REQ(T)を送る。さらに、Tのサブ・トランザクションSに関与した入れ子トランザクションを実行不可能なプロセス123にはVOTE−REQ(S)を送る(ステップS141〜S143)。
【0030】
そして、プロセス122からYES(T)、プロセス123からYES(S)という返答が返ってくれば次の決定相に移る。決定相では、プロセス122に対してCOMMIT(T)を送ると共に、トランザクションSに関与している入れ子トランザクションを実行不可能なプロセス123に対してCOMMIT(S)を送る。これによって、このトランザクション・ファミリー全体のコミット処理が完了する(ステップS144〜S146)。また、トップ・レベルのコミット処理の投票相においてアボートが決定された場合には、入れ子トランザクションを実行可能なプロセスにトップレベル・トランザクションのアボート処理を行なうと共に、そのサブ・トランザクションを実行した入れ子トランザクション実行不可能なプロセスに対して、該当するトランザクションのアボート処理も行なう(ステップS147、S148)。
【0031】
一方、図7は、図4に示すようにプロセス132とプロセス142が異なる計算機13、14上で実行され、それぞれの計算機13、14にトランザクション管理部131、141が存在する場合の入れ子になったトランザクションのコミット処理を示している。この場合、トランザクション管理部131、141は、図1(a)(b)に示すように上述したトランザクション管理部121と同様にプロセス表1311、1411とトランザクション表1312、1412のそれぞれ二つの表を管理している。
【0032】
そして、トランザクション管理部131はそのトランザクション表1312を見て、トランザクションSが計算機14に拡がっていることを知り、計算機14上の入れ子トランザクション処理を実行不可能なプロセス142に直接トランザクションSのコミット処理を行なうのではなく、トランザクション管理部141にトップレベル・トランザクションTのコミット処理を行なうように通信手段15によって伝える。それを受けたトランザクション管理部141がそのトランザクション表1412とプロセス表1411を見て、入れ子トランザクションを実行不可能なプロセス142に対してトランザクションSのコミット処理を行なうようになる。
【0033】
なお、本実施形態のトランザクション管理部は、独立したプロセスとして実現することもできるし、ライブラリ等の形態でトランザクション処理を行なうプロセスにリンクするような実現方法も可能である。また、計算機のオペレーティング・システムにトランザクション管理部の機能を組み込むこともできる。また、本実施形態では、2相コミット方式に対して本発明を適用したものであるが、3相コミット等のように投票相と決定相を含むコミット処理方式に対しても同様に適用可能である。
【0034】
(第2の実施形態)
上述の第1の実施形態においては、入れ子トランザクションを実行不可能なプロセスで処理されたトランザクションのコミット処理の投票相と決定相は共にトップレベル・トランザクションのコミット処理時に行なった。
【0035】
このようなサブ・トランザクションの投票相の処理は、トップレベル・トランザクションのコミット処理の決定相の処理が開始されるまでの任意の時点で行なってしまって構わない。
【0036】
そこで、図8に示すステップS171〜S179の手順で処理を行なえば、例えば、図3に示すトランザクション管理部121が入れ子トランザクションを実行可能なプロセス122と実行不可能なプロセス123を管理しているような場合は、図9に示すようにサブ・トランザクションのコミット処理時に入れ子トランザクションを実行不可能なプロセスに対するコミット処理の投票相の処理を行ってしまうことができ、トップレベル・トランザクションのコミット処理時に決定相の処理のみを行なうような実施方式を採ることができる。
【0037】
また、図4に示す計算機13上には入れ子トランザクションを実行可能なプロセス132が存在し、計算機14上には入れ子トランザクションを実行不可能なプロセス142が存在し、双方の計算機13、14上にはトランザクション管理部131、141が存在するような場合は、図10に示すように、トランザクション管理部131はサブ・トランザクションSのコミット処理時に異なる計算機上のトランザクション管理部141に対してサブ・トランザクションSのコミット処理を依頼し、それを受けたトランザクション管理部141は自分が管理するプロセス142に対してサブ・トランザクションSのコミット処理の投票相を実行するようにできる。
【0038】
(第3の実施形態)
上述の第2の実施形態においては、サブ・トランザクションSのコミット処理時にトランザクションSのコミット処理の投票相の処理を完了するのを待ち合わせたが、この処理はトップレベル・トランザクションのコミット処理の決定相の処理を開始するまでに完了していれば良い。
【0039】
そこで、図11のステップS201〜S208の手順にしたがって処理を行なえば、例えば図3のような場合には図12のようなコミット処理方式を行なうことができ、一方、図4のような複数の計算機にプロセスが分かれる場合は、図13のようにトランザクション管理部131はサブ・トランザクションSのコミット処理時にトランザクション管理部141にトランザクションSのコミット処理の投票相の開始を伝え、それを受けたトランザクション管理部141が自分の管理する入れ子トランザクションを実行不可能なプロセス142にコミット処理の投票相の開始を伝えるようにすればよい。
【0040】
(第4の実施形態)
上述の第2の実施形態においては、サブ・トランザクションSのコミット処理時にトランザクションSに対するコミット処理の投票相を起動したが、この投票相の起動は、図14に示すように、サブ・トランザクションのコミット処理が終了してからでも構わない。これは、図4のようにトランザクションが複数の計算機上で処理されている場合でも同様であり、図15のようなコミット処理方式を実施することができる。
【0041】
例えば、図15のように複数の計算機にトランザクションが拡がっている場合には、サブ・トランザクションのコミット処理が終了した後に計算機13から計算機14に対して何らかのメッセージを送る時に便乗してサブ・トランザクションSのコミット処理の投票相の開始要求をトランザクション管理部131からトランザクション管理部142に送ることができる。
【0042】
(第5の実施形態)
この場合、図16は、入れ子トランザクションを管理可能なトランザクション管理部251とプロセス252を有する計算機25と、入れ子トランザクションを管理不可能な従来のトランザクション管理部261とプロセス262を有する計算機26とからなるトランザクション処理装置を示している。そして、トランザクション管理部251、261の構成を図17(a)(b)、この時のコミット処理の手順を図18に、コミット処理方式を図19にそれぞれ示している。
【0043】
この場合、サブ・トランザクションSのコミット処理時にはトランザクション管理部251はそのトランザクションがコミットしたことを記録するだけで他は何もしない。このときトランザクション管理部261は、サブ・トランザクションSはまだ実行中の状態として管理している。トップレベル・トランザクションTのコミット処理時には、トランザクション管理部251はまず入れ子トランザクションを実行可能なプロセス252に対してVOTE−REQ(T)を送る。次にノード表を見て、入れ子トランザクションを管理不可能なトランザクション管理部の存在する計算機にサブ・トランザクションSが拡がっていることを知り、トランザクション管理部261にVOTE−REQ(S)を送る(図18のステップS271〜S273)。
【0044】
トランザクション管理部261はそのトランザクション表を見て、トランザクションSがプロセス262で実行されていることを知り、プロセス262にVOTE−REQ(S)を送る。プロセス262が投票相の処理を完了してYES(S)をトランザクション管理部2に返してくると、トランザクション管理部261はトランザクション管理部251にYES(S)を返す。トランザクション管理部251は、プロセス252からのYES(T)とトランザクション管理部261からのYES(S)を受け取ると、トップレベル・トランザクションの決定相の処理を行なう。決定相では、トランザクション管理部251はプロセス252にCOMMIT(T)を送る。次にトランザクション管理部261にはCOMMIT(S)を送る。それを受けたトランザクション管理部261はプロセス262に対してCOMMIT(S)を送り、決定相の処理を完了する(図18のステップS274〜S276)。また、トランザクション管理部251は、プロセス252からのYES(T)とトランザクション管理部261からのYES(S)を受け取らない場合は、該当するトランザクションのアボート処理も行なう(ステップS277、S278)。
【0045】
(第6の実施形態)
上述の第5の実施形態においては、計算機26に拡がったトランザクションSのコミット処理をすべてトップレベル・トランザクションTのコミット処理時に行なった。このうち、投票相の処理は、トップレベル・トランザクションのコミット処理の決定相の処理を開始するまでに終えていれば構わない。
【0046】
そこで、図20のステップS291〜S299に示すコミット処理の手順、図21に示すコミット処理方式をそれぞれ用いれば、サブ・トランザクションのコミット処理時にトランザクションSの投票相の処理を行なうことができる。
【0047】
(第7の実施形態)
上述の第5の実施形態においては、計算機26に拡がったトランザクションSのコミット処理をすべてトップレベル・トランザクションTのコミット処理時に行なった。このうち、投票相の処理は、トップレベル・トランザクションのコミット処理の決定相の処理を開始するまでに終えていれば構わない。そこで、図22のステップS311〜S318に示すコミット処理の手順、図23に示すコミット処理方式を用いても、サブ・トランザクションのコミット処理時にトランザクションSの投票相の処理の開始を指示することが可能になる。
【0048】
(第8の実施形態)
上述の第5の実施形態においては、計算機26に拡がったトランザクションSのコミット処理をすべてトップレベル・トランザクションTのコミット処理時に行なった。このうち、投票相の処理は、トップレベル・トランザクションのコミット処理の決定相の処理を開始するまでに終えていれば構わない。そこで、図24に示すコミット処理方式を用いれば、サブ・トランザクションのコミット処理以降の任意の時点でトランザクションSの投票相の処理の開始を指示することが可能になる。この処理の開始指示のタイミングは、計算機25から計算機26へ何らかの通信が発生した時点で便乗して知らせれば良い。
【0049】
その他、本発明は上記実施形態にのみ限定されず、要旨を変更しない範囲で適宜変形して実施できる。
【0050】
【発明の効果】
以上述べたように、本発明のトランザクション処理の管理方法によれば、入れ子トランザクションを実行可能なプロセスと実行不可能なプロセスが混在する場合でも、入れ子トランザクション処理が可能になり、また、入れ子トランザクションが実行不可能なプロセスは非入れ子トランザクション処理に用いていたものをそのまま使用することも可能になる。
【図面の簡単な説明】
【図1】本発明の第1の実施形態のトランザクション管理部の構成を示す図
【図2】本発明の第1の実施形態のトランザクション管理部の構成を示す図
【図3】本発明の第1の実施形態の入れトランザクション処理装置を示す構成図
【図4】本発明の第1の実施形態の分散入れトランザクション処理装置を示す構成図
【図5】本発明の第1の実施形態の動作を説明するためのフローチャート
【図6】本発明の第1の実施形態でのコミット処理を説明するための図
【図7】本発明の第1の実施形態でのコミット処理を説明するための図
【図8】本発明の第2の実施形態の動作を説明するためのフローチャート
【図9】本発明の第2の実施形態でのコミット処理を説明するための図
【図10】本発明の第2の実施形態でのコミット処理を説明するための図
【図11】本発明の第3の実施形態の動作を説明するためのフローチャート
【図12】本発明の第3の実施形態でのコミット処理を説明するための図
【図13】本発明の第3の実施形態でのコミット処理を説明するための図
【図14】本発明の第4の実施形態でのコミット処理を説明するための図
【図15】本発明の第4の実施形態でのコミット処理を説明するための図
【図16】本発明の第5の実施形態の分散入れトランザクション処理装置を示す構成図
【図17】本発明の第5の実施形態のトランザクション管理部の構成を示す図
【図18】本発明の第5の実施形態の動作を説明するためのフローチャート
【図19】本発明の第5の実施形態でのコミット処理を説明するための図
【図20】本発明の第6の実施形態の動作を説明するためのフローチャート
【図21】本発明の第6の実施形態でのコミット処理を説明するための図
【図22】本発明の第7の実施形態の動作を説明するためのフローチャート
【図23】本発明の第7の実施形態でのコミット処理を説明するための図
【図24】本発明の第8の実施形態でのコミット処理を説明するための図
【図25】従来のトランザクション処理装置を示す構成図
【図26】従来の分散トランザクション処理装置を示す構成図
【図27】従来の他のトランザクション処理装置を示す構成図
【図28】従来の他の分散トランザクション処理装置を示す構成図
【図29】従来のトランザクション処理装置のコミット処理を説明するための図
【図30】従来のトランザクション処理装置のアボード処理を説明するための図
【図31】従来のトランザクション処理装置のコミット処理を説明するための図
【図32】独立して処理されるトランザクションの状態を示す図
【図33】トランザクションを入れ子にして階層を持たせた構成を示す図
【図34】トランザクションを入れ子にして階層を持たせた構成を示す図
【図35】入れ子トランザクションを示す図
【図36】入れ子トランザクション処理装置を示す構成図
【図37】分散入れ子トランザクション処理装置を示す構成図
【図38】入れ子トランザクションのコミット処理の一例を示す図
【図39】入れ子トランザクションのコミット処理の一例を示す図
【符号の説明】
121…トランザクション管理部
1211…プロセス表
1212…トランザクション表
122、123…プロセス
13、14、25、26…計算機
131、141、251、261…トランザクション管理部
132、142、252、262…プロセス
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a transaction processing management method applied to distributed processing used in a distributed processing environment.
[0002]
[Prior art]
In a distributed processing environment, server processes for performing various services are distributed on a plurality of computers.
[0003]
Therefore, when a client process on a certain computer wants to receive some service provided by another server process, it transmits a service request to the server process that provides the service. . At this time, in order to manage which server process on which computer the service to be received is provided, a process called a name server (Name Server) or a directory service (Directory Service) is conventionally used. Yes.
[0004]
The name server manages which server process provides what type of service. When a client process that wants to receive a service tells the service name, the server process that can execute the service. And the computer on which this server process exists. Some name servers have an attribute value for each service, and the capabilities are expanded by performing pattern matching based on the service name and attribute transmitted by the client process that wants to receive the service. Also exist.
[0005]
On the other hand, transaction processing is used for such distributed processing in order to increase the reliability of the system.
[0006]
Such transaction processing is executed in units called transactions, and one transaction crosses one or more processes such as application programs and database management systems and executes them. Thus, a series of processing is completed. At this time, a plurality of processes executing one transaction may be distributed to a plurality of computers coupled via a channel or a network. For example, as shown in FIG. 25, on a computer 34 that performs transaction processing, there are processes 342, 342,... For executing processing, and a transaction management unit 341 for managing processing. When performing transaction processing distributed to a plurality of computers, as shown in FIG. 26, a process and a transaction management unit 351 exist on each computer, and the transaction management unit 351 on each computer communicates with each other while communicating. Manage. The transaction manager controls the execution of each transaction so that it has the following properties.
(1) It is ensured that the atomicity process is completely executed until the end, or if the complete execution is impossible, the influence of the execution is not left.
(2) By performing a consistency process, it is ensured that a transition from a consistent state to a consistent state is made.
(3) Isolation Ensures that the results of multiple processes executed in parallel are the same as if they were executed in series in some order.
(4) Persistence (durability) The result of a fully executed process ensures that it will be recovered even if a failure occurs.
[0007]
In order to realize these, the transaction management unit performs commit processing after the processing of each transaction is completed. As a method of commit processing, two-phase commit is representative and often used. There are other methods that improve various two-phase commits, including three-phase commit.
[0008]
For example, FIG. 29 shows the operation of the two-phase commit method in the case of transaction processing by the transaction management unit 361 and the two processes 362 and 363 as shown in FIG. FIG. 29 shows the interaction between the components over time. Here, one transaction is processed by two processes of process 362 and process 363. When the transaction processing is completed, the transaction management unit 361 performs a commit process on all processes (in this case, the process 362 and the process 363) involved in the execution of the transaction. The commit process consists of two phases, a voting phase and a decision phase. First, the voting phase issues a VOTE-REQ request for inquiring whether each transaction can be committed, that is, correctly completed, to each process. Each process answers yes or no. If the answer is YES, each process records the transaction execution result in a log, makes the process result recoverable even if a failure occurs, and then responds YES. If there is some trouble or abnormality and processing cannot be performed normally, NO is returned. When a response of YES or NO is returned from all processes to the transaction management unit, the voting phase ends and the next decision phase is entered. Only when all processes answer YES, in the decision phase, the transaction manager issues a COMMIT request to each process. The process that has received the COMMIT request performs processing such as permanent data update, assuming that the corresponding transaction has been normally completed.
[0009]
If there is at least one process that responds NO in the voting phase, the transaction cannot be completed correctly. In such a case, an abort process is performed as shown in FIG. That is, in the decision phase, an ABORT request for instructing all processes to cancel the transaction is issued. The process that receives the ABORT request performs a process of canceling the update of data or the like by the corresponding transaction, and guarantees the atomicity of the transaction.
[0010]
27, 29, and 30 are examples when the process 362 and the process 363 are operating on the same computer. When the process 372 and the process 374 are operating on different computers as shown in FIG. 28, the transaction management unit 371 on the computer A issues a processing request to the transaction management unit 373 on the computer B as shown in FIG. The transaction management unit 373 performs commit processing on the process 374 on behalf of the transaction management unit 371.
[0011]
Transactions processed in this manner are independent processing units as shown in A, B... Of FIG.
[0012]
On the other hand, J.H. Eliot B. Nested transactions (Nested Transactions) disclosed in Moss' “Nested Transactions-An Applied to Reliable Distributed Computing” (The MITPress, 1985) include multiple transactions 421 to 4 as shown in FIG. This is a method for realizing one transaction as a combination of transactions in smaller units. Here, as shown in FIG. 34, the highest-level transaction 431 in the hierarchy is called a top-level transaction, and the lower-level transactions 432 to 434 are called sub-transactions. A top-level transaction and all sub-transactions below it are collectively referred to as a transaction family. In nested transactions, transaction families are treated the same as non-nested non-nested transactions, but subtransactions belonging to the same transaction family are guaranteed atomicity and independence in the same way as non-nested transactions. There are advantages in that they can be executed in parallel between sub-transactions, and aborts due to failures can be localized at the sub-transaction level.
[0013]
In order to execute a nested transaction, as shown in FIG. 36, a process 452 that can execute a nested transaction, a process 453 that cannot execute a nested transaction, and a transaction management unit 451 that can manage the nested transaction exist on the computer. Must. When the processes are distributed on a plurality of computers, as shown in FIG. 37, a process 462 and a transaction management unit 461 that can execute a nested transaction in each computer, and a process 464 and a transaction that cannot execute a nested transaction. A management unit 463 is placed.
[0014]
Unlike the case of a non-nested transaction, the commit processing of a nested transaction must cope with two cases of the commit processing of a top-level transaction and the commit processing of a sub-transaction. FIG. 38 and FIG. 39 show an example of the commit process of the nested transaction. Here, a case is considered in which both a top-level transaction T441 and its sub-transaction S442 as shown in FIG. 35 are executed by a process. FIG. 38 shows a case where two processes exist on the same computer and one transaction management unit manages them. FIG. 39 shows a case where each process exists on a different computer and is managed by a transaction management unit on each computer.
[0015]
First, the sub-transaction commit process is performed. In the examples of FIGS. 38 and 39, the transaction manager only records that the sub-transaction has been committed, and does not instruct the process. At the time of committing a sub-transaction, a method of doing nothing like this example is often used, but an implementation method in which processing similar to normal two-phase commit is performed on a sub-transaction is also possible.
[0016]
The commit process for the top-level transaction is the same as that for the non-nested transaction. However, when a top-level transaction commits, it is necessary to ensure that not only the data etc. updated by the top-level transaction but also the data etc. updated by all its sub-transactions are recorded permanently. is there. Similarly, if a top-level transaction aborts, all its subtransactions must be aborted. As described above, the committed state of the sub-transaction is only temporary, and there is a case where the state is overturned by a higher-level transaction. A process that can execute a nested transaction must be able to execute such processing in response to a request from the transaction management unit, and this is different from a process that cannot execute a nested transaction.
[0017]
[Problems to be solved by the invention]
In the conventional transaction processing method, in order to perform nested transaction processing, there must be a transaction manager capable of managing nested transactions and a process capable of executing nested transactions. Therefore, if a conventional database management system or application program process that cannot execute a nested transaction is used for the nested transaction processing, the process program must be rewritten so that the nested transaction can be executed. In addition, a conventional transaction management unit that cannot manage nested transactions and a computer that has a process that cannot manage nested transactions and a computer that has a transaction management unit that can manage nested transactions are combined. Transaction processing was impossible.
[0018]
The present invention has been made in consideration of the above circumstances, and can execute nested transaction processing even when there is a process that cannot execute a nested transaction or a computer having a transaction management unit that cannot manage a nested transaction. The purpose is to provide a transaction management method.
[0019]
[Means for Solving the Problems]
The present invention relates to a transaction processing management method (using a transaction management means capable of managing nested transactions) in a transaction processing system including a process capable of executing a nested transaction and a process not capable of executing a nested transaction. A sub-transaction of a nested transaction is executed by each of the executable process and the process that cannot execute the nested transaction, a commit process is performed on the sub-transaction executed by the process that can execute the nested transaction, and the top of the nested transaction is executed. Level transaction is executed, the executed top level transaction is committed, and the top level transaction is executed. Upon completion of commit processing of Le transaction, characterized in that to complete the commit processing for the sub-transactions performed by the nested transaction infeasible process.
[0020]
Preferably, the commit process for the sub-transaction executed by the process that cannot execute the nested transaction may be performed in parallel with the commit process for the top-level transaction.
[0021]
Preferably, the voting phase of the commit process for the sub-transaction executed by the process that cannot execute the nested transaction is performed in parallel with the commit process for the sub-transaction executed by the process that can execute the nested transaction, The determination phase of the commit process for the sub-transaction executed by the process that cannot execute the nested transaction may be performed in parallel with the commit process of the top-level transaction.
[0022]
Preferably, the voting phase of the commit process for the sub-transaction executed by the process that cannot execute the nested transaction is set to the commit process for the sub-transaction executed by the process that can execute the nested transaction and the top level of the nested transaction. It may be performed in parallel with the execution of the transaction, and the decision phase of the commit process for the sub-transaction executed by the process that cannot execute the nested transaction may be performed in parallel with the commit process of the top-level transaction.
[0023]
Preferably, the voting phase of the commit process for the sub-transaction executed by the process that cannot execute the nested transaction is performed in parallel with the execution of the top-level transaction of the nested transaction, and the process that cannot execute the nested transaction The determination phase of the commit process for the executed sub-transaction may be performed in parallel with the commit process of the top level transaction.
[0024]
As a result, according to the transaction processing management method of the present invention, for a sub-transaction executed without being aware that a process that cannot execute nested transaction processing is nested, the commit processing of the transaction is performed. Since the process of the deterministic process is delayed until the process of the deterministic process of the commit process of the top-level transaction, the transactional properties such as atomicity, persistence, consistency, and isolation of the transaction are not sacrificed. In addition, the voting phase of the commit process of a transaction executed by a process that cannot execute a nested transaction and the vote result of the voting phase of a commit process of a nested top-level transaction are combined to determine the possibility of determining both transactions. Therefore, the transactional properties such as atomicity, persistence, consistency, and isolation of the entire nested transaction can be guaranteed.
[0025]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
[0026]
A transaction processing method applied to the distributed processing described above will be described.
[0027]
(First embodiment)
FIG. 6 shows a case where the top-level transaction T and its sub-transaction S manage a process 122 that can execute a nested transaction and a process 123 that cannot execute a nested transaction by the transaction management unit 121 as shown in FIG. Shows the commit process.
[0028]
FIG. 2 shows the configuration of the transaction management unit 121 in this case. In this case, the transaction management unit 121 manages two tables, a process table 1211 and a transaction table 1212. The process table 1211 records whether or not a nested transaction can be executed for a process involved in transaction processing on the computer. The transaction table 1212 shows the transaction identifier of the transaction currently being processed, the transaction identifier of the transaction that directly corresponds to the parent in the hierarchical relationship, the state indicating whether the transaction is being executed or committed, and which process the transaction is processed by. Information on whether the transaction is being processed or on which other computer the transaction is being processed. Then, such a transaction management unit 121 performs a commit process to be described later with reference to these two tables.
[0029]
In this case, the transaction management unit 121 performs the commit process for the sub-transaction S according to the flow shown in FIG. At this time, the transaction management unit 121 simply records that the sub-transaction S is committed in the transaction table, and does not instruct the process 122 or process 123. At this time, an implementation method is also possible in which processing similar to that of the conventional two-phase commit is performed. Thereafter, when the processing of the top level transaction T is completed, the commit processing of the top level transaction is started. First, in the voting phase, VOTE-REQ (T) is sent to the process 122 that can execute the nested transaction involving T. Further, VOTE-REQ (S) is sent to the process 123 that cannot execute the nested transaction involved in the T sub-transaction S (steps S141 to S143).
[0030]
If a response of YES (T) is returned from the process 122 and YES (S) is returned from the process 123, the process proceeds to the next decision phase. In the decision phase, COMMIT (T) is sent to the process 122, and COMMIT (S) is sent to the process 123 that cannot execute the nested transaction involved in the transaction S. This completes the commit process for the entire transaction family (steps S144 to S146). In addition, when abort is determined in the voting phase of the top-level commit processing, the top-level transaction is aborted in a process that can execute the nested transaction, and the nested transaction is executed by executing the sub-transaction. The abort process of the corresponding transaction is also performed for the impossible process (steps S147 and S148).
[0031]
On the other hand, FIG. 7 is nested when the process 132 and the process 142 are executed on different computers 13 and 14 as shown in FIG. 4 and the transaction management units 131 and 141 exist in the respective computers 13 and 14. This shows transaction commit processing. In this case, as shown in FIGS. 1A and 1B, the transaction management units 131 and 141 manage two tables of the process tables 1311 and 1411 and the transaction tables 1312 and 1412 as in the case of the transaction management unit 121 described above. doing.
[0032]
Then, the transaction management unit 131 looks at the transaction table 1312 and knows that the transaction S has spread to the computer 14 and directly commits the transaction S to the process 142 that cannot execute the nested transaction processing on the computer 14. Instead, the communication means 15 informs the transaction manager 141 to perform the commit process of the top-level transaction T. In response to this, the transaction management unit 141 looks at the transaction table 1412 and the process table 1411 and performs the commit process of the transaction S to the process 142 that cannot execute the nested transaction.
[0033]
Note that the transaction management unit according to the present embodiment can be realized as an independent process, or can be realized by linking to a process that performs transaction processing in the form of a library or the like. In addition, the function of the transaction management unit can be incorporated into the operating system of the computer. In the present embodiment, the present invention is applied to the two-phase commit method. However, the present invention can be similarly applied to a commit processing method including a voting phase and a decision phase, such as a three-phase commit method. is there.
[0034]
(Second Embodiment)
In the first embodiment described above, the voting phase and the decision phase of the commit processing of a transaction processed by a process that cannot execute a nested transaction are both performed during the commit processing of the top-level transaction.
[0035]
Such sub-transaction voting phase processing may be performed at any point in time until the decision phase processing of the top-level transaction commit processing is started.
[0036]
Therefore, if processing is performed in the procedure of steps S171 to S179 shown in FIG. 8, for example, the transaction management unit 121 shown in FIG. 3 seems to manage the process 122 that can execute the nested transaction and the non-executable process 123. In this case, as shown in FIG. 9, the voting phase of the commit process for the process that cannot execute the nested transaction can be performed at the time of the commit process of the sub-transaction. It is possible to adopt an implementation method in which only phase processing is performed.
[0037]
In addition, a process 132 that can execute a nested transaction exists on the computer 13 shown in FIG. 4, and a process 142 that cannot execute a nested transaction exists on the computer 14, and both the computers 13 and 14 have a process 142. When the transaction managers 131 and 141 exist, as shown in FIG. 10, the transaction manager 131 sends the sub-transaction S to the transaction manager 141 on a different computer during the commit process of the sub-transaction S. Upon requesting the commit process, the transaction management unit 141 that has received the request can execute the voting phase of the commit process of the sub-transaction S with respect to the process 142 managed by itself.
[0038]
(Third embodiment)
In the second embodiment described above, the completion of the voting process of the commit process of the transaction S is awaited during the commit process of the sub-transaction S. This process is the decisive phase of the commit process of the top-level transaction. It suffices if the process is completed before the process is started.
[0039]
Therefore, if processing is performed according to the procedures of steps S201 to S208 in FIG. 11, for example, in the case of FIG. 3, the commit processing method as in FIG. 12 can be performed, while a plurality of processes as in FIG. When the process is divided into computers, the transaction management unit 131 notifies the transaction management unit 141 of the start of the voting phase of the transaction S commit process during the commit process of the sub-transaction S as shown in FIG. The unit 141 may notify the process 142 incapable of executing the nested transaction managed by itself of the start of the voting phase of the commit process.
[0040]
(Fourth embodiment)
In the second embodiment described above, the voting phase of the commit process for the transaction S is activated during the commit process of the sub-transaction S. This voting phase is activated as shown in FIG. It does not matter even after the processing is completed. This is the same even when the transaction is processed on a plurality of computers as shown in FIG. 4, and the commit processing method as shown in FIG. 15 can be implemented.
[0041]
For example, when a transaction extends to a plurality of computers as shown in FIG. 15, the sub-transaction S is piggybacked when a message is sent from the computer 13 to the computer 14 after the commit processing of the sub-transaction is completed. A request for starting the voting phase of the commit process can be sent from the transaction management unit 131 to the transaction management unit 142.
[0042]
(Fifth embodiment)
In this case, FIG. 16 shows a transaction including a transaction management unit 251 capable of managing a nested transaction and a computer 25 having a process 252, and a conventional transaction management unit 261 unable to manage a nested transaction and a computer 26 having a process 262. A processing device is shown. 17A and 17B show the configuration of the transaction management units 251 and 261, FIG. 18 shows the procedure of the commit process at this time, and FIG. 19 shows the commit process method, respectively.
[0043]
In this case, at the time of commit processing of the sub-transaction S, the transaction management unit 251 only records that the transaction has been committed and does nothing else. At this time, the transaction management unit 261 manages the sub-transaction S as still being executed. When committing the top-level transaction T, the transaction management unit 251 first sends VOTE-REQ (T) to the process 252 that can execute a nested transaction. Next, looking at the node table, it is found that the sub-transaction S has spread to a computer having a transaction management unit that cannot manage nested transactions, and sends VOTE-REQ (S) to the transaction management unit 261 (see FIG. 18 steps S271 to S273).
[0044]
The transaction manager 261 looks at the transaction table and finds that the transaction S is being executed in the process 262, and sends VOTE-REQ (S) to the process 262. When the process 262 completes the voting phase processing and returns YES (S) to the transaction management unit 2, the transaction management unit 261 returns YES (S) to the transaction management unit 251. When the transaction management unit 251 receives YES (T) from the process 252 and YES (S) from the transaction management unit 261, the transaction management unit 251 performs a process of determining the top level transaction. In the decision phase, the transaction management unit 251 sends COMMIT (T) to the process 252. Next, COMMIT (S) is sent to the transaction management unit 261. Receiving it, the transaction management unit 261 sends COMMIT (S) to the process 262 and completes the process of the decision phase (steps S274 to S276 in FIG. 18). If the transaction management unit 251 does not receive YES (T) from the process 252 and YES (S) from the transaction management unit 261, the transaction management unit 251 also performs abort processing for the corresponding transaction (steps S277 and S278).
[0045]
(Sixth embodiment)
In the fifth embodiment described above, the commit process of the transaction S spread to the computer 26 is all performed during the commit process of the top level transaction T. Of these, the voting phase process may be completed before the decision phase process of the commit process of the top-level transaction is started.
[0046]
Therefore, if the commit processing procedure shown in steps S291 to S299 in FIG. 20 and the commit processing method shown in FIG. 21 are used, the voting phase processing of the transaction S can be performed during the sub-transaction commit processing.
[0047]
(Seventh embodiment)
In the fifth embodiment described above, the commit process of the transaction S spread to the computer 26 is all performed during the commit process of the top level transaction T. Of these, the voting phase process may be completed before the decision phase process of the commit process of the top-level transaction is started. Therefore, even when the commit processing procedure shown in steps S311 to S318 in FIG. 22 and the commit processing method shown in FIG. 23 are used, it is possible to instruct the start of processing of the voting phase of transaction S during the commit processing of the sub-transaction. become.
[0048]
(Eighth embodiment)
In the fifth embodiment described above, the commit process of the transaction S spread to the computer 26 is all performed during the commit process of the top level transaction T. Of these, the voting phase process may be completed before the decision phase process of the commit process of the top-level transaction is started. Therefore, if the commit processing method shown in FIG. 24 is used, it is possible to instruct the start of the voting phase processing of the transaction S at an arbitrary time after the commit processing of the sub-transaction. The timing for starting the processing may be notified by piggybacking when some communication occurs from the computer 25 to the computer 26.
[0049]
In addition, this invention is not limited only to the said embodiment, In the range which does not change a summary, it can deform | transform suitably and can be implemented.
[0050]
【The invention's effect】
As described above, according to the transaction processing management method of the present invention, even when a process capable of executing a nested transaction and a non-executable process coexist, the nested transaction processing can be performed. For non-executable processes, those used for non-nested transaction processing can be used as they are.
[Brief description of the drawings]
FIG. 1 is a diagram showing a configuration of a transaction management unit according to a first embodiment of this invention.
FIG. 2 is a diagram showing a configuration of a transaction management unit according to the first embodiment of this invention.
FIG. 3 is a block diagram showing an input transaction processing apparatus according to the first embodiment of the present invention.
FIG. 4 is a configuration diagram showing a distributed transaction processing apparatus according to the first embodiment of this invention.
FIG. 5 is a flowchart for explaining the operation of the first exemplary embodiment of the present invention;
FIG. 6 is a diagram for explaining commit processing in the first embodiment of the present invention;
FIG. 7 is a diagram for explaining commit processing in the first embodiment of the present invention;
FIG. 8 is a flowchart for explaining the operation of the second exemplary embodiment of the present invention;
FIG. 9 is a diagram for explaining commit processing in the second embodiment of the present invention;
FIG. 10 is a diagram for explaining commit processing in the second embodiment of the present invention;
FIG. 11 is a flowchart for explaining the operation of the third exemplary embodiment of the present invention;
FIG. 12 is a diagram for explaining commit processing in the third embodiment of the present invention;
FIG. 13 is a diagram for explaining commit processing in the third embodiment of the present invention;
FIG. 14 is a diagram for explaining commit processing in the fourth embodiment of the present invention;
FIG. 15 is a diagram for explaining commit processing according to the fourth embodiment of the present invention;
FIG. 16 is a configuration diagram showing a distributed transaction processing apparatus according to a fifth embodiment of the present invention;
FIG. 17 is a diagram showing a configuration of a transaction management unit according to the fifth embodiment of this invention;
FIG. 18 is a flowchart for explaining the operation of the fifth embodiment of the present invention;
FIG. 19 is a diagram for explaining commit processing in the fifth embodiment of the present invention;
FIG. 20 is a flowchart for explaining the operation of the sixth embodiment of the present invention;
FIG. 21 is a diagram for explaining commit processing in the sixth embodiment of the present invention;
FIG. 22 is a flowchart for explaining the operation of the seventh embodiment of the present invention;
FIG. 23 is a diagram for explaining commit processing in the seventh embodiment of the present invention;
FIG. 24 is a diagram for explaining commit processing in the eighth embodiment of the present invention;
FIG. 25 is a block diagram showing a conventional transaction processing apparatus.
FIG. 26 is a block diagram showing a conventional distributed transaction processing apparatus.
FIG. 27 is a block diagram showing another conventional transaction processing apparatus.
FIG. 28 is a block diagram showing another conventional distributed transaction processing apparatus.
FIG. 29 is a diagram for explaining commit processing of a conventional transaction processing apparatus.
FIG. 30 is a diagram for explaining an abort process of a conventional transaction processing apparatus.
FIG. 31 is a diagram for explaining commit processing of a conventional transaction processing apparatus;
FIG. 32 is a diagram showing the state of a transaction that is processed independently;
FIG. 33 is a diagram showing a configuration in which transactions are nested to have a hierarchy.
FIG. 34 is a diagram showing a configuration in which transactions are nested to have a hierarchy.
FIG. 35 shows a nested transaction
FIG. 36 is a block diagram showing a nested transaction processing apparatus.
FIG. 37 is a block diagram showing a distributed nested transaction processing device.
FIG. 38 is a diagram showing an example of a commit process of a nested transaction
FIG. 39 is a diagram illustrating an example of commit processing of a nested transaction
[Explanation of symbols]
121 ... Transaction management section
1211 ... Process table
1212 ... Transaction table
122, 123 ... Process
13, 14, 25, 26 ... computer
131, 141, 251 and 261 ... transaction management unit
132, 142, 252, 262 ... process

Claims (5)

入れ子トランザクション実行可能なプロセスと入れ子トランザクション実行不可能なプロセスとを含んだトランザクション処理システムにおけるトランザクション処理の管理方法であって、
前記入れ子トランザクション実行可能なプロセスおよび前記入れ子トランザクション実行不可能なプロセスの各々により、入れ子トランザクションのサブトランザクションを実行させ、
前記入れ子トランザクション実行可能なプロセスにより実行されたサブトランザクションについてコミット処理を行い、
前記入れ子トランザクションのトップレベルトランザクションを実行させ、
実行された前記トップレベルトランザクションのコミット処理を行い、
前記トップレベルトランザクションのコミット処理の完了と共に、前記入れ子トランザクション実行不可能なプロセスにより実行されたサブトランザクションについてのコミット処理を完了させることを特徴とするトランザクション処理の管理方法。
A method for managing transaction processing in a transaction processing system including a process capable of executing a nested transaction and a process not capable of executing a nested transaction,
A sub-transaction of a nested transaction is executed by each of the process that can execute the nested transaction and the process that cannot execute the nested transaction,
Commit processing is performed for the sub-transaction executed by the process capable of executing the nested transaction,
Execute a top-level transaction of the nested transaction;
Commit processing of the executed top-level transaction,
A transaction process management method comprising: completing a commit process for a sub-transaction executed by a process incapable of executing a nested transaction together with completion of the commit process of the top-level transaction.
前記入れ子トランザクション実行不可能なプロセスにより実行されたサブトランザクションについてのコミット処理を、前記トップレベルトランザクションのコミット処理と並行して行うことを特徴とする請求項に記載のトランザクション処理の管理方法。Managing transaction processing according to claim 1, characterized in that the commit processing for the sub-transactions performed by the nested transaction infeasible process, in parallel with the commit process of the top-level transaction. 前記入れ子トランザクション実行不可能なプロセスにより実行されたサブトランザクションについてのコミット処理の投票相を、前記入れ子トランザクション実行可能なプロセスにより実行されたサブトランザクションについてのコミット処理と並行して行い、
前記入れ子トランザクション実行不可能なプロセスにより実行されたサブトランザクションについてのコミット処理の決定相を、前記トップレベルトランザクションのコミット処理と並行して行うことを特徴とする請求項に記載のトランザクション処理の管理方法。
Performing a voting phase of the commit process for the sub-transaction executed by the process that cannot execute the nested transaction in parallel with the commit process for the sub-transaction executed by the process that can execute the nested transaction;
Managing transaction processing according to claim 1, characterized in that the nested transaction infeasible decision phase commit processing for the sub-transactions performed by the process, in parallel with the commit process of the top-level transaction Method.
前記入れ子トランザクション実行不可能なプロセスにより実行されたサブトランザクションについてのコミット処理の投票相を、前記入れ子トランザクション実行可能なプロセスにより実行されたサブトランザクションについてのコミット処理および前記入れ子トランザクションのトップレベルトランザクションの実行と並行して行い、
前記入れ子トランザクション実行不可能なプロセスにより実行されたサブトランザクションについてのコミット処理の決定相を、前記トップレベルトランザクションのコミット処理と並行して行うことを特徴とする請求項に記載のトランザクション処理の管理方法。
The voting phase of the commit process for the sub-transaction executed by the process that cannot execute the nested transaction, the commit process for the sub-transaction executed by the process that can execute the nested transaction, and the execution of the top-level transaction of the nested transaction In parallel with
Managing transaction processing according to claim 1, characterized in that the nested transaction infeasible decision phase commit processing for the sub-transactions performed by the process, in parallel with the commit process of the top-level transaction Method.
前記入れ子トランザクション実行不可能なプロセスにより実行されたサブトランザクションについてのコミット処理の投票相を、前記入れ子トランザクションのトップレベルトランザクションの実行と並行して行い、
前記入れ子トランザクション実行不可能なプロセスにより実行されたサブトランザクションについてのコミット処理の決定相を、前記トップレベルトランザクションのコミット処理と並行して行うことを特徴とする請求項に記載のトランザクション処理の管理方法。
Performing a voting phase of the commit process for the sub-transaction executed by the process that cannot execute the nested transaction in parallel with the execution of the top-level transaction of the nested transaction;
Managing transaction processing according to claim 1, characterized in that the nested transaction infeasible decision phase commit processing for the sub-transactions performed by the process, in parallel with the commit process of the top-level transaction Method.
JP2000353232A 2000-11-20 2000-11-20 Managing transaction processing Expired - Fee Related JP3621641B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000353232A JP3621641B2 (en) 2000-11-20 2000-11-20 Managing transaction processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000353232A JP3621641B2 (en) 2000-11-20 2000-11-20 Managing transaction processing

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP3344685A Division JPH05173988A (en) 1991-12-26 1991-12-26 Decentralized processing system and transaction processing system applied to the same

Publications (2)

Publication Number Publication Date
JP2001188696A JP2001188696A (en) 2001-07-10
JP3621641B2 true JP3621641B2 (en) 2005-02-16

Family

ID=18826022

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000353232A Expired - Fee Related JP3621641B2 (en) 2000-11-20 2000-11-20 Managing transaction processing

Country Status (1)

Country Link
JP (1) JP3621641B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7584474B2 (en) * 2003-02-25 2009-09-01 Bea Systems, Inc. Systems and methods for transaction chaining
US7890472B2 (en) * 2007-09-18 2011-02-15 Microsoft Corporation Parallel nested transactions in transactional memory
US8166481B2 (en) * 2008-10-20 2012-04-24 Microsoft Corporation Transaction processing in transactional memory

Also Published As

Publication number Publication date
JP2001188696A (en) 2001-07-10

Similar Documents

Publication Publication Date Title
JPH05173988A (en) Decentralized processing system and transaction processing system applied to the same
US7925764B2 (en) Method, apparatus and computer program product for integrating heterogeneous systems
US20020035590A1 (en) Guaranteed end-to-end transaction execution in a client/server environment
US6470342B1 (en) Process of maintaining a distributed map of transaction identifiers and using hashing to access these maps
US6785722B2 (en) Apparatus, methods, and computer program products for transactional support of network management operations
US6728958B1 (en) Volatile resource manager with pre-prepare notification
US20050076070A1 (en) Method, apparatus, and computer readable medium for managing replication of back-up object
JPH0836513A (en) Data management method and restoration method of data-management error
US8504873B1 (en) Method and apparatus for providing in-memory checkpoint services within a distributed transaction
CN101438248A (en) Recovery mechanism for transactions
JPH0756866A (en) Method and equipment for controlling of transaction as well as computer program product
JPH06168169A (en) Distributed transaction processing using two-phase commit protocol provided with assumption commit without log force
CN102713850B (en) The workload manager and the method it uses
CA2498064C (en) A data processing system adapted to integrating non-homogeneous processes
JP3621641B2 (en) Managing transaction processing
EP2131279B1 (en) System and method for a generic integration of a database into a high availability cluster
CN116319241B (en) Transaction processing method, transaction processing device and electronic equipment
US20030046258A1 (en) Method and system for removal of resource manager affinity during restart in a transaction processing system
Di Stefano et al. A distributed heterogeneous database system based on mobile agents
US6076095A (en) Method of one system of a multisystem environment taking over log entries owned by another system
US6772176B1 (en) Coordinating a distributed transaction between participants unable to follow a two-phase commit
JP3330006B2 (en) Network system including information storage system, input system of the system, and
JP2001350660A (en) Program execution management device and computer- readable storage media with program recorded thereon
US20060123069A1 (en) Method and system for deferred synchronisation of data
Böttcher et al. Reducing sub-transaction aborts and blocking time within atomic commit protocols

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040406

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040423

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20041116

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20041118

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20071126

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081126

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees