JP2019168807A - Control device, control method, control program and control system - Google Patents
Control device, control method, control program and control system Download PDFInfo
- Publication number
- JP2019168807A JP2019168807A JP2018054717A JP2018054717A JP2019168807A JP 2019168807 A JP2019168807 A JP 2019168807A JP 2018054717 A JP2018054717 A JP 2018054717A JP 2018054717 A JP2018054717 A JP 2018054717A JP 2019168807 A JP2019168807 A JP 2019168807A
- Authority
- JP
- Japan
- Prior art keywords
- instance
- request
- monitoring unit
- instances
- control unit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Retry When Errors Occur (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
本願発明は、トランザクション処理の制御を行う、制御装置、制御方法、制御プログラム、及び制御システムに関する。 The present invention relates to a control device, a control method, a control program, and a control system that control transaction processing.
近年のシステム等では、短時間に大量トランザクションを処理する「高速性」と24時間稼働を支える「高信頼性」とが求められている。上述の「高速性」と「高信頼性」とを実現する技術として、データストレージを主にメインメモリ上で行うインメモリデータベースがある。 In recent systems, etc., “high speed” that processes a large amount of transactions in a short time and “high reliability” that supports 24-hour operation are required. As a technique for realizing the above-mentioned “high speed” and “high reliability”, there is an in-memory database that performs data storage mainly on a main memory.
一般的に、インメモリデータベースを使ったシステムでは、冗長化を目的としてマスタインスタンス(マスタ)及びスレーブインスタンス(スレーブ)を構成する。インスタンスとは、あらかじめ定義されたコンピュータプログラムやデータ構造などを、メインメモリ上に展開して処理・実行できる状態にしたものである。 Generally, in a system using an in-memory database, a master instance (master) and a slave instance (slave) are configured for the purpose of redundancy. An instance is a state in which a predefined computer program, data structure, and the like are expanded on a main memory and can be processed and executed.
業務アプリケーション(業務AP)がマスタのデータを更新すると、当該更新は更新ログとしてスレーブに転送される。当該更新ログをスレーブのデータに同期又は非同期で反映することで、スレーブをマスタのレプリカとする。マスタ側で障害が発生した場合は、マスタとスレーブとを切り替え、スレーブとして運用していたものをマスタとして運用する事で、マスタ側で障害が発生した場合であっても処理を継続する事が可能となる。以後、マスタとスレーブとを切り替える処理のことを切替処理と呼ぶ。 When the business application (business AP) updates the master data, the update is transferred to the slave as an update log. By reflecting the update log on the slave data synchronously or asynchronously, the slave is made a replica of the master. If a failure occurs on the master side, the master and slave can be switched, and what was operating as a slave can be operated as the master, so that processing can continue even if a failure occurs on the master side. It becomes possible. Hereinafter, the process of switching between the master and the slave is referred to as a switching process.
切替処理はトランザクションの実行中にも発生する場合がある。切替処理に巻き込まれたトランザクションは、異常終了するか、又は切替処理が完了するまで不要なリトライを繰り返してしまう。 Switching processing may also occur during transaction execution. The transaction involved in the switching process ends abnormally or repeats unnecessary retries until the switching process is completed.
複数のインスタンスを有するクラスタ構成データベースにおいて、切替処理に関するする技術の一例として、特許文献1が挙げられる。特許文献1にかかるデータベースアクセス制御部は、データベースアクセス要求に基づいて、データベースインスタンスに対してSQLを発行する。リトライ可否判断部は、データベースシステムから送信された当該SQLの実行結果が異常終了だった場合、ロールバック処理を実行する。データベースアクセス制御部は、当該ロールバック処理が失敗した場合、データベースインスタンスの切り替え(切替処理)を実施する。
特許文献1に開示された技術は、アクセス要求を受け付けるとSQLを発行し、当該SQLの実行結果が異常終了だった場合はロールバック処理を行い、当該ロールバック処理が失敗した場合に切替処理を実施する。しかし、特許文献1に開示された技術は、切替処理が実施されている間にアクセス要求を受け付けた場合について考慮されていない。従って、特許文献1に開示された技術は、切替処理が実施されている間に受け付けたアクセス要求を、アクセス要求の対象となるインスタンスに送信してしまうおそれがある。切替処理中のインスタンスはアクセス要求を受け付ける事が出来ないため、当該切替処理中のインスタンスに送信されたアクセス要求は失敗してしまう。更に、データベースアクセス制御部が当該アクセス要求のリトライを繰り返した場合は、システム全体の負荷が増大する。
The technique disclosed in
本願発明は上記課題を解決し、切替処理が行われている間にデータベースへのアクセス要求を受けた場合に不要なリトライを防止し、システム全体の負荷を削減する事ができる制御装置、制御方法、制御プログラム、及び制御システムを提案する。 The invention of the present application solves the above-described problems, and can prevent unnecessary retries when a request for access to a database is received while switching processing is being performed, and can reduce the load on the entire system and control method A control program and a control system are proposed.
本願発明の制御装置は、インメモリデータベースが有する複数のインスタンスの状態を監視する監視部と、前記複数のインスタンスのうち特定のインスタンスを対象とするトランザクション処理の要求を受け付けた際に、監視部の監視結果が、当該特定のインスタンスで切替処理中であった場合、当該受け付けたトランザクション処理の要求を保留する制御部と、を備える。 The control device according to the present invention has a monitoring unit that monitors the states of a plurality of instances included in the in-memory database, and a monitoring unit that receives a transaction processing request for a specific instance among the plurality of instances. A control unit that suspends the received transaction processing request when the monitoring result indicates that the specific instance is undergoing switching processing.
本願発明の制御方法は、インメモリデータベースが有する複数のインスタンスの状態を監視し、前記複数のインスタンスのうち特定のインスタンスを対象とするトランザクション処理の要求を受け付けた際に、前記監視の結果が、当該特定のインスタンスで切替処理中であった場合、当該受け付けたトランザクション処理の要求を保留する。 The control method of the present invention monitors the state of a plurality of instances in the in-memory database, and when a transaction processing request for a specific instance among the plurality of instances is received, the monitoring result is: If switching processing is being performed in the specific instance, the accepted transaction processing request is suspended.
本願発明のコンピュータプログラムは、インメモリデータベースが有する複数のインスタンスの状態を監視し、前記複数のインスタンスのうち特定のインスタンスを対象とするトランザクション処理の要求を受け付けた際に、前記監視の結果が、当該特定のインスタンスで切替処理中であった場合、当該受け付けたトランザクション処理の要求を保留する、処理をコンピュータに実行させる。 The computer program of the present invention monitors the state of a plurality of instances in the in-memory database, and when a transaction processing request for a specific instance among the plurality of instances is received, the monitoring result is: When switching processing is being performed in the specific instance, the computer is caused to execute processing for holding the received transaction processing request.
本願発明によれば、切替処理が行われている間にデータベースへのアクセス要求を受けた場合に不要なリトライを防止し、システム全体の負荷を削減する事ができる。 According to the present invention, it is possible to prevent unnecessary retries when a database access request is received during the switching process, and to reduce the load on the entire system.
<第1の実施形態>
本願発明の第1の実施形態を、図面を参照して説明する。図1は、第1の実施形態における、制御システム500の構成を示す図である。
<First Embodiment>
A first embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a diagram illustrating a configuration of a
制御システム500は、業務アプリケーション100と(以後、業務AP100と呼ぶ)、インメモリデータベースシステム200と(以後インメモリDB200と呼ぶ)、制御装置300と、を有する。業務AP100と、インメモリDB200と、制御装置300とは、ネットワーク等で接続され、相互に通信可能である。
The
業務AP100は、ユーザ等の要求により、アクセス要求を発行する。具体的に、業務AP100は、インメモリDB200のデータを更新又は参照するためのトランザクションで構成されるアクセス要求を発行する。
The business AP 100 issues an access request in response to a request from a user or the like. Specifically, the business AP 100 issues an access request including a transaction for updating or referring to data in the in-
インメモリDB200は、処理部210と、インスタンス220と、インスタンス230と、インスタンス240と、と有する。
The in-
処理部210は、アクセス要求を受信すると、当該アクセス要求に対して、レコード間の排他制御処理、コミット処理、ロールバック処理、及び当該要求の実行処理等を行う。例えば、処理部210は、受信したアクセス要求が特定のインスタンスを対象としたデータ更新である場合、対象となるインスタンスに対して更新処理を行う。また、処理部210は、マスタで障害が発生した場合、当該マスタとスレーブとを切り替える切替処理を行う。
When receiving the access request, the
インスタンス220は、ユーザ表221、管理プロセス222、及びチェック表223を有する。
The
ユーザ表221は、データアクセスの実施により、更新又は参照される表である。ユーザ表221に示される情報は、ユーザ等が更新又は参照するものであれば、どのようなものであっても構わない。 The user table 221 is a table that is updated or referred to by performing data access. The information shown in the user table 221 may be any information as long as it is updated or referred to by the user or the like.
管理プロセス222は、インスタンス220の状態を管理する。後述する監視部320が管理プロセス222を確認することで、当該管理プロセス222が管理しているインスタンス220の状態を判断することが出来る。監視部320が、管理プロセス222を確認することで判断できるインスタンス220の状態として、例えば、「起動中」「停止中」「障害中」の3種類がある。なお、監視部320が管理プロセスを確認すると説明したが、本願はこれに限られず、インスタンス220の状態を判断できるのであれば、処理部210等が確認を行っても良い。
The
チェック表223は、後述する監視部320がインスタンス220の状態を確認するために定期的にアクセスを行った結果が示されている。具体的に、チェック表223は、監視部320がアクセスした日時とアクセス結果とが対応するログ形式で示される。アクセス結果として、例えば、「正常終了」「タイムアウトの異常終了」「タイムアウト以外の異常終了」の3種類がある。なお、監視部320が定期的にアクセスを行うと説明したが、本願はこれに限られず、インスタンス220にアクセスが行えるのであれば、処理部210等がアクセスを行っても良い。なお、インスタンス220がチェック表を有すると説明したが、本願はこれに限られず、監視部が確認できるのであれば、インスタンス220以外がチェック表223を有しても良い。
The check table 223 shows a result of periodic access by the
「正常終了」とは、監視部320がインスタンス220に対してアクセスを行い、当該アクセスに対して一定時間以内に応答が帰ってきた場合等、アクセスが正常に終了した事を示す。
“Normally completed” indicates that the
「タイムアウトの異常終了」とは、監視部320がインスタンス220に対してアクセスを行い、当該アクセスに対して一定時間以内に応答が帰ってこなかった場合等、アクセスが異常終了した事を示す。
“Abnormal termination of timeout” indicates that the access is terminated abnormally, for example, when the
「タイムアウト以外の異常終了」とは、監視部320がインスタンス220に対してアクセスを行い、当該アクセスに対してタイムアウト以外の原因で異常終了した事を示す。タイムアウト以外の原因とは、監視部320がインスタンス220に対してアクセスをする事が出来なかった場合等が挙げられるが、これに限定されない。
“Abnormal termination other than timeout” indicates that the
インスタンス230及びインスタンス240も、インスタンス220と同様に、ユーザ表、管理プロセス、及びチェック表を有する。インスタンス230及びインスタンス240が有するユーザ表、管理プロセス、及びチェック表の構成は、ユーザ表221、管理プロセス222、及びチェック表223の構成と同様のため、説明は省略する。
Like the
制御装置300は、稼動状態表310と、監視部320と、データアクセス制御部330と、リトライ制御部340と、登録部350と、を有する。
The
稼動状態表310は、各インスタンスの状態が記録される。各インスタンスの状態として、例えば、「稼働中」「停止中」「切替処理中」の3種類がある。 The operation state table 310 records the state of each instance. As the state of each instance, for example, there are three types of “in operation”, “stopped”, and “switching process”.
監視部320は、各インスタンスの管理プロセス及びチェック表の最も新しい日時のアクセス結果を一定時間毎に確認する。監視部320は、全てのインスタンスに対して、管理プロセス及びチェック表を確認した場合、稼動条件に従って各インスタンスの状態を判断し、判断した結果を用いて稼動状態表310を更新する。稼動条件については後述する。
The
また、監視部320は、稼動状態表310を用いて、切替処理の完了を検知する。具体的に、監視部320は、稼動状態表310を更新した際に、「切替処理中」から「起動中」に状態が変化したインスタンスがあるかどうかを確認する。「切替処理中」から「起動中」に状態が変化したインスタンスがあった場合、監視部320は、当該インスタンスで切替処理が完了したと認識し、当該インスタンスで切替処理が完了した旨を示す切替処理完了通知を、後述するリトライ制御部340に送信する。
In addition, the
データアクセス制御部330は、業務AP100又はリトライ制御部340からアクセス要求を受信し、当該受信したアクセス要求に対して、稼動状態表310を用いて確認処理を行う。確認処理とは、データアクセス制御部330が、アクセス要求の対象となるインスタンスの状態を確認する処理である。
The data
データアクセス制御部330は、確認処理の結果、アクセス要求の対象となるインスタンスが「稼働中」だった場合、当該アクセス要求を処理部210に送信する。処理部210は、受信したアクセス要求の対象となるインスタンスに対してデータアクセスの実施を行う。
As a result of the confirmation processing, the data
データアクセス制御部330は、確認処理の結果、アクセス要求の対象となるインスタンスが「停止中」だった場合、当該アクセス要求を処理部210に送信しない。処理部210に送信されないアクセス要求は、当該アクセス要求の対象となるインスタンスで実施されない。
As a result of the confirmation processing, the data
データアクセス制御部330は、確認処理の結果、アクセス要求の対象となるインスタンスが「切替処理中」だった場合、当該アクセス要求を処理部210に送信せず、リトライ制御部340に送信する。
As a result of the confirmation processing, when the instance that is the target of the access request is “switching processing”, the data
リトライ制御部340は、データアクセス制御部330から受け取ったアクセス要求を保留する。具体的に、リトライ制御部340は、データアクセス制御部330から受け取ったアクセス要求を登録部350に登録する事で、当該アクセス要求を保留する。アクセス要求の保留とは、アクセス要求を登録部350に登録する事で、当該アクセスの要求を抑止する事である。
The retry
リトライ制御部340は、監視部320から切替処理完了通知を受信すると、切替処理が完了したインスタンスをアクセスの対象とするアクセス要求を登録部350から取得し、当該取得したアクセス要求を業務AP100に送信する。
When the retry
業務AP100は、リトライ制御部340からアクセス要求を受信すると、受信したアクセス要求を再度発行する。なお、データアクセス制御部330は、業務AP100が再度発行したアクセス要求に対して、確認処理を行っても良いし、確認処理を行わず、処理部210に直接送信しても良い。また、業務AP100は、当該受信したアクセス要求について、ロールバック処理を行った後に、当該受信したアクセス要求を再度発行しても良いし、ロールバック処理を行わずに再度発行しても良い。
When receiving the access request from the retry
なお、切替処理が発生することで、アクセス要求の対象となるインスタンスが過去のアクセス要求の対象となるインスタンスと異なる場合が考えられるが、業務AP100は、適切な対象のインスタンスへアクセス要求を再度発行可能である。
Note that there may be a case where the instance that is the target of the access request is different from the instance that is the target of the previous access request due to the switching process, but the
登録部350は、リトライ制御部340が、データアクセス制御部330から受け取ったアクセス要求を登録する。換言すると、データアクセス制御部330が確認処理を行った結果、アクセス要求の対象となるインスタンスが「切替処理中」だった場合に、当該アクセス要求は登録部350に登録される。登録部350は、バッファ又はキュー等、アクセス要求を登録可能なものであればどのように構成しても良い。
The
なお、図1では、制御装置300が登録部350を有する場合で説明したが、本願はこれに限られない。登録部350は、例えば、リトライ制御部340が有しても良いし、リトライ制御部340と通信可能であるならば、制御装置300の外部に構成しても良い。
In addition, although FIG. 1 demonstrated the case where the
なお、リトライ制御部340は、監視部320から切替処理完了通知を受信すると、登録部350に登録していたアクセス要求を、業務AP100に送る事無く、処理部210に直接送信しても良い。換言すると、リトライ制御部340は、切替処理完了通知を受信すると、登録部350に登録していたアクセス要求の保留を解除し、処理部210に送信しても良い。リトライ制御部340が業務AP100ではなく処理部210にアクセス要求を送信した場合、データアクセス制御部330は、当該アクセス要求に対して、確認処理を行っても良いし、確認処理を行わなくても良い。
When the retry
なお、リトライとは、アクセス要求が失敗した場合に、失敗したアクセス要求と同様のアクセス要求を再度行う事である。アクセス要求の失敗とは、例えば、アクセス要求が処理部210に送信されなかった場合や、切替処理等に巻き込まれてアクセス要求が受け付けられなかった場合等のように、アクセス要求が要求先まで至らなかった場合のことである。
The retry means that when the access request fails, the access request similar to the failed access request is made again. The failure of the access request means that the access request reaches the request destination, for example, when the access request is not transmitted to the
[動作]
次に、第1の実施形態における主な動作を説明する。
[Operation]
Next, main operations in the first embodiment will be described.
図2は、データアクセス制御部330の動作を示すフローチャートである。
FIG. 2 is a flowchart showing the operation of the data
データアクセス制御部330は、業務AP100が発行したアクセス要求を受信する(S11)。
The data
データアクセス制御部330は、稼動状態表310を用いて、アクセス要求の対象となるインスタンスの状態を確認する(S12)。なお、当該S12の処理を確認処理と呼ぶ。
The data
データアクセス制御部330は、アクセス要求先のインスタンスの状態が「稼働中」だった場合(S13で「稼働中」)、当該アクセス要求を処理部210に送信する(S14)。
When the state of the access request destination instance is “in operation” (“in operation” in S13), the data
データアクセス制御部330は、アクセス要求先のインスタンスの状態が「停止中」だった場合(S13で「停止中」)、当該アクセス要求を処理部210送信しない(S15)。
If the state of the access request destination instance is “stopped” (“stopped” in S13), the data
データアクセス制御部330は、アクセス要求先のインスタンスの状態が「切替処理中」だった場合(S13で「切替処理中」)、当該アクセス要求をリトライ制御部340に送信する(S16)。
If the state of the access request destination instance is “switching process” (“switching process” in S13), the data
次に図3を用いて監視部320の主な動作を説明する。
Next, the main operation of the
監視部320は、複数のインスタンスのうち、特定のインスタンスの管理プロセスを確認する(S31)。
The
監視部320は、特定のインスタンスのチェック表を確認する(S32)。
The
監視部320は、複数のインスタンスのうち、全てのインスタンスの管理プロセス及びチェック表を確認してない場合は、全てのインスタンスの管理プロセス及びチェック表を確認するまでS31及びS32の処理を繰り返す(S33でNo)。
If the
監視部320は、全てのインスタンスの管理プロセス及びチェック表を確認した場合(S33でYes)、後述する稼動条件に従って各インスタンスの状態を判断する(S34)。
If the
監視部320は、S34で判断した結果を用いて、稼動状態表310を更新する(S35)。
The
監視部320は、稼動状態表310を更新した際に、「切替処理中」から「起動中」に状態が変化したインスタンスがあるかどうかを確認する。「切替処理中」から「起動中」に状態が変化したインスタンスがあった場合(S36でYes)、監視部320は、リトライ制御部340に切替処理完了通知を送信する(S37)。
When the operating unit table 310 is updated, the
次に図4を用いて、リトライ制御部340の主な動作を説明する。
Next, the main operation of the retry
リトライ制御部340は、データアクセス制御部330から受け取ったアクセス要求を登録部350に登録する(S51)。
The retry
リトライ制御部340は、監視部320から切替処理完了通知を受信すると(S52)、登録部350に登録していたアクセス要求のうち、切替処理が完了したインスタンスをアクセスの対象とするアクセス要求を取得する(S53)。
When the retry
リトライ制御部340は、当該取得したアクセス要求を業務AP100に送信する(S54)。
The retry
[具体例]
次に、第1の実施形態の主な具体例を説明する。
[Concrete example]
Next, main specific examples of the first embodiment will be described.
本具体例では、インスタンス220をマスタインスタンスとして動作させ、インスタンス230及びインスタンス240をインスタンス220のスレーブインスタンスとして動作させるものとする。
In this specific example, the
次に、稼動条件の具体例を示す。稼動条件とは、監視部320が、定期的に各インスタンスの管理プロセス及びチェック表を確認し、各インスタンスの状態を判断するための条件である。各インスタンスの状態として、例えば、「稼働中」「停止中」「切替処理中」がある。管理プロセスの確認結果、チェック表の確認結果、及び稼動条件に基づき各インスタンスの状態を判断するやり方は、インスタンスの状態の一例である「切替処理中」を判断する際に特に有効である。
Next, specific examples of operating conditions are shown. The operating condition is a condition for the
監視部320による管理プロセスの確認結果として挙げられる要素として、例えば、「起動中」「停止中」「障害中」がある。
Examples of elements that can be cited as the result of management process confirmation by the
図5に、監視部320による管理プロセスの確認結果として挙げられる要素の具体例250を示す。
FIG. 5 shows a specific example 250 of elements cited as a result of management process confirmation by the
監視部320によるチェック表の確認結果として、例えば、「正常終了」「タイムアウトの異常終了」「タイムアウト以外の異常終了」がある。
As a result of checking the check table by the
図6に、インスタンス220が有するチェック表223の具体例を示す。日時224には、監視部320がインスタンス220に対してアクセスを行った日時を示す。アクセス結果225には、監視部320がインスタンス220に対してアクセスを行ったアクセス結果を示す。
FIG. 6 shows a specific example of the check table 223 that the
各インスタンスの状態で「稼働中」を判断するための稼動条件は、管理プロセスの確認結果が「起動中」かつ、チェック表の確認結果が「正常終了」である。 The operating condition for determining “in operation” in the state of each instance is that the confirmation result of the management process is “active” and the confirmation result of the check table is “normal end”.
各インスタンスの状態で「停止中」を判断するための稼動条件は、管理プロセスの確認結果が「停止中」かつ、チェック表の確認結果が「タイムアウト以外の異常終了」である。なお、管理プロセスの確認結果が「停止中」の場合は、チェック表の確認結果に関わらず、対象のインスタンスが「停止中」であると設定しても良い。 The operating condition for determining “stopped” in the state of each instance is that the check result of the management process is “stopped” and the check result of the check table is “abnormal termination other than timeout”. When the management process confirmation result is “stopped”, the target instance may be set to “stopped” regardless of the check table confirmation result.
各インスタンスの状態で「切替処理中」を判断するための稼動条件は、マスタインスタンスが条件A又はBを満たし、尚且つ特定のスレーブインスタンスが条件Cを満たす事である。 The operation condition for determining “switching process” in the state of each instance is that the master instance satisfies the condition A or B, and the specific slave instance satisfies the condition C.
条件Aは、管理プロセスの確認結果が「障害中」及びチェック表が「タイムアウト以外で異常終了」である。 Condition A is that the management process confirmation result is “failing” and the check table is “abnormal termination other than timeout”.
条件Bは、管理プロセスの確認結果が「起動中」及びチェック表が「タイムアウトで異常終了」である。 Condition B is that the confirmation result of the management process is “Active” and the check table is “Abnormal termination due to timeout”.
条件Cは、管理プロセスに確認結果が「起動中」及びチェック表が「タイムアウトで異常終了」である。 Condition C is that the confirmation result of the management process is “being activated” and the check table is “abnormal termination due to timeout”.
図7に、稼動状態表310の具体例を示す。稼動状態表310は、インスタンス名311と状態312とを有する。
FIG. 7 shows a specific example of the operating state table 310. The operating state table 310 has an
インスタンス名311の列には、監視部320の監視の対象となるインスタンスの名称を示す。
The column of the
状態312の列には、対象のインスタンスの状態を示す。
The
図7に示す具体例では、インスタンス220及びインスタンス230の状態が切替処理中であることを示し、インスタンス240の状態が稼働中であることを示す。
In the specific example illustrated in FIG. 7, the state of the
次に、第2の実施形態における具体例として、インスタンス220及びインスタンス230で切替処理が実行されている間に、ユーザが、インスタンス220のデータを更新するためのアクセス要求を行った場合の処理について説明する。なお、インスタンスの状態の具体例として、図7に示す稼動状態表310を用いる。
Next, as a specific example in the second embodiment, a process when the user makes an access request for updating the data of the
ユーザは、業務AP100を用いて、アクセス要求をデータアクセス制御部330に送信する。
The user transmits an access request to the data
データアクセス制御部330は、業務AP100が送信したアクセス要求を受信する。
The data
データアクセス制御部330は、図7に示す稼動状態表310を用いて、インスタンス220のインスタンスの状態を確認する。データアクセス制御部330は、図7に示す稼動状態表310を確認すると、インスタンス220が「切替処理中」であるため、当該アクセス要求をリトライ制御部340に送信する。
The data
リトライ制御部340は、データアクセス制御部330からデータアクセス要求を受け取ると、当該アクセス要求を登録部350に登録する。
When the retry
監視部320は、各インスタンスの管理プロセス及びチェック表の最も新しい日時のアクセス結果を一定時間毎に確認する。具体的に、監視部320は、インスタンス220とインスタンス230とインスタンス240との確認を行った場合、稼動条件に従って各インスタンスの状態を判断し、判断した結果を用いて稼動状態表310を更新する。
The
本具体例で、監視部320は、稼動状態表310のインスタンス220及びインスタンス230の状態312を、「切替処理中」から「起動中」に更新したものとする。監視部320は、稼動状態表310を上記のように更新した結果、インスタンス220及びインスタンス230の切替処理が完了した事を認識し、切替処理完了通知をリトライ制御部340に送信する。
In this specific example, it is assumed that the
リトライ制御部340は、監視部320から切替処理完了通知を受信すると、登録部350から、インスタンス220を対象とするアクセス要求を取得し、当該アクセス要求を業務AP100に送信する。
When the retry
業務AP100は、リトライ制御部340からアクセス要求を受信すると、受信したアクセス要求を再度発行する。
When receiving the access request from the retry
これにより、本願発明は、切替処理が行われている間にデータベースへのアクセス要求を受けた場合に不要なリトライを防止し、システム全体の負荷を削減する事ができる。 Thus, the present invention can prevent unnecessary retries when a request for access to the database is received during the switching process, and can reduce the load on the entire system.
また、本願発明は、切替処理中にアクセス要求を受けた場合、当該アクセス要求の対象のインスタンスへ直接送信する前に確認処理を行う事で、当該インスタンスがアクセス不可の場合を即座に認識可能である。 In addition, when an access request is received during the switching process, the present invention can immediately recognize when the instance is inaccessible by performing a confirmation process before transmitting directly to the target instance of the access request. is there.
更に、本願発明を導入する事で、データベースの稼動状態に応じた柔軟なトランザクションの制御が可能となる。 Furthermore, by introducing the present invention, it becomes possible to control transactions flexibly according to the operating state of the database.
なお、図2に記載のS14における処理で処理部210に送信され、処理部210が対象のインスタンスに対してアクセスの実施を行い、当該アクセスが失敗した場合、処理部210は当該アクセス要求を再度データアクセス制御部330に送信しても良い。また、データアクセス制御部330は、処理部210から受け取ったアクセス要求に対して再度確認処理を行っても良い。当該確認処理の結果、アクセス対象のインスタンスが切替処理中だった場合、データアクセス制御部330は当該アクセスをリトライ制御部340に送信する。
If the
これにより、処理部210がアクセスを実施する直前に実施対象のインスタンスで切替処理が発生し、当該アクセスの実施が失敗した場合であっても、当該アクセス要求を即座にリトライする事なく、登録部350に登録する事ができる。更に、当該アクセス要求は切替処理が完了するまで登録部350に登録されるので、不要なリトライを防止し、システム全体の負荷を削減したトランザクション制御を行うことができる。
As a result, even when the switching process occurs in the implementation target instance immediately before the
なお、本願ではデータアクセス制御部330とリトライ制御部340とをそれぞれ分けて説明したが、本願はこれに限られない。本願は、例えば、データアクセス制御部330とリトライ制御部340とを1つにまとめ、制御部として構成することが可能である。この場合、制御部は、データアクセス制御部330及びリトライ制御部340の動作を実施可能である。
In the present application, the data
なお、登録部350に複数のアクセス要求が登録されている場合、リトライ制御部340は、切替完了通知を受信すると、当該複数のアクセス要求を1つずつ業務AP100に送信しても良いし、複数のアクセス要求をまとめて業務AP100に送信しても良い。
When a plurality of access requests are registered in the
なお、本願ではインスタンスの数が3つの場合で説明したが、インスタンスの数は何個でも構わない。また、本願ではマスタ1つ、スレーブ2つの構成で説明したが、本願はこれに限られず、マスタ及びスレーブの数は任意に変更可能である。 In the present application, the number of instances is three, but the number of instances may be any number. Further, although the present application has been described with the configuration of one master and two slaves, the present application is not limited to this, and the number of masters and slaves can be arbitrarily changed.
なお、ユーザ表及び稼動状態チェック表は、インメモリDB200の起動時に新しく生成しても良いし、起動前から各インスタンスが有していても良い。
Note that the user table and the operating state check table may be newly generated when the in-
<第2の実施形態>
本願発明の第2の実施形態を、図面を用いて説明する。第2の実施形態における、制御装置1の構成を図8に示す。
<Second Embodiment>
A second embodiment of the present invention will be described with reference to the drawings. The configuration of the
[構成]
最初に、制御装置1の構成について説明する。図8に示すように、本実施形態における制御装置1は、監視部2と、制御部3と、を有する。
[Constitution]
First, the configuration of the
監視部2は、インメモリデータベースが有する複数のインスタンスの状態を監視する。
The
制御部3は、複数のインスタンスのうち特定のインスタンスを対象とするトランザクション処理の要求を受け付けた際に、監視部2の監視結果が、当該特定のインスタンスで切替処理中であった場合は、当該受け付けたトランザクション処理の要求を保留する。
When the
なお、第2の実施形態における監視部2は、第1の実施形態における監視部320に対応し、第2の実施形態における制御部3は、第1の実施形態におけるデータアクセス制御部330及びリトライ制御部340に対応する。つまり、第2の実施形態における制御部3は、矛盾の無い範囲で、第1の実施形態におけるデータアクセス制御部330及びリトライ制御部340の構成及び動作を実現可能である。
The
[動作]
次に、第2の実施形態の動作について、図9を用いて説明する。
[Operation]
Next, the operation of the second embodiment will be described with reference to FIG.
図9は、第2の実施形態における制御装置1の動作を示すフローチャートである。
FIG. 9 is a flowchart showing the operation of the
監視部2は、インメモリデータベースが有する複数のインスタンスの状態を監視する(S1)。
The
制御部3は、複数のインスタンスのうち特定のインスタンスを対象とするトランザクション処理の要求を受け付けた際に、監視部2の監視結果が、当該特定のインスタンスで切替処理中であった場合は、当該受け付けたトランザクション処理の要求を保留する(S2)。
When the
これにより、第2の実施形態に係る本願発明は、切替処理が行われている間にデータベースへのアクセス要求を受けた場合に不要なリトライを防止し、システム全体の負荷を削減する事ができる。 As a result, the present invention according to the second embodiment can prevent unnecessary retries when the access request to the database is received during the switching process, and can reduce the load on the entire system. .
[プログラム]
本願発明におけるプログラムは、コンピュータに、本願発明の処理を実行させるプログラムである。このプログラムをコンピュータにインストールし、実行することによって、本願発明における制御装置、制御システム及び制御方法を実現することができる。
[program]
The program in the present invention is a program for causing a computer to execute the processing of the present invention. By installing and executing this program in a computer, the control device, control system, and control method of the present invention can be realized.
ここで、本願発明におけるプログラムを実行することによって、制御装置1、制御システム500及び制御方法を実現するコンピュータについて図10を用いて説明する。
Here, the computer which implement | achieves the
図10は、本願発明における制御装置1、制御システム500及び制御方法を実現するコンピュータの一例を示すブロック図である。
FIG. 10 is a block diagram illustrating an example of a computer that implements the
図10に示すように、コンピュータ110は、CPU111と、メインメモリ112と、記憶装置113と、入力インターフェイス114と、表示コントローラ115と、データリーダ/ライタ116と、通信インターフェイス117とを備える。これらの各部は、バス121を介して、互いにデータ通信可能に接続される。
As shown in FIG. 10, the
CPU111は、記憶装置113に格納された、本願発明におけるプログラム(コード)をメインメモリ112に展開し、これらを所定順序で実行することにより、各種の演算を実施する。メインメモリ112は、典型的には、DRAM(Dynamic Random Access Memory)等の揮発性の記憶装置である。また、本願発明におけるプログラムは、コンピュータ読み取り可能な記録媒体120に格納された状態で提供される。なお、本願発明におけるプログラムは、通信インターフェイス117を介して接続されたインターネット上で流通するものであっても良い。
The
また、記憶装置113は、ハードディスクドライブの他、フラッシュメモリ等の半導体記憶装置が挙げられる。入力インターフェイス114は、CPU111と、入力機器118との間のデータ伝送を仲介する。入力機器118とは、例えば、キーボード及びマウス並びにタッチパネル等が挙げられる。表示コントローラ115は、ディスプレイ装置119と接続され、ディスプレイ装置119での表示を制御する。
Examples of the
データリーダ/ライタ116は、CPU111と記録媒体120との間のデータ伝送を仲介し、記録媒体120からのプログラムの読み出し、及びコンピュータ110における処理結果の記録媒体120への書き込みを実行する。通信インターフェイス117は、CPU111と他のコンピュータとの間のデータ伝送を仲介する。
The data reader /
また、記録媒体120の具体例としては、CF(Compact Flash(登録商標))及びSD(Secure Digital)等の汎用的な半導体記憶デバイス、又はフレキシブルディスク(Flexible Disk)等の磁気記憶媒体が挙げられる。更に、記録媒体120の具体例としては、CD−ROM(Compact Disk Read Only Memory)などの光学記憶媒体も挙げられる。
Specific examples of the
ここまで、本願発明を実施するための形態を説明してきたが、本願発明は上述した実施形態に限定されるものではない。例えば、本明細書で記載したフローチャートにおける処理の順序はあくまでも一例に過ぎず、本願発明を実施する際に矛盾のない範囲で変更する事が可能である。また、本明細書で記載した構成はあくまでも一例に過ぎず、本願発明を実施する際に矛盾のない範囲で構成を変更する事が可能である。即ち、本願発明は、本願発明を実施する際に矛盾のない範囲で当業者が理解し得る様々な態様を適用することができ、上記各実施形態の変形例や、その組合せ等も、本願発明の技術的範囲に含まれる。 So far, the embodiment for carrying out the present invention has been described, but the present invention is not limited to the above-described embodiment. For example, the order of processing in the flowcharts described in this specification is merely an example, and can be changed within a consistent range when carrying out the present invention. In addition, the configuration described in this specification is merely an example, and the configuration can be changed within a consistent range when the present invention is implemented. That is, the present invention can apply various modes that can be understood by those skilled in the art within the scope of the present invention when carrying out the present invention. Modifications of the above embodiments, combinations thereof, and the like are also included in the present invention. Is included in the technical scope.
1 制御装置
2 監視部
3 制御部
100 業務アプリケーション
111 CPU
112 メインメモリ
113 記憶装置
114 入力インターフェイス
115 表示コントローラ
116 データリーダ/ライタ
117 通信インターフェイス
118 入力機器
119 ディスプレイ装置
120 記録媒体
200 インメモリデータベースシステム
210 処理部
220 インスタンス
221 ユーザ表
222 管理プロセス
223 チェック表
230 インスタンス
231 ユーザ表
232 管理プロセス
233 チェック表
240 インスタンス
241 ユーザ表
242 管理プロセス
243 チェック表
250 管理プロセスの確認結果として挙げられる要素の具体例
300 制御装置
310 稼動状態表
320 監視部
330 データアクセス制御部
340 リトライ制御部
350 登録部
500 制御システム
DESCRIPTION OF
112
Claims (10)
前記複数のインスタンスのうち特定のインスタンスを対象とするトランザクション処理の要求を受け付けた際に、前記監視部の監視結果が、当該特定のインスタンスで切替処理中であった場合、当該受け付けたトランザクション処理の要求を保留する制御部と、
を備える制御装置。 A monitoring unit that monitors the status of multiple instances of the in-memory database;
When a request for transaction processing for a specific instance among the plurality of instances is received and the monitoring result of the monitoring unit is being switched at the specific instance, A control unit that holds the request;
A control device comprising:
前記制御部は前記監視部が切替処理の完了を検知した場合に前記保留したトランザクション処理を、当該トランザクション処理を発行したアプリケーションに送信する、
請求項1に記載の制御装置。 The monitoring unit detects completion of the switching process,
The control unit transmits the suspended transaction process to the application that issued the transaction process when the monitoring unit detects the completion of the switching process.
The control device according to claim 1.
前記制御部は、前記トランザクション処理の要求を受け付けた際に、前記監視部の監視結果が、前記特定のインスタンスで切替処理中であった場合、当該受け付けたトランザクション処理の要求を前記登録部に登録し、前記監視部が切替処理の完了を検知した場合に、当該登録したトランザクション処理の要求を前記登録部から取得する、
請求項1又は2に記載の制御装置。 A registration unit for registering the transaction processing request;
When the control unit receives the transaction processing request and the monitoring result of the monitoring unit is being switched in the specific instance, the control unit registers the received transaction processing request in the registration unit. When the monitoring unit detects the completion of the switching process, the registered transaction processing request is acquired from the registration unit.
The control device according to claim 1 or 2.
前記複数のインスタンスはそれぞれ、前記監視部がアクセスした結果を示す確認表及び各インスタンス自身の起動中、停止中、又は障害中を示す管理プロセスを備え、
前記監視部は前記確認表と前記管理プロセスとを用いて切替処理中の状態を判断する、
請求項1乃至3のいずれか1項に記載の制御装置。 The state of the plurality of instances includes running, stopping, or switching processing,
Each of the plurality of instances includes a confirmation table indicating a result of access by the monitoring unit, and a management process indicating that each instance itself is being started, stopped, or failed.
The monitoring unit determines a state during the switching process using the confirmation table and the management process.
The control device according to any one of claims 1 to 3.
前記監視部は前記確認表と前記管理プロセスとを用いて前記複数のインスタンスの状態を判断し、当該判断した結果を用いて前記稼動状態表を更新する、
請求項4に記載の制御装置。 An operating state table showing the states of the plurality of instances;
The monitoring unit determines the state of the plurality of instances using the confirmation table and the management process, and updates the operation state table using the determined result.
The control device according to claim 4.
請求項5に記載の制御装置。 The monitoring unit detects completion of the switching process based on the operating state table;
The control device according to claim 5.
前記制御部は前記監視部が切替処理の完了を検知した場合に前記保留したトランザクション処理を前記特定のインスタンスに送信する、
請求項1乃至6のいずれか1項に記載の制御装置。 The monitoring unit detects completion of the switching process,
The control unit transmits the suspended transaction process to the specific instance when the monitoring unit detects the completion of the switching process.
The control device according to any one of claims 1 to 6.
請求項1乃至7のいずれか1項に記載の制御装置と、
前記複数のインスタンスのうち特定のインスタンスを対象とするトランザクション処理の要求を発行し、前記制御装置に送信するアプリケーションと、
を備える制御システム。 An in-memory database with multiple instances;
A control device according to any one of claims 1 to 7,
An application for issuing a transaction processing request for a specific instance of the plurality of instances and transmitting the request to the control device;
A control system comprising:
前記複数のインスタンスのうち特定のインスタンスを対象とするトランザクション処理の要求を受け付けた際に、前記監視の結果が、当該特定のインスタンスで切替処理中であった場合、当該受け付けたトランザクション処理の要求を保留する、
制御方法。 Monitor the status of multiple instances of the in-memory database,
When a request for transaction processing targeting a specific instance among the plurality of instances is received, if the result of the monitoring is switching processing at the specific instance, the received request for transaction processing is Hold,
Control method.
前記複数のインスタンスのうち特定のインスタンスを対象とするトランザクション処理の要求を受け付けた際に、前記監視の結果が、当該特定のインスタンスで切替処理中であった場合、当該受け付けたトランザクション処理の要求を保留する、
処理をコンピュータに実行させるコンピュータプログラム。 Monitor the status of multiple instances of the in-memory database,
When a request for transaction processing targeting a specific instance among the plurality of instances is received, if the result of the monitoring is switching processing at the specific instance, the received request for transaction processing is Hold,
A computer program that causes a computer to execute processing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018054717A JP7013988B2 (en) | 2018-03-22 | 2018-03-22 | Control devices, control methods, control programs, and control systems |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018054717A JP7013988B2 (en) | 2018-03-22 | 2018-03-22 | Control devices, control methods, control programs, and control systems |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2019168807A true JP2019168807A (en) | 2019-10-03 |
JP7013988B2 JP7013988B2 (en) | 2022-02-01 |
Family
ID=68107364
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018054717A Active JP7013988B2 (en) | 2018-03-22 | 2018-03-22 | Control devices, control methods, control programs, and control systems |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7013988B2 (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000293489A (en) * | 1999-04-08 | 2000-10-20 | Nec Corp | Data base server system |
JP2003186722A (en) * | 2001-12-20 | 2003-07-04 | Hitachi Software Eng Co Ltd | Database server failover method in cluster system |
JP2010039746A (en) * | 2008-08-05 | 2010-02-18 | Hitachi Ltd | Data synchronization method, data synchronization program, database server device and database system |
JP2012014671A (en) * | 2010-06-04 | 2012-01-19 | Nippon Telegr & Teleph Corp <Ntt> | Cluster system restoration method, server and software |
US20150278333A1 (en) * | 2014-03-28 | 2015-10-01 | Fujitsu Limited | Information processing apparatus and control method |
-
2018
- 2018-03-22 JP JP2018054717A patent/JP7013988B2/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000293489A (en) * | 1999-04-08 | 2000-10-20 | Nec Corp | Data base server system |
JP2003186722A (en) * | 2001-12-20 | 2003-07-04 | Hitachi Software Eng Co Ltd | Database server failover method in cluster system |
JP2010039746A (en) * | 2008-08-05 | 2010-02-18 | Hitachi Ltd | Data synchronization method, data synchronization program, database server device and database system |
JP2012014671A (en) * | 2010-06-04 | 2012-01-19 | Nippon Telegr & Teleph Corp <Ntt> | Cluster system restoration method, server and software |
US20150278333A1 (en) * | 2014-03-28 | 2015-10-01 | Fujitsu Limited | Information processing apparatus and control method |
JP2015191451A (en) * | 2014-03-28 | 2015-11-02 | 富士通株式会社 | Information processing device, control method, and control program |
Also Published As
Publication number | Publication date |
---|---|
JP7013988B2 (en) | 2022-02-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7043665B2 (en) | Method, system, and program for handling a failover to a remote storage location | |
US8433862B2 (en) | Storage system for adjusting asynchronous copy load based on cache activity rate | |
US20040260736A1 (en) | Method, system, and program for mirroring data at storage locations | |
US9584268B2 (en) | Device level enablement of a communications protocol | |
US20090249010A1 (en) | Apparatus and method for controlling copying | |
US9239807B2 (en) | Providing bus resiliency in a hybrid memory system | |
US9460014B2 (en) | Sharing local cache from a failover node | |
US20130110782A1 (en) | Oportunistic database duplex operations | |
JP2015106345A (en) | Information processing system, information processor, and program | |
US20050044193A1 (en) | Method, system, and program for dual agent processes and dual active server processes | |
JP2008217201A (en) | Automatic update method | |
US8819481B2 (en) | Managing storage providers in a clustered appliance environment | |
JP2017004502A (en) | Information system and update method | |
JP7013988B2 (en) | Control devices, control methods, control programs, and control systems | |
US20150135004A1 (en) | Data allocation method and information processing system | |
US10866756B2 (en) | Control device and computer readable recording medium storing control program | |
JP4375121B2 (en) | Processing agent method in database management system | |
JP5262492B2 (en) | Cluster system and command conflict control method | |
JP5562454B1 (en) | Redundant system server | |
WO2013073022A1 (en) | Computer system and fault detection method | |
EP4163780A1 (en) | Systems, methods, and devices for near storage elasticity | |
US10762011B2 (en) | Reflective memory bridge for external computing nodes | |
JP4193754B2 (en) | Data duplication method and program | |
WO2019180794A1 (en) | Information processing device, middleware, information processing method, and program | |
KR20240031878A (en) | Systems and methods for recovery with a distributed lock manager |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20210215 |
|
RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20211020 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20211116 |
|
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: 20211221 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20220103 |