Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7079573B2 - Optimistic exclusive processing serialization device, optimistic exclusive processing serialization method, and optimistic exclusive processing serialization program - Google Patents
[go: Go Back, main page]

JP7079573B2 - Optimistic exclusive processing serialization device, optimistic exclusive processing serialization method, and optimistic exclusive processing serialization program - Google Patents

Optimistic exclusive processing serialization device, optimistic exclusive processing serialization method, and optimistic exclusive processing serialization program Download PDF

Info

Publication number
JP7079573B2
JP7079573B2 JP2017139183A JP2017139183A JP7079573B2 JP 7079573 B2 JP7079573 B2 JP 7079573B2 JP 2017139183 A JP2017139183 A JP 2017139183A JP 2017139183 A JP2017139183 A JP 2017139183A JP 7079573 B2 JP7079573 B2 JP 7079573B2
Authority
JP
Japan
Prior art keywords
transaction
target data
update
target
execution
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2017139183A
Other languages
Japanese (ja)
Other versions
JP2019021043A (en
Inventor
英晴 永井
剛光 上野
Original Assignee
株式会社オービック
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 株式会社オービック filed Critical 株式会社オービック
Priority to JP2017139183A priority Critical patent/JP7079573B2/en
Publication of JP2019021043A publication Critical patent/JP2019021043A/en
Application granted granted Critical
Publication of JP7079573B2 publication Critical patent/JP7079573B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は、楽観的排他処理直列化装置、楽観的排他処理直列化方法、および、楽観的排他処理直列化プログラムに関する。 The present invention relates to an optimistic exclusive processing serialization apparatus, an optimistic exclusive processing serialization method, and an optimistic exclusive processing serialization program.

特許文献1には、入力されるトランザクション自体にロックを取得して動作するか否かの属性を予め備えさせておき、トランザクションの実行の前段階としてロック取得に対する楽観的排他制御をかける構成が開示されている。 Patent Document 1 discloses a configuration in which an input transaction itself is provided with an attribute of whether or not a lock is acquired and operates in advance, and optimistic exclusive control for lock acquisition is applied as a pre-stage of transaction execution. Has been done.

特開2016-95638号公報Japanese Unexamined Patent Publication No. 2016-95638

しかしながら、上記特許文献1においては、
トランザクション自体にロックを取得して動作するか否かの属性を予め設定しておく必要があるだけでなく、ロックを取得しないで動作するトランザクション同士の間では、通常の楽観的排他制御になってしまうという課題があった。
However, in the above Patent Document 1,
Not only is it necessary to preset the attribute of whether or not to acquire a lock in the transaction itself, but it is also a normal optimistic concurrency control between transactions that operate without acquiring a lock. There was a problem of closing it.

本発明は、上記問題点に鑑みてなされたものであって、楽観的排他処理自体をデータベースのトランザクション特性を利用して複数ユーザによる排他処理を直列化することにより、排他処理の堅牢性と一貫性とを担保できるようにする楽観的排他処理直列化装置、楽観的排他処理直列化方法、および、楽観的排他処理直列化プログラムを提供することを目的とする。 The present invention has been made in view of the above problems, and the optimistic exclusive processing itself is made consistent with the robustness of the exclusive processing by serializing the exclusive processing by a plurality of users by utilizing the transaction characteristics of the database. It is an object of the present invention to provide an optimistic exclusive processing serialization device, an optimistic exclusive processing serialization method, and an optimistic exclusive processing serialization program that enable the assurance of sex.

上述した課題を解決し、目的を達成するために、本発明に係る楽観的排他処理直列化装置は、記憶部と制御部とを備えた楽観的排他処理直列化装置であって、前記記憶部は、対象データを記憶する対象データ記憶手段、を備え、前記制御部は、前記対象データ記憶手段に記憶された前記対象データに対するトランザクションを実行させるトランザクション実行手段と、前記対象データ記憶手段に記憶された前記対象データに対する前記トランザクションとは別の別トランザクションを実行させる別トランザクション実行手段と、前記トランザクション内でオブジェクトが作成された場合、前記別トランザクション内での当該オブジェクトと同名の同名オブジェクトの作成要求を検出する排他チェック手段と、前記排他チェック手段により前記別トランザクション内で前記同名オブジェクトの作成要求が検出された場合、当該別トランザクションの実行を中断させて待機させる待機手段と、前記トランザクション実行手段により前記トランザクションの実行が完了した場合、当該トランザクションをコミットさせ、前記トランザクション実行手段により前記トランザクションの実行にエラーが生じた場合、当該トランザクションをロールバックさせるトランザクション確定手段と、前記トランザクション確定手段により前記トランザクションがコミットまたはロールバックされた場合、前記待機手段による前記別トランザクションの待機を解除する待機解除手段と、を備えたことを特徴とする。 In order to solve the above-mentioned problems and achieve the object, the optimistic exclusive processing serialization device according to the present invention is an optimistic exclusive processing serialization device including a storage unit and a control unit, and the storage unit. Is provided with a target data storage means for storing the target data, and the control unit is stored in the target data storage means and a transaction execution means for executing a transaction for the target data stored in the target data storage means. Another transaction execution means for executing another transaction different from the transaction for the target data, and when an object is created in the transaction, a request to create an object with the same name as the object in the other transaction is requested. The exclusive check means to detect, the standby means for suspending the execution of the other transaction and waiting when the request for creating the object with the same name is detected in the other transaction by the exclusive check means, and the transaction execution means. When the execution of the transaction is completed, the transaction is committed, and when an error occurs in the execution of the transaction by the transaction execution means, the transaction is committed by the transaction confirmation means for rolling back the transaction and the transaction confirmation means. Alternatively, when it is rolled back, it is provided with a wait release means for canceling the wait of the other transaction by the wait means.

また、本発明に係る楽観的排他処理直列化装置は、前記制御部は、前記トランザクションがコミットされた場合、当該トランザクションに基づいて、前記対象データ記憶手段に記憶された前記対象データを更新する更新手段と、前記更新手段により更新された前記対象データに対する更新を制限する制限手段と、を更に備えたことを特徴とする。 Further, in the optimistic exclusive processing serialization device according to the present invention, when the transaction is committed, the control unit updates the target data stored in the target data storage means based on the transaction. It is characterized by further comprising means and limiting means for limiting the update of the target data updated by the updating means.

また、本発明に係る楽観的排他処理直列化装置は、前記制御部は、前記別トランザクションのユーザに対して、前記トランザクションの実行対象である前記対象データの対象リストを通知する通知手段と、前記通知手段により通知された前記対象リストに含まれる前記対象データが前記ユーザにより上書更新対象として選択された場合、当該上書更新対象の前記対象データを特定する上書更新対象特定手段と、を更に備え、前記更新手段は、更に、前記上書更新対象特定手段により前記上書更新対象の対象データが特定された場合、前記制限手段による制限を解除し、前記別トランザクションに基づいて、前記対象データ記憶手段に記憶された当該上書更新対象の対象データを更新することを特徴とする。 Further, in the optimistic exclusive processing serialization device according to the present invention, the control unit notifies the user of the other transaction of the target list of the target data which is the execution target of the transaction, and the notification means. When the target data included in the target list notified by the notification means is selected as the overwriting update target by the user, the overwriting update target specifying means for specifying the target data of the overwriting update target. Further, when the target data of the overwriting update target is specified by the overwriting update target specifying means, the updating means further releases the restriction by the limiting means, and the target is based on the other transaction. It is characterized in that the target data of the overwriting update target stored in the data storage means is updated.

また、本発明に係る楽観的排他処理直列化装置は、前記トランザクション確定手段は、更に、前記トランザクション実行手段により前記トランザクションの実行が完了した場合、前記オブジェクトを削除することを特徴とする。 Further, the optimistic exclusive processing serialization device according to the present invention is characterized in that the transaction determination means further deletes the object when the execution of the transaction is completed by the transaction execution means.

また、本発明に係る楽観的排他処理直列化装置は、前記トランザクション確定手段は、更に、前記トランザクション実行手段により前記トランザクションの実行にエラーが生じた場合、前記オブジェクトを削除することを特徴とする。 Further, the optimistic exclusive processing serialization device according to the present invention is characterized in that the transaction determination means further deletes the object when an error occurs in the execution of the transaction by the transaction execution means.

また、本発明に係る楽観的排他処理直列化方法は、記憶部と制御部とを備えた楽観的排他処理直列化装置に実行させるための楽観的排他処理直列化方法であって、前記記憶部は、対象データを記憶する対象データ記憶手段、を備え、前記制御部で実行させる、前記対象データ記憶手段に記憶された前記対象データに対するトランザクションを実行させるトランザクション実行ステップと、前記対象データ記憶手段に記憶された前記対象データに対する前記トランザクションとは別の別トランザクションを実行させる別トランザクション実行ステップと、前記トランザクション内でオブジェクトが作成された場合、前記別トランザクション内での当該オブジェクトと同名の同名オブジェクトの作成要求を検出する排他チェックステップと、前記排他チェックステップにて前記別トランザクション内で前記同名オブジェクトの作成要求が検出された場合、当該別トランザクションの実行を中断させて待機させる待機ステップと、前記トランザクションの実行が完了した場合、当該トランザクションをコミットさせ、前記トランザクションの実行にエラーが生じた場合、当該トランザクションをロールバックさせるトランザクション確定ステップと、前記トランザクション確定ステップにて前記トランザクションがコミットまたはロールバックされた場合、前記別トランザクションの待機を解除する待機解除ステップと、を含むことを特徴とする。 Further, the optimistic exclusive processing serialization method according to the present invention is an optimistic exclusive processing serialization method for causing an optimistic exclusive processing serialization device including a storage unit and a control unit to execute the storage unit. Provides a target data storage means for storing target data, a transaction execution step for executing a transaction for the target data stored in the target data storage means, which is executed by the control unit, and the target data storage means. Another transaction execution step to execute another transaction different from the transaction for the stored target data, and when an object is created in the transaction, create an object with the same name as the object in the other transaction. An exclusive check step for detecting a request, a waiting step for suspending execution of the other transaction and waiting when a request for creating the object with the same name is detected in the other transaction in the exclusive check step, and a waiting step for the transaction. When the execution is completed, the transaction is committed, and when an error occurs in the execution of the transaction, the transaction confirmation step for rolling back the transaction and the transaction for which the transaction is committed or rolled back in the transaction confirmation step. , The wait release step for canceling the wait of the other transaction, and the like.

また、本発明に係る楽観的排他処理直列化プログラムは、記憶部と制御部とを備えた楽観的排他処理直列化装置に実行させるための楽観的排他処理直列化プログラムであって、前記記憶部は、対象データを記憶する対象データ記憶手段、を備え、前記制御部において、前記対象データ記憶手段に記憶された前記対象データに対するトランザクションを実行させるトランザクション実行ステップと、前記対象データ記憶手段に記憶された前記対象データに対する前記トランザクションとは別の別トランザクションを実行させる別トランザクション実行ステップと、前記トランザクション内でオブジェクトが作成された場合、前記別トランザクション内での当該オブジェクトと同名の同名オブジェクトの作成要求を検出する排他チェックステップと、前記排他チェックステップにて前記別トランザクション内で前記同名オブジェクトの作成要求が検出された場合、当該別トランザクションの実行を中断させて待機させる待機ステップと、前記トランザクションの実行が完了した場合、当該トランザクションをコミットさせ、前記トランザクションの実行にエラーが生じた場合、当該トランザクションをロールバックさせるトランザクション確定ステップと、前記トランザクション確定ステップにて前記トランザクションがコミットまたはロールバックされた場合、前記別トランザクションの待機を解除する待機解除ステップと、を実行させることを特徴とする。 Further, the optimistic exclusive processing serialization program according to the present invention is an optimistic exclusive processing serialization program for being executed by an optimistic exclusive processing serialization device including a storage unit and a control unit, and is the storage unit. Is provided with a target data storage means for storing the target data, and in the control unit, a transaction execution step for executing a transaction for the target data stored in the target data storage means and a transaction execution step stored in the target data storage means. Another transaction execution step to execute another transaction different from the transaction for the target data, and when an object is created in the transaction, a request to create an object with the same name as the object in the other transaction is requested. When the exclusive check step to be detected and the request to create the object with the same name are detected in the other transaction in the exclusive check step, the execution of the other transaction is interrupted and waits, and the execution of the transaction is performed. When completed, the transaction is committed, and when an error occurs in the execution of the transaction, the transaction confirmation step for rolling back the transaction, and when the transaction is committed or rolled back in the transaction confirmation step, the transaction is described. It is characterized by executing a wait release step for canceling a wait for another transaction.

本発明によれば、楽観的排他処理に対して悲観的排他処理を行うことで、楽観的排他処理を占有および直列化させることができるため、楽観的排他処理のデメリットを回避することができるという効果を奏する。また、本発明によれば、リレーショナルデータベースマネジメントシステム(RDBMS)の性質を応用した悲観的排他処理を実現することができるという効果を奏する。また、本発明によれば、データ取得から更新終了ではなく、処理開始から排他チェック終了までに待機時間を抑えることができるため、ロック待ちの待機時間を圧縮することができるという効果を奏する。また、本発明によれば、悲観的排他処理と異なり、エラー時でも強い確実なロック解放を行うことができるという効果を奏する。また、本発明によれば、ユーザ判断による選択的排他を実行することができるという効果を奏する。 According to the present invention, by performing the optimistic exclusive processing with respect to the optimistic exclusive processing, the optimistic exclusive processing can be occupied and serialized, so that the disadvantage of the optimistic exclusive processing can be avoided. It works. Further, according to the present invention, there is an effect that pessimistic exclusive processing can be realized by applying the property of a relational database management system (RDMS). Further, according to the present invention, it is possible to suppress the waiting time from the start of processing to the end of the exclusive check, not from the data acquisition to the end of update, so that it is possible to reduce the waiting time of lock waiting. Further, according to the present invention, unlike the pessimistic exclusion process, there is an effect that a strong and reliable lock release can be performed even at the time of an error. Further, according to the present invention, there is an effect that selective exclusion based on a user's judgment can be executed.

図1は、複数人による同時更新の一例を示す図である。FIG. 1 is a diagram showing an example of simultaneous update by a plurality of people. 図2は、悲観的排他処理の一例を示す図である。FIG. 2 is a diagram showing an example of pessimistic exclusion processing. 図3は、楽観的排他処理の一例を示す図である。FIG. 3 is a diagram showing an example of optimistic exclusion processing. 図4は、楽観的排他処理の一例を示す図である。FIG. 4 is a diagram showing an example of optimistic exclusion processing. 図5は、楽観的排他処理直列化装置の構成の一例を示すブロック図である。FIG. 5 is a block diagram showing an example of the configuration of the optimistic exclusive processing serialization device. 図6は、本実施形態における楽観的排他処理直列化装置の処理の一例を示すフローチャートである。FIG. 6 is a flowchart showing an example of the processing of the optimistic exclusive processing serialization apparatus in the present embodiment. 図7は、本実施形態における楽観的排他処理直列化フローの一例を示す図である。FIG. 7 is a diagram showing an example of an optimistic exclusive processing serialization flow in the present embodiment. 図8は、本実施形態における排他トランザクションの一例を示す図である。FIG. 8 is a diagram showing an example of an exclusive transaction in the present embodiment. 図9は、本実施形態における待機処理の一例を示す図である。FIG. 9 is a diagram showing an example of standby processing in the present embodiment. 図10は、本実施形態における待機処理の一例を示す図である。FIG. 10 is a diagram showing an example of standby processing in this embodiment. 図11は、本実施形態における楽観的排他制御の一例を示す図である。FIG. 11 is a diagram showing an example of optimistic concurrency control in the present embodiment. 図12は、本実施形態における楽観的排他制御の一例を示す図である。FIG. 12 is a diagram showing an example of optimistic concurrency control in the present embodiment. 図13は、本実施形態における選択的上書更新処理の一例を示す図である。FIG. 13 is a diagram showing an example of the selective overwriting update process in the present embodiment.

本発明の実施形態を図面に基づいて詳細に説明する。なお、本発明は本実施形態により限定されるものではない。 Embodiments of the present invention will be described in detail with reference to the drawings. The present invention is not limited to the present embodiment.

[1.概要]
まず、図1から図4を参照して、従来のデータベース更新処理の一例について説明する。図1は、複数人による同時更新の一例を示す図である。図2は、悲観的排他処理の一例を示す図である。図3および図4は、楽観的排他処理の一例を示す図である。
[1. Overview]
First, an example of the conventional database update process will be described with reference to FIGS. 1 to 4. FIG. 1 is a diagram showing an example of simultaneous update by a plurality of people. FIG. 2 is a diagram showing an example of pessimistic exclusion processing. 3 and 4 are diagrams showing an example of optimistic exclusion processing.

図1に示すように、従来のデータベース更新処理においては、複数人(UserAおよびUserB)がデータベースに記憶された伝票データ(J001)に対して同時に更新を実行した場合、J001をもとにした売上が二重計上される不整合が生じることがあった。 As shown in FIG. 1, in the conventional database update process, when a plurality of people (UserA and UserB) simultaneously update the slip data (J001) stored in the database, the sales based on J001 Inconsistencies may occur in which is double-counted.

また、図2に示すように、従来の悲観的排他処理においては、排他テーブルを参照して、先にUserAの処理がJ001を使用していることが検知された場合、UserBの処理によるJ001の呼出が不可とされ、データを明示的にロックすることで、他者(UserB)の操作を封じる状態にし、UserAの処理が完全に完了後、排他テーブルをクリアしてUserBの処理の操作を可能にしていた。 Further, as shown in FIG. 2, in the conventional pessimistic exclusive processing, when it is detected that the processing of UserA uses J001 first by referring to the exclusive table, the processing of J001 by the processing of UserB is performed. Calling is disabled, and by explicitly locking the data, the operation of another person (UserB) can be blocked, and after the UserA processing is completely completed, the exclusive table can be cleared and the UserB processing operation can be performed. I was doing it.

このように、従来の悲観的排他処理においては、何らかの手法を用いてデータ取得時にデータロックを行っていた。それにより、従来の悲観的排他処理においては、一人のユーザが呼出中は、他のユーザは必ずロック待ちの状態になってしまっていた。また、従来の悲観的排他処理においては、呼出中のユーザがWebアプリケーションにてブラウザを閉じる操作を行ってしまったり、接続を切断したりした場合、データがロックされたままになってしまっていた。 As described above, in the conventional pessimistic exclusive processing, data lock is performed at the time of data acquisition by using some method. As a result, in the conventional pessimistic exclusive processing, while one user is calling, the other user is always in the lock waiting state. Further, in the conventional pessimistic exclusive processing, when the calling user closes the browser in the Web application or disconnects the connection, the data remains locked. ..

すなわち、従来の悲観的排他処理においては、Webアプリケーションにおけるロック解放失敗の発生頻度が高いため、データの整合性を保てるものの、随時必要に応じて開放する負荷が高くなっていた。また、従来の悲観的排他処理においては、ロック待ちが発生することでWebサイトのタイムアウトを誘発し、ユーザのシステム操作に影響を及ぼしていたため、通常運用を円滑に回すことを目的とした場合、楽観的排他処理が採用されていた。 That is, in the conventional pessimistic exclusive processing, the frequency of lock release failures in the Web application is high, so that the data consistency can be maintained, but the load of releasing the data as needed is high. In addition, in the conventional pessimistic exclusive processing, a lock wait occurs, which induces a time-out of the website and affects the system operation of the user. Optimistic exclusion processing was adopted.

一方、図3に示すように、従来の楽観的排他処理においては、先にUserAの処理がJ001を使用していたとしても、先にUserBの処理がJ001を更新したことが検知された場合、すなわち、UserAの処理の処理完了前に、J001のデータ取得時のタイムスタンプと現在のタイムスタンプとを比較して異なっていた場合、UserBの先勝有効となり、UserAの処理を破棄(ロールバック)していた。 On the other hand, as shown in FIG. 3, in the conventional optimistic exclusive processing, even if the processing of UserA uses J001 first, when it is detected that the processing of UserB updates J001 first, That is, if the time stamp at the time of data acquisition of J001 and the current time stamp are different before the processing of UserA processing is completed, UserB's first-come-first-served basis becomes valid and UserA's processing is discarded (rollback). Was there.

このように、従来の楽観的排他処理においては、ロックを掛けることはないが、処理の最後でチェックを行うため、NGとなった場合に、処理に要した時間が無駄になってしまっていた。 In this way, in the conventional optimistic exclusive processing, the lock is not applied, but since the check is performed at the end of the processing, the time required for the processing is wasted when the result is NG. ..

また、図4に示すように、従来の楽観的排他処理においては、UserAの処理が大量データ処理中にUserBの処理が1伝票(J001)のみデータ処理を行う際に、UserAの処理が更新日時確認を行っている最中にUserBの処理が全ての処理が完了した場合、UserAの処理は既に更新日時確認中であるが、UserBの処理による更新日時変更を検知できず、そのままJ001に対する売上が二重計上される不整合が生じることがあった。 Further, as shown in FIG. 4, in the conventional optimistic exclusive processing, when the processing of UserA performs data processing for only one slip (J001) while the processing of UserA is processing a large amount of data, the processing of UserA is the update date and time. If all the processing of UserB is completed during the confirmation, the processing of UserA is already confirming the update date and time, but the change of the update date and time due to the processing of UserB cannot be detected, and the sales to J001 are as it is. Inconsistencies that were double-counted could occur.

このように、従来の楽観的排他処理においては、更新が同時に発生した場合、または、処理量が多い場合、チェックをすり抜ける可能性があった。すなわち、従来の楽観的排他処理においては、データの大規模化または処理内容の複雑化によって、相当な時間が経過した上で更新が破棄されてしまう、または、排他チェックの時間が重複してしまい、チェックが正常に掛からないといったケースが発生していた。 As described above, in the conventional optimistic exclusive processing, there is a possibility that the check may be bypassed when the updates occur at the same time or when the processing amount is large. That is, in the conventional optimistic exclusive processing, due to the large scale of data or the complexity of the processing content, the update is discarded after a considerable amount of time has passed, or the exclusive check time overlaps. , There were cases where the check did not work properly.

以上のように、従来、相当量の伝票に対する一括更新処理等を行うWeb商材等において、複数ユーザ間で同時に処理対象データを奪い合うような場合、楽観的排他処理では限界が出てきていた。また、従来、確実な悲観的排他制御を掛けた場合、他のユーザの更新完了を待たなければならないため、ユーザの無駄な待機時間が必要となってしまうこと、および、条件緩和した楽観的排他制御を掛けた場合、同時実行性を捨てなければならないことの2点を同時にクリアすることが難しかった。 As described above, in the past, in Web products and the like that perform batch update processing for a considerable amount of slips, when a plurality of users are competing for data to be processed at the same time, the optimistic exclusive processing has reached its limit. In addition, in the past, when reliable pessimistic concurrency control was applied, it was necessary to wait for the update completion of other users, which required unnecessary waiting time for the user, and optimistic concurrency with relaxed conditions. When control was applied, it was difficult to clear the two points of having to abandon concurrency at the same time.

そこで、本実施形態においては、データに対する悲観的排他制御を掛けることが難しいWeb商材等において採用する楽観的排他処理のデメリットである堅牢性・一貫性・排他検出時間を解消できるようにしている。 Therefore, in the present embodiment, robustness, consistency, and exclusive detection time, which are disadvantages of optimistic exclusive processing adopted in Web products and the like where it is difficult to apply pessimistic exclusive control to data, can be eliminated. ..

[2.構成]
本実施形態に係る楽観的排他処理直列化装置100の構成の一例について、図5を参照して説明する。図5は、楽観的排他処理直列化装置100の構成の一例を示すブロック図である。
[2. Constitution]
An example of the configuration of the optimistic exclusive processing serialization device 100 according to the present embodiment will be described with reference to FIG. FIG. 5 is a block diagram showing an example of the configuration of the optimistic exclusive processing serialization device 100.

楽観的排他処理直列化装置100は、市販のデスクトップ型パーソナルコンピュータである。なお、楽観的排他処理直列化装置100は、デスクトップ型パーソナルコンピュータのような据置型情報処理装置に限らず、市販されているノート型パーソナルコンピュータ、PDA(Personal Digital Assistants)、スマートフォン、タブレット型パーソナルコンピュータなどの携帯型情報処理装置であってもよい。 The optimistic exclusive processing serialization device 100 is a commercially available desktop personal computer. The optimistic exclusive processing serialization device 100 is not limited to a stationary information processing device such as a desktop personal computer, but is not limited to a commercially available notebook personal computer, PDA (Personal Digital Assistants), smartphone, or tablet personal computer. It may be a portable information processing device such as.

楽観的排他処理直列化装置100は、制御部102と通信インターフェース部104と記憶部106と入出力インターフェース部108と、を備えている。楽観的排他処理直列化装置100が備えている各部は、任意の通信路を介して通信可能に接続されている。 The optimistic exclusive processing serialization device 100 includes a control unit 102, a communication interface unit 104, a storage unit 106, and an input / output interface unit 108. Each part of the optimistic exclusive processing serialization device 100 is communicably connected via an arbitrary communication path.

通信インターフェース部104は、ルータ等の通信装置および専用線等の有線または無線の通信回線を介して、楽観的排他処理直列化装置100をネットワーク300に通信可能に接続する。通信インターフェース部104は、他の装置と通信回線を介してデータを通信する機能を有する。ここで、ネットワーク300は、楽観的排他処理直列化装置100とサーバ200とを相互に通信可能に接続する機能を有し、例えばインターネットやLAN(Local Area Network)等である。 The communication interface unit 104 connects the optimistic exclusive processing serialization device 100 to the network 300 so as to be communicable via a communication device such as a router and a wired or wireless communication line such as a dedicated line. The communication interface unit 104 has a function of communicating data with another device via a communication line. Here, the network 300 has a function of connecting the optimistic exclusive processing serialization device 100 and the server 200 so as to be able to communicate with each other, and is, for example, the Internet, a LAN (Local Area Network), or the like.

記憶部106には、各種のデータベース、テーブル、およびファイルなどが格納される。記憶部106には、OS(Operating System)と協働してCPU(Central Processing Unit)に命令を与えて各種処理を行うためのコンピュータプログラムが記録される。記憶部106として、例えば、RAM(Random Access Memory)・ROM(Read Only Memory)等のメモリ装置、ハードディスクのような固定ディスク装置、フレキシブルディスク、および光ディスク等を用いることができる。記憶部106は、対象データデータベース106aを備えている。 Various databases, tables, files, and the like are stored in the storage unit 106. In the storage unit 106, a computer program for giving an instruction to a CPU (Central Processing Unit) in cooperation with an OS (Operating System) to perform various processes is recorded. As the storage unit 106, for example, a memory device such as a RAM (Random Access Memory) / ROM (Read Only Memory), a fixed disk device such as a hard disk, a flexible disk, an optical disk, or the like can be used. The storage unit 106 includes a target data database 106a.

対象データデータベース106aは、対象データを記憶する。ここで、対象データは、複数人が一度に更新(改定)するようなマスタデータ等であってもよい。なお、対象データは、伝票データ、法人データ、個人データ、単価データ、予算改定の対象となる予算データ、目標改定の対象となる目標データ、商品データ、製品データ、不動産データ、テナントデータ、または、契約データ等であってもよい。ここで、法人データは、与信改定業務等の対象となる顧客データまたは取引先データ等であってもよい。また、個人データは、与信改定、決済条件もしくは住所変更等の対象となる顧客データ、または、給与賞与査定、人事考課もしくは入退社等といった人事・給与業務の対象となる社員データ等であってもよい。また、単価データは、単価改定の対象となる売買単価データ、契約単価データ、上代データ、下代データまたは原価単価データ等であってもよい。また、不動産データは、建物データまたは部屋データ等であってもよい。例えば、対象データは、売買における単価もしくは貸出、サービス契約の単価もしくは定価、または、仕切率もしくは低価法採用時における原価の一括変更等の対象となるマスタデータであってもよい。 The target data database 106a stores the target data. Here, the target data may be master data or the like that is updated (revised) by a plurality of people at once. The target data is slip data, corporate data, personal data, unit price data, budget data subject to budget revision, target data subject to target revision, product data, product data, real estate data, tenant data, or It may be contract data or the like. Here, the corporate data may be customer data, business partner data, or the like that is the target of credit revision work or the like. In addition, personal data may be customer data subject to credit revisions, settlement conditions or address changes, or employee data subject to personnel / salary operations such as salary bonus assessment, personnel evaluation or entry / exit. good. Further, the unit price data may be trading unit price data, contract unit price data, retail price data, retail price data, cost unit price data, etc., which are subject to unit price revision. Further, the real estate data may be building data, room data, or the like. For example, the target data may be master data such as a unit price or lending in buying and selling, a unit price or a fixed price of a service contract, or a batch change of a partition rate or a cost price when the low price method is adopted.

入出力インターフェース部108には、入力装置112および出力装置114が接続されている。出力装置114には、モニタ(タッチパネルを含む)の他、スピーカやプリンタを用いることができる。入力装置112には、キーボード、マウス、およびマイクの他、マウスと協働してポインティングデバイス機能を実現するモニタを用いることができる。なお、以下では、出力装置114をモニタ114またはプリンタ114とし、入力装置112をキーボード112またはマウス112として記載する場合がある。 An input device 112 and an output device 114 are connected to the input / output interface unit 108. As the output device 114, a speaker or a printer can be used in addition to a monitor (including a touch panel). As the input device 112, a keyboard, a mouse, and a microphone, as well as a monitor that cooperates with the mouse to realize a pointing device function can be used. In the following, the output device 114 may be referred to as a monitor 114 or a printer 114, and the input device 112 may be referred to as a keyboard 112 or a mouse 112.

制御部102は、楽観的排他処理直列化装置100を統括的に制御するCPU等である。制御部102は、OS等の制御プログラム・各種の処理手順等を規定したプログラム・所要データなどを格納するための内部メモリを有し、格納されているこれらのプログラムに基づいて種々の情報処理を実行する。制御部102は、機能概念的に、トランザクション実行部102aと、排他チェック部102bと、待機部102cと、トランザクション確定部102dと、待機解除部102eと、通知部102fと、上書更新対象特定部102gと、更新部102hと、制限部102iとを備えている。 The control unit 102 is a CPU or the like that collectively controls the optimistic exclusive processing serialization device 100. The control unit 102 has an internal memory for storing a control program such as an OS, a program that defines various processing procedures, required data, and the like, and performs various information processing based on these stored programs. Run. The control unit 102 has a transaction execution unit 102a, an exclusive check unit 102b, a standby unit 102c, a transaction confirmation unit 102d, a standby release unit 102e, a notification unit 102f, and an overwriting update target specific unit. It includes 102 g, an update unit 102h, and a restriction unit 102i.

トランザクション実行部102aは、対象データデータベース106aに記憶された対象データに対するトランザクションを実行させる。ここで、トランザクション実行部102aは、対象データデータベース106aに記憶された対象データに対するトランザクションとは別の別トランザクションを実行させてもよい。 The transaction execution unit 102a executes a transaction for the target data stored in the target data database 106a. Here, the transaction execution unit 102a may execute a transaction different from the transaction for the target data stored in the target data database 106a.

排他チェック部102bは、トランザクション内でオブジェクトが作成された場合、別トランザクション内での当該オブジェクトと同名の同名オブジェクトの作成要求を検出する。 When an object is created in a transaction, the exclusive check unit 102b detects a request for creating an object having the same name as the object in another transaction.

待機部102cは、排他チェック部102bにより別トランザクション内で同名オブジェクトの作成要求が検出された場合、当該別トランザクションの実行を中断させて待機させる。 When the exclusive check unit 102b detects a request to create an object with the same name in another transaction, the standby unit 102c suspends the execution of the other transaction and makes it wait.

トランザクション確定部102dは、トランザクション実行部102aによりトランザクションの実行が完了した場合、当該トランザクションをコミットさせ、トランザクション実行部102aによりトランザクションの実行にエラーが生じた場合、当該トランザクションをロールバックさせる。ここで、トランザクション確定部102dは、更に、トランザクション実行部102aによりトランザクションの実行が完了した場合、オブジェクトを削除してもよい。また、トランザクション確定部102dは、更に、トランザクション実行部102aによりトランザクションの実行にエラーが生じた場合、オブジェクトを削除してもよい。 The transaction confirmation unit 102d commits the transaction when the transaction execution unit 102a completes the execution of the transaction, and rolls back the transaction when an error occurs in the transaction execution by the transaction execution unit 102a. Here, the transaction confirmation unit 102d may further delete the object when the transaction execution unit 102a completes the execution of the transaction. Further, the transaction confirmation unit 102d may delete the object when an error occurs in the transaction execution by the transaction execution unit 102a.

待機解除部102eは、トランザクション確定部102dによりトランザクションがコミットまたはロールバックされた場合、待機部102cによる別トランザクションの待機を解除する。 When the transaction is committed or rolled back by the transaction confirmation unit 102d, the wait release unit 102e releases the wait for another transaction by the wait unit 102c.

通知部102fは、別トランザクションのユーザに対して、トランザクションの実行対象である対象データの対象リストを通知する。ここで、通知部102fは、別トランザクションのユーザに対して、トランザクションの実行対象である対象データの対象リストを出力装置114に表示させることで通知してもよい。 The notification unit 102f notifies the user of another transaction of the target list of the target data to be executed by the transaction. Here, the notification unit 102f may notify the user of another transaction by displaying the target list of the target data, which is the execution target of the transaction, on the output device 114.

上書更新対象特定部102gは、通知部102fにより通知された対象リストに含まれる対象データがユーザにより上書更新対象として選択された場合、当該上書更新対象の対象データを特定する。ここで、上書更新対象特定部102gは、通知部102fにより通知された対象リストに含まれる対象データがユーザにより入力装置112を介して上書更新対象として選択された場合、当該上書更新対象の対象データを特定してもよい。 When the target data included in the target list notified by the notification unit 102f is selected as the overwriting update target by the user, the overwriting update target specifying unit 102g specifies the target data to be overwritten and updated. Here, the overwriting update target specific unit 102g is the overwriting update target when the target data included in the target list notified by the notification unit 102f is selected as the overwriting update target by the user via the input device 112. The target data of may be specified.

更新部102hは、トランザクションがコミットされた場合、当該トランザクションに基づいて、対象データデータベース106aに記憶された対象データを更新する。ここで、更新部102hは、更に、上書更新対象特定部102gにより上書更新対象の対象データが特定された場合、制限部102iによる制限を解除し、別トランザクションに基づいて、対象データデータベース106aに記憶された当該上書更新対象の対象データを更新してもよい。 When the transaction is committed, the update unit 102h updates the target data stored in the target data database 106a based on the transaction. Here, when the target data to be overwritten and updated is specified by the overwritten update target specifying unit 102g, the updating unit 102h further releases the restriction by the limiting unit 102i, and based on another transaction, the target data database 106a. The target data to be updated in the overwriting stored in may be updated.

制限部102iは、更新部102hにより更新された対象データに対する更新を制限する。 The restriction unit 102i restricts the update of the target data updated by the update unit 102h.

[3.具体例]
本実施形態の具体例について、図6から図13を参照して説明する。
[3. Concrete example]
Specific examples of this embodiment will be described with reference to FIGS. 6 to 13.

[楽観的排他処理直列化]
ここで、図6を参照して、本実施形態における楽観的排他処理直列化の一例について説明する。図6は、本実施形態における楽観的排他処理直列化装置100の処理の一例を示すフローチャートである。
[Optimistic exclusive processing serialization]
Here, an example of optimistic exclusive processing serialization in the present embodiment will be described with reference to FIG. FIG. 6 is a flowchart showing an example of the processing of the optimistic exclusive processing serialization device 100 in the present embodiment.

図6に示すように、トランザクション実行部102aは、伝票データに対する更新指示がユーザAにより入力装置112を介して入力された場合、対象データデータベース106aに記憶された伝票データに対する排他トランザクションを実行させる(ステップSA-1)。なお、トランザクション実行部102aは、排他トランザクションの実行を、ステップSA-1からステップSA-4の間、または、ステップSA-1からステップSA-10の間、他の処理と並行して実行させる。 As shown in FIG. 6, when the update instruction for the slip data is input by the user A via the input device 112, the transaction execution unit 102a executes an exclusive transaction for the slip data stored in the target data database 106a (). Step SA-1). The transaction execution unit 102a executes the exclusive transaction between steps SA-1 and SA-4, or between steps SA-1 and SA-10, in parallel with other processes.

そして、排他チェック部102bは、トランザクション内でテーブルが作成された場合、排他トランザクションとは別の別トランザクション内での当該テーブルと同名の同名テーブルの作成要求を検出する(ステップSA-2)。 Then, when the table is created in the transaction, the exclusive check unit 102b detects a request to create a table having the same name as the table in another transaction different from the exclusive transaction (step SA-2).

そして、制御部102は、排他チェック部102bにより別排他トランザクション内で同名テーブルの作成要求が検出されたか否かを判定する(ステップSA-3)。 Then, the control unit 102 determines whether or not the request for creating the table with the same name is detected in another exclusive transaction by the exclusive check unit 102b (step SA-3).

そして、制御部102は、別排他トランザクション内で同名テーブルの作成要求が検出されなかったと判定した場合(ステップSA-3:No)、処理をステップSA-4に移行させる。 Then, when the control unit 102 determines that the request for creating the table with the same name is not detected in another exclusive transaction (step SA-3: No), the control unit 102 shifts the process to step SA-4.

そして、トランザクション確定部102dは、トランザクション実行部102aにより排他トランザクションの実行が完了した場合、テーブルを削除して当該排他トランザクションをコミットさせ、トランザクション実行部102aにより排他トランザクションの実行にエラーが生じた場合、当該排他トランザクションをロールバックさせる(ステップSA-4)。 Then, when the transaction confirmation unit 102d completes the execution of the exclusive transaction by the transaction execution unit 102a, the table is deleted and the exclusive transaction is committed, and when an error occurs in the execution of the exclusive transaction by the transaction execution unit 102a, the transaction execution unit 102a deletes the table. Roll back the exclusive transaction (step SA-4).

そして、制御部102は、排他トランザクションがコミットしたか否かを判定する(ステップSA-5)。 Then, the control unit 102 determines whether or not the exclusive transaction has committed (step SA-5).

そして、制御部102は、排他トランザクションがコミットしていない(ロールバックした)と判定した場合(ステップSA-5:No)、処理を終了する。 Then, when the control unit 102 determines that the exclusive transaction has not committed (rolled back) (step SA-5: No), the control unit 102 ends the process.

一方、制御部102は、排他トランザクションがコミットしたと判定した場合(ステップSA-5:Yes)、処理をステップSA-6に移行させる。 On the other hand, when the control unit 102 determines that the exclusive transaction has committed (step SA-5: Yes), the control unit 102 shifts the process to step SA-6.

そして、更新部102hは、排他トランザクションに基づいて、対象データデータベース106aに記憶された伝票データに対する実処理(実更新処理)トランザクションを実行させることで、対象データデータベース106aに記憶された伝票データを更新する(ステップSA-6)。 Then, the update unit 102h updates the slip data stored in the target data database 106a by executing an actual processing (actual update processing) transaction for the slip data stored in the target data database 106a based on the exclusive transaction. (Step SA-6).

そして、制限部102iは、更新部102hにより更新された伝票データに対する更新を制限し(ステップSA-7)、処理を終了する。 Then, the restriction unit 102i restricts the update of the slip data updated by the update unit 102h (step SA-7), and ends the process.

一方、制御部102は、別排他トランザクション内で同名テーブルの作成要求が検出されたと判定した場合(ステップSA-3:Yes)、処理をステップSA-8に移行させる。 On the other hand, when the control unit 102 determines that the request for creating the table with the same name is detected in another exclusive transaction (step SA-3: Yes), the control unit 102 shifts the process to step SA-8.

そして、待機部102cは、別排他トランザクションの実行を中断させて待機させる(ステップSA-8)。 Then, the standby unit 102c suspends the execution of another exclusive transaction and makes it wait (step SA-8).

そして、通知部102fは、別排他トランザクションのユーザBに対して、排他トランザクションの実行対象である伝票データの伝票リストを出力装置114に選択可能に表示させることで通知する(ステップSA-9)。 Then, the notification unit 102f notifies the user B of another exclusive transaction by displaying the slip list of the slip data to be executed of the exclusive transaction on the output device 114 so as to be selectable (step SA-9).

そして、トランザクション確定部102dは、トランザクション実行部102aにより排他トランザクションの実行が完了した場合、テーブルを削除して当該排他トランザクションをコミットさせ、トランザクション実行部102aにより排他トランザクションの実行にエラーが生じた場合、当該排他トランザクションをロールバックさせる(ステップSA-10)。 Then, when the transaction confirmation unit 102d completes the execution of the exclusive transaction by the transaction execution unit 102a, the table is deleted and the exclusive transaction is committed, and when an error occurs in the execution of the exclusive transaction by the transaction execution unit 102a, the transaction execution unit 102a deletes the table. Roll back the exclusive transaction (step SA-10).

そして、制御部102は、排他トランザクションがコミットしたか否かを判定する(ステップSA-11)。 Then, the control unit 102 determines whether or not the exclusive transaction has committed (step SA-11).

そして、制御部102は、排他トランザクションがコミットしていない(ロールバックした)と判定した場合(ステップSA-11:No)、処理をステップSA-12に移行させる。 Then, when the control unit 102 determines that the exclusive transaction has not committed (rolled back) (step SA-11: No), the control unit 102 shifts the process to step SA-12.

そして、待機解除部102eは、待機部102cによる別排他トランザクションの待機を解除し(ステップSA-12)、待機を解除した(実行を再開させた)別排他トランザクションを新たな排他トランザクションと設定しなおして、処理をステップSA-2に移行させる。 Then, the wait release unit 102e cancels the wait of another exclusive transaction by the wait unit 102c (step SA-12), and resets the another exclusive transaction for which the wait is released (execution is restarted) as a new exclusive transaction. Then, the process is shifted to step SA-2.

一方、制御部102は、排他トランザクションがコミットしたと判定した場合(ステップSA-11:Yes)、処理をステップSA-13に移行させる。 On the other hand, when the control unit 102 determines that the exclusive transaction has committed (step SA-11: Yes), the control unit 102 shifts the process to step SA-13.

そして、待機解除部102eは、待機部102cによる別トランザクションの待機を解除する(実行を再開させる)(ステップSA-13)。 Then, the standby release unit 102e releases the wait for another transaction by the standby unit 102c (resumes execution) (step SA-13).

そして、更新部102hは、排他トランザクションに基づいて、対象データデータベース106aに記憶された伝票データに対する実処理トランザクションを実行させることで、対象データデータベース106aに記憶された伝票データを更新する(ステップSA-14)。 Then, the update unit 102h updates the slip data stored in the target data database 106a by executing an actual processing transaction for the slip data stored in the target data database 106a based on the exclusive transaction (step SA-). 14).

そして、制限部102iは、更新部102hにより更新された伝票データに対する更新を制限する(ステップSA-15)。 Then, the restriction unit 102i restricts the update of the slip data updated by the update unit 102h (step SA-15).

そして、上書更新対象特定部102gは、通知部102fにより通知された伝票リストに含まれる伝票データがユーザBにより入力装置112を介して上書更新対象として選択されたか否かを判定する(ステップSA-16)。 Then, the overwriting update target specifying unit 102g determines whether or not the slip data included in the slip list notified by the notification unit 102f is selected by the user B as the overwriting update target via the input device 112 (step). SA-16).

そして、上書更新対象特定部102gは、伝票リストに含まれる伝票データがユーザBにより上書更新対象として選択されなかった場合(ステップSA-16:No)、処理を終了する。 Then, when the slip data included in the slip list is not selected as the overwrite update target by the user B (step SA-16: No), the overwriting update target specifying unit 102g ends the process.

一方、上書更新対象特定部102gは、伝票リストに含まれる伝票データがユーザBにより上書更新対象として選択された場合(ステップSA-16:Yes)、処理をステップSA-17に移行させる。 On the other hand, when the slip data included in the slip list is selected as the overwrite update target by the user B (step SA-16: Yes), the overwriting update target specifying unit 102g shifts the process to step SA-17.

そして、上書更新対象特定部102gは、ユーザBにより選択された上書更新対象の伝票データを特定する(ステップSA-17)。 Then, the overwriting update target specifying unit 102g specifies the slip data to be overwritten and updated selected by the user B (step SA-17).

そして、更新部102hは、制限部102iによる制限を解除し、別トランザクションに基づいて、対象データデータベース106aに記憶された上書更新対象の伝票データに対する実処理トランザクションを実行させることで、対象データデータベース106aに記憶された上書更新対象の伝票データを上書更新し(ステップSA-18)、処理を終了する。 Then, the update unit 102h releases the restriction by the restriction unit 102i, and based on another transaction, executes an actual processing transaction for the slip data to be overwritten and updated stored in the target data database 106a, thereby executing the target data database. The slip data to be overwritten and updated stored in 106a is overwritten (step SA-18), and the process is terminated.

ここで、図7から図13を参照して、楽観的排他処理直列化の詳細について説明する。 Here, the details of optimistic exclusive processing serialization will be described with reference to FIGS. 7 to 13.

まず、図7および図8を参照して、本実施形態における楽観的排他処理の一例について説明する。図7は、本実施形態における楽観的排他処理直列化フローの一例を示す図である。図8は、本実施形態における排他トランザクションの一例を示す図である。 First, an example of optimistic exclusion processing in the present embodiment will be described with reference to FIGS. 7 and 8. FIG. 7 is a diagram showing an example of an optimistic exclusive processing serialization flow in the present embodiment. FIG. 8 is a diagram showing an example of an exclusive transaction in the present embodiment.

図7に示すように、本実施形態においては、UserAによる対象データ(J001)に対する更新指示に基づいて、排他トランザクションが実施され、テーブルaを作成する。ここで、本実施形態においては、既にUserAの排他トランザクション内でテーブルaの生成が行われているため、別のトランザクションで同名テーブルの生成が実行された場合、先行トランザクションが確定するまでロックが掛かる機能を利用して、UserAの排他トランザクションが確定(ロールバックまたはコミット)するまで、UserBの排他トランザクションを、テーブルaの作成で強制的に待機させる。これにより、本実施形態においては、楽観的排他処理の操作を確実に一人だけしか行えない状況を作り出している。ここで、本実施形態においては、UserBの処理が待機している間に、UserAの排他トランザクションは、排他チェック、および、後続者に自身の更新対象を知らせる為の処理を行ってもよい。そして、本実施形態においては、UserAの排他トランザクションがコミットした場合、UserAの排他トランザクションは、そのまま実処理トランザクションによる更新へ移り、UserBの排他トランザクションは、待機していたテーブルaの作成を再開する。そして、本実施形態においては、排他チェックにてUserAの実処理トランザクション内で書き換えた結果が確認された場合、UserAの処理を全て破棄する。 As shown in FIG. 7, in the present embodiment, the exclusive transaction is executed based on the update instruction for the target data (J001) by UserA, and the table a is created. Here, in the present embodiment, since the table a has already been generated in the exclusive transaction of UserA, if the table with the same name is generated in another transaction, the lock is applied until the preceding transaction is confirmed. Using the function, the exclusive transaction of UserB is forcibly waited by the creation of table a until the exclusive transaction of UserA is confirmed (rollback or commit). This creates a situation in which only one person can reliably perform the optimistic exclusive processing operation in the present embodiment. Here, in the present embodiment, while the processing of UserB is waiting, the exclusive transaction of UserA may perform the exclusive check and the processing for notifying the successor of its own update target. Then, in the present embodiment, when the exclusive transaction of UserA commits, the exclusive transaction of UserA shifts to the update by the actual processing transaction as it is, and the exclusive transaction of UserB resumes the creation of the waiting table a. Then, in the present embodiment, when the result of rewriting in the actual processing transaction of UserA is confirmed by the exclusive check, all the processing of UserA is discarded.

また、図8に示すように、本実施形態における排他トランザクションにおいては、排他チェックエラーおよび異常終了(異常系処理)を想定して、楽観的排他処理直列化装置100内でのトランザクションロールバックさせる処理SB-1(例えば、サーバ障害等により明示的コミットがされない場合、自動的にロールバックさせる処理)を実装してもよい。これにより、本実施形態においては、ロールバックによりテーブルaの作成要求自体を無かったことにしてもよい。 Further, as shown in FIG. 8, in the exclusive transaction in the present embodiment, the transaction is rolled back in the optimistic exclusive processing serialization device 100 assuming an exclusive check error and an abnormal termination (abnormal system processing). SB-1 (for example, a process of automatically rolling back when an explicit commit is not made due to a server failure or the like) may be implemented. As a result, in the present embodiment, there may be no request for creating the table a by rollback.

また、図8に示すように、本実施形態における排他トランザクションにおいては、排他チェック正常終了(正常系処理)を想定して、テーブルaを作成した自身の排他トランザクション内でコミット前にテーブルaを削除する処理SB-2を実装してもよい。これにより、本実施形態においては、コミット前のテーブルa削除処理を通して、コミット後のデータベースにテーブルaが不在の状況を作ることができる。 Further, as shown in FIG. 8, in the exclusive transaction in the present embodiment, the table a is deleted before the commit in the own exclusive transaction that created the table a, assuming that the exclusive check ends normally (normal implementation processing). Processing SB-2 to be performed may be implemented. As a result, in the present embodiment, it is possible to create a situation in which the table a is absent in the database after the commit through the process of deleting the table a before the commit.

すなわち、トランザクションがコミット済みでテーブルaが既に存在する状態で、別トランザクション内でテーブルaの作成処理が試みられた場合、データベースエラーとなるため、当該作成処理を行うためにはテーブルaを手動削除する等の手当てが必要であったが、本実施形態における排他トランザクションにおいては、2段構えでこの状況を回避している。 That is, if a transaction is committed and table a already exists, and an attempt is made to create table a in another transaction, a database error will occur. Therefore, in order to perform the creation process, table a is manually deleted. However, in the exclusive transaction in the present embodiment, this situation is avoided by a two-stage stance.

このように、本実施形態においては、悲観的排他処理のデメリットであったロック待ちの待機時間に関して、楽観的排他処理中のみという最低限の時間に絞って待機させることで、実処理トランザクションの処理量と比にならない程度に待機時間を抑えられている。また、本実施形態においては、不用意なロックという点でも、テーブルaが存在する状態で、UserAの排他トランザクションがコミットした場合、UserBの排他トランザクションは、同名テーブル作成によりエラーとなってしまうが、UserAの更新処理の正常完了時は、テーブルaの削除が行われた後に排他トランザクションがコミットされるため、テーブルaが確実に消えることで、UserBの排他トランザクションがエラーとなることが無いようにしている。また、本実施形態において、UserAの排他トランザクションは、サーバーエラー等を含むエラー時に、ロールバックされるため、UserAの処理によるテーブルaの作成が無かったことになることで、UserBの排他トランザクションがエラーとなることが無いようにしている。 As described above, in the present embodiment, the lock waiting waiting time, which is a demerit of the pessimistic exclusive processing, is made to wait only during the optimistic exclusive processing, thereby processing the actual processing transaction. The waiting time is suppressed to the extent that it does not match the amount. Further, in the present embodiment, also in terms of inadvertent lock, if the exclusive transaction of UserA commits in the state where the table a exists, the exclusive transaction of UserB becomes an error due to the creation of the table with the same name. When the update process of UserA is completed normally, the exclusive transaction is committed after the deletion of table a is performed. Therefore, the exclusive transaction of UserB is prevented from becoming an error by surely disappearing the table a. There is. Further, in the present embodiment, the exclusive transaction of UserA is rolled back at the time of an error including a server error, so that the table a is not created by the processing of UserA, so that the exclusive transaction of UserB is an error. I try not to become.

また、図9および図10を参照して、本実施形態における待機処理の一例について説明する。図9および図10は、本実施形態における待機処理の一例を示す図である。 Further, an example of the standby process in the present embodiment will be described with reference to FIGS. 9 and 10. 9 and 10 are diagrams showing an example of the standby process in the present embodiment.

図9に示すように、本実施形態においては、UserAの処理が排他チェックに際して排他トランザクション内でテーブルaを作成した場合、他のユーザの処理が同名のテーブルaを作成できるようになるためには、UserAの処理がトランザクションを開放する必要があり、開放するまでの間、他のユーザの処理によるテーブルaの作成要求は待たされることになる。そのため、本実施形態において、UserBの処理は、自身の排他チェックに際してテーブルaの作成要求をした時点で、先行するUserAが排他チェックを終えるまで一時的な待ちが発生することになる。すなわち、UserAの処理からすると、自身のテーブルa作成要求が通った時点で排他チェックを行っているのは自身だけという状態となる。 As shown in FIG. 9, in the present embodiment, when the process of UserA creates the table a in the exclusive transaction at the time of the exclusive check, the process of another user can create the table a having the same name. , UserA processing needs to release the transaction, and the request for creating the table a by the processing of another user is waited until the transaction is released. Therefore, in the present embodiment, in the process of UserB, when the creation request of the table a is made at the time of its own exclusive check, a temporary wait occurs until the preceding UserA finishes the exclusive check. That is, from the processing of UserA, only oneself is performing the exclusive check when the request for creating its own table a is passed.

また、図10に示すように、本実施形態においては、さらに後続のUserCが現れた場合、UserAの排他トランザクションおよびUserBの排他トランザクションが完了するまでの間、UserCの処理に対する強制的な待ちが発生するため、同じ時間帯に複数ユーザの処理による同じ排他チェックが掛かることは無い。 Further, as shown in FIG. 10, in the present embodiment, when a subsequent UserC appears, a forced wait for UserC processing occurs until the exclusive transaction of UserA and the exclusive transaction of UserB are completed. Therefore, the same exclusive check by the processing of a plurality of users is not applied in the same time zone.

また、図11および図12を参照して、本実施形態における楽観的排他制御の一例について説明する。図11および図12は、本実施形態における楽観的排他制御の一例を示す図である。 Further, an example of optimistic exclusive control in the present embodiment will be described with reference to FIGS. 11 and 12. 11 and 12 are diagrams showing an example of optimistic concurrency control in this embodiment.

図11に示すように、本実施形態においては、UserAの排他トランザクション後および実処理トランザクション後にUserBの処理が実行されても、UserAが書き換えた更新日時とUserBがデータ取得した時点での更新日時とが比較されるため、楽観的排他チェックによりUserBの処理は全て破棄される。 As shown in FIG. 11, in the present embodiment, even if the processing of UserB is executed after the exclusive transaction of UserA and the actual processing transaction, the update date and time rewritten by UserA and the update date and time when the data is acquired by UserB are used. Is compared, so the optimistic exclusive check discards all UserB processing.

また、図12に示すように、本実施形態においては、UserBが別の伝票を計上しようとする場合、テーブルaの作成時に待機が発生するが、UserAの処理が書き換えた伝票データではなく別の伝票データを参照するため、UserBの処理は排他トランザクションを経て実処理トランザクションへと遷移することができる。 Further, as shown in FIG. 12, in the present embodiment, when UserB tries to record another slip, a wait occurs at the time of creating the table a, but the processing of UserA is not the rewritten slip data but another slip. Since the slip data is referred to, the UserB processing can transition to the actual processing transaction via the exclusive transaction.

また、図13を参照して、本実施形態における選択的上書更新処理の一例について説明する。図13は、本実施形態における選択的上書更新処理の一例を示す図である。 Further, with reference to FIG. 13, an example of the selective overwriting update process in the present embodiment will be described. FIG. 13 is a diagram showing an example of the selective overwriting update process in the present embodiment.

図13に示すように、本実施形態においては、UserAの排他トランザクションにより排他エラーが検知された場合、UserBの排他トランザクション中に伝票毎の結果リスト(対象伝票リスト)がUserB側に通知される。そして、図13に示すように、本実施形態においては、エラー検知されてステータスが上書可能な伝票に対して、UserBの判断で選択し、上書対象の伝票を再度受け取った後に処理を続行することができる。すなわち、図13には、UserAの処理によりJ001およびJ002が更新され、J004が削除された場合に、UserBがJ001を上書更新対象をとして選択した例が示してあり、UserBの処理完了後の対象データの状態としては、J001についてUserBの処理による上書更新が反映され、J002についてUserAの処理による更新が反映され、J003についてUserBの処理による更新が反映され、J003についてUserAの処理による削除が反映された状態となる。 As shown in FIG. 13, in the present embodiment, when an exclusive error is detected by the exclusive transaction of UserA, the result list (target slip list) for each slip is notified to the UserB side during the exclusive transaction of UserB. Then, as shown in FIG. 13, in the present embodiment, for a slip whose status can be overwritten by detecting an error, it is selected at the discretion of UserB, and processing is continued after receiving the slip to be overwritten again. can do. That is, FIG. 13 shows an example in which UserB selects J001 as the overwriting update target when J001 and J002 are updated by the processing of UserA and J004 is deleted, and after the processing of UserB is completed. As for the state of the target data, the overwriting update by UserB processing is reflected for J001, the update by UserA processing is reflected for J002, the update by UserB processing is reflected for J003, and the deletion by UserA processing is reflected for J003. It will be in the reflected state.

例えば、運送業務のように大量の注文に対して車の割当をするような業務においては、複数の配車担当者が効率良く配送が出来るよう、都度投入される伝票だけでなく、割当済の伝票も含めて見直しを行いながら配車業務に従事している場合があり、後から更新した担当者が最新の情報を元に配車している可能性が高く、当該担当者が先に更新された内容の正当性を判断し、最新データとすることが望ましいため、完全後勝または完全先勝とした場合、業務が回らなくなる可能性がある。そこで、本実施形態においては、排他処理を実装しなかった場合、完全後勝となり、排他処理を実装した場合、完全先勝になるが、特に大量の伝票を大人数で同時に捌くような業務形態において、伝票修正時に操作者の判断により部分的に自身の更新で上書きしたい案件の場合、選択的後勝更新の実装を可能としている。 For example, in a business such as transportation business where vehicles are allocated for a large number of orders, not only the slips that are input each time but also the assigned slips so that multiple dispatchers can deliver efficiently. There are cases where you are engaged in vehicle dispatching work while reviewing including, and there is a high possibility that the person in charge who updated later is dispatching the vehicle based on the latest information, and the person in charge updated earlier Since it is desirable to judge the validity of the data and update it to the latest data, there is a possibility that the business will not be able to turn around if it is a complete second win or a complete first win. Therefore, in this embodiment, if the exclusive processing is not implemented, it will be a complete second win, and if the exclusive processing is implemented, it will be a complete first win. , In the case of a matter that you want to partially overwrite with your own update at the discretion of the operator at the time of slip correction, it is possible to implement selective win-win update.

このように、従来、排他エラーとなった場合、その時点で再入力等となるが、本実施形態においては、エラー結果をユーザに返し、自身の更新値を最新として上書するかどうかをユーザサイドに委ねる選択的後勝更新を可能としている。 In this way, conventionally, when an exclusive error occurs, re-input or the like is performed at that point, but in the present embodiment, the user returns the error result and whether or not to overwrite the updated value of the user as the latest. It is possible to selectively renew the win after leaving it to the side.

また、従来の楽観的排他処理においては、全ての更新が完了したタイミングで他のユーザの待機解除が実施されるが、本実施形態においては、更新実処理を切り分け、更新実処理前に待機解除を行うことで、排他チェックに掛かるユーザの待ち時間を最小限に短縮することを可能としている。 Further, in the conventional optimistic exclusive processing, the standby release of another user is executed at the timing when all the updates are completed, but in the present embodiment, the update actual process is separated and the wait release is performed before the update actual process. By doing this, it is possible to minimize the waiting time of the user for the exclusive check.

[4.他の実施形態]
本発明は、上述した実施形態以外にも、特許請求の範囲に記載した技術的思想の範囲内において種々の異なる実施形態にて実施されてよいものである。
[4. Other embodiments]
In addition to the above-described embodiments, the present invention may be implemented in various different embodiments within the scope of the technical idea described in the claims.

例えば、実施形態において説明した各処理のうち、自動的に行われるものとして説明した処理の全部または一部を手動的に行うこともでき、あるいは、手動的に行われるものとして説明した処理の全部または一部を公知の方法で自動的に行うこともできる。 For example, of each of the processes described in the embodiments, all or part of the processes described as being automatically performed may be manually performed, or all of the processes described as being performed manually. Alternatively, a part can be automatically performed by a known method.

また、本明細書中や図面中で示した処理手順、制御手順、具体的名称、各処理の登録データや検索条件等のパラメータを含む情報、画面例、データベース構成については、特記する場合を除いて任意に変更することができる。 In addition, processing procedures, control procedures, specific names, information including parameters such as registration data and search conditions for each processing, screen examples, and database configurations shown in this specification and drawings are not specified unless otherwise specified. Can be changed arbitrarily.

また、楽観的排他処理直列化装置100に関して、図示の各構成要素は機能概念的なものであり、必ずしも物理的に図示の如く構成されていることを要しない。 Further, with respect to the optimistic exclusive processing serialization device 100, each component shown in the figure is a functional concept and does not necessarily have to be physically configured as shown in the figure.

例えば、楽観的排他処理直列化装置100が備える処理機能、特に制御部102にて行われる各処理機能については、その全部または任意の一部を、CPUおよび当該CPUにて解釈実行されるプログラムにて実現してもよく、また、ワイヤードロジックによるハードウェアとして実現してもよい。尚、プログラムは、本実施形態で説明した処理を情報処理装置に実行させるためのプログラム化された命令を含む一時的でないコンピュータ読み取り可能な記録媒体に記録されており、必要に応じて楽観的排他処理直列化装置100に機械的に読み取られる。すなわち、ROMまたはHDD(Hard Disk Drive)などの記憶部などには、OSと協働してCPUに命令を与え、各種処理を行うためのコンピュータプログラムが記録されている。このコンピュータプログラムは、RAMにロードされることによって実行され、CPUと協働して制御部を構成する。 For example, with respect to the processing functions included in the optimistic exclusive processing serialization device 100, particularly each processing function performed by the control unit 102, all or any part thereof may be interpreted and executed by the CPU and the CPU. It may be realized as hardware by wired logic. The program is recorded on a non-temporary computer-readable recording medium containing programmed instructions for causing the information processing apparatus to execute the processing described in the present embodiment, and is optimistically excluded as necessary. It is read mechanically by the processing serialization device 100. That is, a computer program for giving instructions to the CPU in cooperation with the OS and performing various processes is recorded in a storage unit such as a ROM or an HDD (Hard Disk Drive). This computer program is executed by being loaded into RAM, and cooperates with the CPU to form a control unit.

また、このコンピュータプログラムは、楽観的排他処理直列化装置100に対して任意のネットワークを介して接続されたアプリケーションプログラムサーバに記憶されていてもよく、必要に応じてその全部または一部をダウンロードすることも可能である。 Further, this computer program may be stored in an application program server connected to the optimistic exclusive processing serialization device 100 via an arbitrary network, and all or a part thereof may be downloaded as needed. It is also possible.

また、本実施形態で説明した処理を実行するためのプログラムを、一時的でないコンピュータ読み取り可能な記録媒体に格納してもよく、また、プログラム製品として構成することもできる。ここで、この「記録媒体」とは、メモリーカード、USB(Universal Serial Bus)メモリ、SD(Secure Digital)カード、フレキシブルディスク、光磁気ディスク、ROM、EPROM(Erasable Programmable Read Only Memory)、EEPROM(登録商標)(Electrically Erasable and Programmable Read Only Memory)、CD-ROM(Compact Disk Read Only Memory)、MO(Magneto-Optical disk)、DVD(Digital Versatile Disk)、および、Blu-ray(登録商標) Disc等の任意の「可搬用の物理媒体」を含むものとする。 Further, the program for executing the process described in the present embodiment may be stored in a non-temporary computer-readable recording medium, or may be configured as a program product. Here, the "recording medium" includes a memory card, a USB (Universal Serial Bus) memory, an SD (Secure Digital) card, a flexible disk, a magneto-optical disk, a ROM, an EPROM (Erasable Programmable Read Only Memory), and an EEPROM (registration). Trademarks) (Electrically Erasable and Programmable Read Only Memory), CD-ROM (Compact Disk Read Only Memory), MO (Magnet-Optical Disc), MO (Magnet-Optical Disc), DVD (Digital), DVD (Digital) It shall include any "portable physical medium".

また、「プログラム」とは、任意の言語または記述方法にて記述されたデータ処理方法であり、ソースコードまたはバイナリコード等の形式を問わない。なお、「プログラム」は必ずしも単一的に構成されるものに限られず、複数のモジュールやライブラリとして分散構成されるものや、OSに代表される別個のプログラムと協働してその機能を達成するものをも含む。なお、実施形態に示した各装置において記録媒体を読み取るための具体的な構成および読み取り手順ならびに読み取り後のインストール手順等については、周知の構成や手順を用いることができる。 Further, the "program" is a data processing method described in any language or description method, regardless of the format such as source code or binary code. The "program" is not necessarily limited to a single program, but is distributed as multiple modules or libraries, or cooperates with a separate program represented by the OS to achieve its function. Including things. It should be noted that well-known configurations and procedures can be used for specific configurations and reading procedures for reading the recording medium in each apparatus shown in the embodiment, installation procedures after reading, and the like.

記憶部106に格納される各種のデータベース等は、RAM、ROM等のメモリ装置、ハードディスク等の固定ディスク装置、フレキシブルディスク、および、光ディスク等のストレージ手段であり、各種処理やウェブサイト提供に用いる各種のプログラム、テーブル、データベース、および、ウェブページ用ファイル等を格納する。 Various databases and the like stored in the storage unit 106 are memory devices such as RAM and ROM, fixed disk devices such as hard disks, flexible disks, and storage means such as optical disks, and are used for various processes and website provision. Stores programs, tables, databases, files for web pages, etc.

また、楽観的排他処理直列化装置100は、既知のパーソナルコンピュータまたはワークステーション等の情報処理装置として構成してもよく、また、任意の周辺装置が接続された当該情報処理装置として構成してもよい。また、楽観的排他処理直列化装置100は、当該装置に本実施形態で説明した処理を実現させるソフトウェア(プログラムまたはデータ等を含む)を実装することにより実現してもよい。 Further, the optimistic exclusive processing serialization device 100 may be configured as an information processing device such as a known personal computer or workstation, or may be configured as the information processing device to which an arbitrary peripheral device is connected. good. Further, the optimistic exclusive processing serialization device 100 may be realized by mounting software (including a program or data) that realizes the processing described in the present embodiment on the device.

更に、装置の分散・統合の具体的形態は図示するものに限られず、その全部または一部を、各種の付加等に応じてまたは機能負荷に応じて、任意の単位で機能的または物理的に分散・統合して構成することができる。すなわち、上述した実施形態を任意に組み合わせて実施してもよく、実施形態を選択的に実施してもよい。 Furthermore, the specific form of distribution / integration of the device is not limited to that shown in the figure, and all or part of the device may be functionally or physically in any unit according to various additions or functional loads. It can be distributed and integrated. That is, the above-described embodiments may be arbitrarily combined and implemented, or the embodiments may be selectively implemented.

本発明は、食品業界、流通業界、建材業界または運送業界等の大量データを同時処理する必要がある業界において有用である。 INDUSTRIAL APPLICABILITY The present invention is useful in industries such as the food industry, the distribution industry, the building materials industry, or the transportation industry, which require simultaneous processing of a large amount of data.

100 楽観的排他処理直列化装置
102 制御部
102a トランザクション実行部
102b 排他チェック部
102c 待機部
102d トランザクション確定部
102e 待機解除部
102f 通知部
102g 上書更新対象特定部
102h 更新部
102i 制限部
104 通信インターフェース部
106 記憶部
106a 対象データデータベース
108 入出力インターフェース部
112 入力装置
114 出力装置
200 サーバ
300 ネットワーク
100 Optimistic exclusive processing serialization device 102 Control unit 102a Transaction execution unit 102b Exclusive check unit 102c Standby unit 102d Transaction confirmation unit 102e Wait release unit 102f Notification unit 102g Overwriting update target specific unit 102h Update unit 102i Restriction unit 104 Communication interface unit 106 Storage unit 106a Target data database 108 Input / output interface unit 112 Input device 114 Output device 200 Server 300 Network

Claims (5)

記憶部と制御部とを備えた楽観的排他処理直列化装置であって、
前記記憶部は、
対象データを記憶する対象データ記憶手段、
を備え、
前記制御部は、
前記対象データ記憶手段に記憶された前記対象データに対するトランザクションを実行させるトランザクション実行手段と、
前記対象データ記憶手段に記憶された前記対象データに対する前記トランザクションとは別の別トランザクションを実行させる別トランザクション実行手段と、
前記トランザクションおよび前記別トランザクションに基づく前記対象データの更新の完了前に、前記トランザクション内でオブジェクトが作成された場合、前記別トランザクション内での当該オブジェクトと同名の同名オブジェクトの作成要求を検出する排他チェック手段と、
前記トランザクションおよび前記別トランザクションに基づく前記対象データの更新の完了前に、前記排他チェック手段により前記別トランザクション内で前記同名オブジェクトの作成要求が検出された場合、当該別トランザクションの実行を中断させて待機させる待機手段と、
前記別トランザクションのユーザに対して、前記トランザクションの実行対象である前記対象データの対象リストを通知する通知手段と、
前記トランザクション実行手段により前記トランザクションの実行が完了した場合、当該トランザクションをコミットさせ、前記トランザクション実行手段により前記トランザクションの実行にエラーが生じた場合、当該トランザクションをロールバックさせるトランザクション確定手段と、
前記トランザクション確定手段により前記トランザクションがコミットまたはロールバックされた場合、前記待機手段による前記別トランザクションの待機を解除する待機解除手段と、
前記トランザクションがコミットされた場合、当該トランザクションに基づいて、前記対象データ記憶手段に記憶された前記対象データを更新する更新手段と、
前記更新手段により更新された前記対象データに対する更新を制限する制限手段と、
前記通知手段により通知された前記対象リストに含まれる前記対象データが前記ユーザにより上書更新対象として選択された場合、当該上書更新対象の前記対象データを特定する上書更新対象特定手段と、
を備え
前記更新手段は、
更に、前記上書更新対象特定手段により前記上書更新対象の対象データが特定された場合、前記制限手段による制限を解除し、前記別トランザクションに基づいて、前記対象データ記憶手段に記憶された当該上書更新対象の対象データを更新することを特徴とする楽観的排他処理直列化装置。
An optimistic exclusive processing serialization device equipped with a storage unit and a control unit.
The storage unit is
Target data storage means for storing target data,
Equipped with
The control unit
A transaction execution means for executing a transaction for the target data stored in the target data storage means, and a transaction execution means.
Another transaction execution means for executing a transaction different from the transaction for the target data stored in the target data storage means, and another transaction execution means.
If an object is created in the transaction before the update of the target data based on the transaction and the other transaction is completed, an exclusive check for detecting the creation request of the object with the same name as the object in the other transaction is detected. Means and
If the exclusive check means detects a request to create the object with the same name in the other transaction before the update of the target data based on the transaction and the other transaction is completed, the execution of the other transaction is interrupted and waits. Waiting means to make
A notification means for notifying a user of the other transaction of the target list of the target data which is the execution target of the transaction, and
When the execution of the transaction is completed by the transaction execution means, the transaction is committed, and when an error occurs in the execution of the transaction by the transaction execution means, the transaction confirmation means for rolling back the transaction and the transaction confirmation means.
When the transaction is committed or rolled back by the transaction confirmation means, the wait release means for canceling the wait of the other transaction by the wait means and the wait release means.
When the transaction is committed, the update means for updating the target data stored in the target data storage means based on the transaction, and the update means.
A limiting means for limiting the update of the target data updated by the updating means, and a limiting means.
When the target data included in the target list notified by the notification means is selected as the overwriting update target by the user, the overwriting update target specifying means for specifying the target data of the overwriting update target and the overwriting update target specifying means.
Equipped with
The update means
Further, when the target data to be updated by the overwriting is specified by the overwriting update target specifying means, the restriction by the limiting means is released, and the data stored in the target data storage means is stored based on the other transaction. An optimistic exclusive processing serialization device characterized by updating the target data to be updated.
前記トランザクション確定手段は、
更に、前記トランザクション実行手段により前記トランザクションの実行が完了した場合、前記オブジェクトを削除することを特徴とする請求項1に記載の楽観的排他処理直列化装置。
The transaction confirmation means is
Further, the optimistic exclusive processing serialization device according to claim 1 , wherein when the execution of the transaction is completed by the transaction execution means, the object is deleted.
前記トランザクション確定手段は、
更に、前記トランザクション実行手段により前記トランザクションの実行にエラーが生じた場合、前記オブジェクトを削除することを特徴とする請求項1または2に記載の楽観的排他処理直列化装置。
The transaction confirmation means is
Further, the optimistic exclusive processing serialization device according to claim 1 or 2 , wherein when an error occurs in the execution of the transaction by the transaction execution means, the object is deleted.
記憶部と制御部とを備えた楽観的排他処理直列化装置に実行させるための楽観的排他処理直列化方法であって、
前記記憶部は、
対象データを記憶する対象データ記憶手段、
を備え、
前記制御部で実行させる、
前記対象データ記憶手段に記憶された前記対象データに対するトランザクションを実行させるトランザクション実行ステップと、
前記対象データ記憶手段に記憶された前記対象データに対する前記トランザクションとは別の別トランザクションを実行させる別トランザクション実行ステップと、
前記トランザクションおよび前記別トランザクションに基づく前記対象データの更新の完了前に、前記トランザクション内でオブジェクトが作成された場合、前記別トランザクション内での当該オブジェクトと同名の同名オブジェクトの作成要求を検出する排他チェックステップと、
前記トランザクションおよび前記別トランザクションに基づく前記対象データの更新の完了前に、前記排他チェックステップにて前記別トランザクション内で前記同名オブジェクトの作成要求が検出された場合、当該別トランザクションの実行を中断させて待機させる待機ステップと、
前記別トランザクションのユーザに対して、前記トランザクションの実行対象である前記対象データの対象リストを通知する通知ステップと、
前記トランザクションの実行が完了した場合、当該トランザクションをコミットさせ、前記トランザクションの実行にエラーが生じた場合、当該トランザクションをロールバックさせるトランザクション確定ステップと、
前記トランザクション確定ステップにて前記トランザクションがコミットまたはロールバックされた場合、前記別トランザクションの待機を解除する待機解除ステップと、
前記トランザクションがコミットされた場合、当該トランザクションに基づいて、前記対象データ記憶手段に記憶された前記対象データを更新する更新ステップと、
前記更新ステップにて更新された前記対象データに対する更新を制限する制限ステップと、
前記通知ステップにて通知された前記対象リストに含まれる前記対象データが前記ユーザにより上書更新対象として選択された場合、当該上書更新対象の前記対象データを特定する上書更新対象特定ステップと、
を含み、
前記更新ステップにおいて、
更に、前記上書更新対象特定ステップにて前記上書更新対象の対象データが特定された場合、前記制限ステップにおける制限を解除し、前記別トランザクションに基づいて、前記対象データ記憶手段に記憶された当該上書更新対象の対象データを更新することを特徴とする楽観的排他処理直列化方法。
An optimistic exclusive processing serialization method for causing an optimistic exclusive processing serialization device including a storage unit and a control unit to execute the serialization.
The storage unit is
Target data storage means for storing target data,
Equipped with
It is executed by the control unit.
A transaction execution step for executing a transaction for the target data stored in the target data storage means, and a transaction execution step.
A separate transaction execution step for executing a transaction different from the transaction for the target data stored in the target data storage means, and a separate transaction execution step.
If an object is created in the transaction before the update of the target data based on the transaction and the other transaction is completed, an exclusive check for detecting the creation request of the object with the same name as the object in the other transaction is detected. Steps and
If a request to create the object with the same name is detected in the other transaction in the exclusive check step before the update of the target data based on the transaction and the other transaction is completed, the execution of the other transaction is interrupted. A wait step to make it wait and
A notification step for notifying a user of the other transaction of the target list of the target data which is the execution target of the transaction, and a notification step.
A transaction confirmation step that commits the transaction when the execution of the transaction is completed and rolls back the transaction when an error occurs in the execution of the transaction.
When the transaction is committed or rolled back in the transaction confirmation step, the wait release step for canceling the wait for another transaction and the wait release step.
When the transaction is committed, an update step for updating the target data stored in the target data storage means based on the transaction, and an update step.
A restriction step that restricts the update of the target data updated in the update step, and a restriction step.
When the target data included in the target list notified in the notification step is selected as the overwriting update target by the user, the overwriting update target specifying step for specifying the target data of the overwriting update target ,
Including
In the update step
Further, when the target data of the overwriting update target is specified in the overwriting update target specifying step, the restriction in the restriction step is released, and the data is stored in the target data storage means based on the separate transaction. An optimistic exclusive processing serialization method characterized by updating the target data to be updated.
記憶部と制御部とを備えた楽観的排他処理直列化装置に実行させるための楽観的排他処理直列化プログラムであって、
前記記憶部は、
対象データを記憶する対象データ記憶手段、
を備え、
前記制御部において、
前記対象データ記憶手段に記憶された前記対象データに対するトランザクションを実行させるトランザクション実行ステップと、
前記対象データ記憶手段に記憶された前記対象データに対する前記トランザクションとは別の別トランザクションを実行させる別トランザクション実行ステップと、
前記トランザクションおよび前記別トランザクションに基づく前記対象データの更新の完了前に、前記トランザクション内でオブジェクトが作成された場合、前記別トランザクション内での当該オブジェクトと同名の同名オブジェクトの作成要求を検出する排他チェックステップと、
前記トランザクションおよび前記別トランザクションに基づく前記対象データの更新の完了前に、前記排他チェックステップにて前記別トランザクション内で前記同名オブジェクトの作成要求が検出された場合、当該別トランザクションの実行を中断させて待機させる待機ステップと、
前記別トランザクションのユーザに対して、前記トランザクションの実行対象である前記対象データの対象リストを通知する通知ステップと、
前記トランザクションの実行が完了した場合、当該トランザクションをコミットさせ、前記トランザクションの実行にエラーが生じた場合、当該トランザクションをロールバックさせるトランザクション確定ステップと、
前記トランザクション確定ステップにて前記トランザクションがコミットまたはロールバックされた場合、前記別トランザクションの待機を解除する待機解除ステップと、
前記トランザクションがコミットされた場合、当該トランザクションに基づいて、前記対象データ記憶手段に記憶された前記対象データを更新する更新ステップと、
前記更新ステップにて更新された前記対象データに対する更新を制限する制限ステップと、
前記通知ステップにて通知された前記対象リストに含まれる前記対象データが前記ユーザにより上書更新対象として選択された場合、当該上書更新対象の前記対象データを特定する上書更新対象特定ステップと、
を実行させ
前記更新ステップにおいて、
更に、前記上書更新対象特定ステップにて前記上書更新対象の対象データが特定された場合、前記制限ステップにおける制限を解除し、前記別トランザクションに基づいて、前記対象データ記憶手段に記憶された当該上書更新対象の対象データを更新するための楽観的排他処理直列化プログラム。
An optimistic exclusive processing serialization program for execution by an optimistic exclusive processing serialization device including a storage unit and a control unit.
The storage unit is
Target data storage means for storing target data,
Equipped with
In the control unit
A transaction execution step for executing a transaction for the target data stored in the target data storage means, and a transaction execution step.
A separate transaction execution step for executing a transaction different from the transaction for the target data stored in the target data storage means, and a separate transaction execution step.
If an object is created in the transaction before the update of the target data based on the transaction and the other transaction is completed, an exclusive check for detecting the creation request of the object with the same name as the object in the other transaction is detected. Steps and
If a request to create the object with the same name is detected in the other transaction in the exclusive check step before the update of the target data based on the transaction and the other transaction is completed, the execution of the other transaction is interrupted. A wait step to make it wait and
A notification step for notifying a user of the other transaction of the target list of the target data which is the execution target of the transaction, and a notification step.
A transaction confirmation step that commits the transaction when the execution of the transaction is completed and rolls back the transaction when an error occurs in the execution of the transaction.
When the transaction is committed or rolled back in the transaction confirmation step, the wait release step for canceling the wait for another transaction and the wait release step.
When the transaction is committed, an update step for updating the target data stored in the target data storage means based on the transaction, and an update step.
A restriction step that restricts the update of the target data updated in the update step, and a restriction step.
When the target data included in the target list notified in the notification step is selected as the overwriting update target by the user, the overwriting update target specifying step for specifying the target data of the overwriting update target ,
To execute ,
In the update step
Further, when the target data of the overwriting update target is specified in the overwriting update target specifying step, the restriction in the restriction step is released, and the data is stored in the target data storage means based on the separate transaction. An optimistic exclusive processing serialization program for updating the target data to be updated .
JP2017139183A 2017-07-18 2017-07-18 Optimistic exclusive processing serialization device, optimistic exclusive processing serialization method, and optimistic exclusive processing serialization program Active JP7079573B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017139183A JP7079573B2 (en) 2017-07-18 2017-07-18 Optimistic exclusive processing serialization device, optimistic exclusive processing serialization method, and optimistic exclusive processing serialization program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017139183A JP7079573B2 (en) 2017-07-18 2017-07-18 Optimistic exclusive processing serialization device, optimistic exclusive processing serialization method, and optimistic exclusive processing serialization program

Publications (2)

Publication Number Publication Date
JP2019021043A JP2019021043A (en) 2019-02-07
JP7079573B2 true JP7079573B2 (en) 2022-06-02

Family

ID=65355643

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017139183A Active JP7079573B2 (en) 2017-07-18 2017-07-18 Optimistic exclusive processing serialization device, optimistic exclusive processing serialization method, and optimistic exclusive processing serialization program

Country Status (1)

Country Link
JP (1) JP7079573B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US12197382B2 (en) * 2020-02-03 2025-01-14 Oracle International Corporation Handling faulted database transaction records

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012155498A (en) 2011-01-25 2012-08-16 Fujitsu Ltd Database server device, method for updating database and database update program
JP2016066333A (en) 2014-09-26 2016-04-28 株式会社野村総合研究所 Lock control system and method for database

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3621433B2 (en) * 1993-05-24 2005-02-16 日本電信電話株式会社 Database exclusive control method
JP2654612B2 (en) * 1995-02-23 1997-09-17 日本電気株式会社 Exclusive weight reduction control method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012155498A (en) 2011-01-25 2012-08-16 Fujitsu Ltd Database server device, method for updating database and database update program
JP2016066333A (en) 2014-09-26 2016-04-28 株式会社野村総合研究所 Lock control system and method for database

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
速水治夫ほか,データベースの実装とシステム運用管理,初版,株式会社コロナ社,2010年10月08日,pp.19-31

Also Published As

Publication number Publication date
JP2019021043A (en) 2019-02-07

Similar Documents

Publication Publication Date Title
KR101099199B1 (en) System and method for a snapshot query during database recovery
TW396306B (en) A method of executing perform locked operation instructions for supporting recovery of data consistency if lost due to processor failure, and a method of recovering the data consistency after processor failure
US10198452B2 (en) Document tracking for safe save operations
US7200617B2 (en) Program for managing external storage, recording medium, management device, and computing system
KR101099297B1 (en) Method for managing file replication in applications
US5924102A (en) System and method for managing critical files
US8768966B2 (en) Method for managing simultaneous modification of database objects during development
JP2004528636A (en) Automatic data update
WO1993018454A1 (en) Distributed transaction processing system
US7016920B2 (en) Method for tracking relationships between specified file name and particular program used for subsequent access in a database
WO2020060629A1 (en) Techniques for updating big data tables using snapshot isolation
CN102214088A (en) Document unlocking method and device
US8381104B2 (en) Systems and methods for providing context recognition
JP2001092702A (en) Information processing system, server device, client device, and recording medium
US11113251B2 (en) Transaction manager
EP1517261A2 (en) Work-flow system and work-flow system management method
JP7079573B2 (en) Optimistic exclusive processing serialization device, optimistic exclusive processing serialization method, and optimistic exclusive processing serialization program
US8918370B2 (en) Dynamic allocation of program libraries
JP5057481B2 (en) Workflow system, control method, and program
JP4432087B2 (en) Database update management system, program and method
US8868511B2 (en) Archiving—safe replication of relational data
JP2006244177A (en) Database device
JPH09146762A (en) System file backup method and restoration method
JP2019185234A (en) Recommended treatment notification program, recommended treatment notification method and information processing apparatus
US9846695B2 (en) Information processing apparatus, control method, and storage medium storing program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200702

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210409

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210427

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210623

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20211207

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220216

C60 Trial request (containing other claim documents, opposition documents)

Free format text: JAPANESE INTERMEDIATE CODE: C60

Effective date: 20220216

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20220228

C21 Notice of transfer of a case for reconsideration by examiners before appeal proceedings

Free format text: JAPANESE INTERMEDIATE CODE: C21

Effective date: 20220301

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: 20220426

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220523

R150 Certificate of patent or registration of utility model

Ref document number: 7079573

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250