JP2014016953A - Unshared type database system, synchronizing device, database server, its synchronizing method, and synchronizing program - Google Patents

Unshared type database system, synchronizing device, database server, its synchronizing method, and synchronizing program Download PDF

Info

Publication number
JP2014016953A
JP2014016953A JP2012155767A JP2012155767A JP2014016953A JP 2014016953 A JP2014016953 A JP 2014016953A JP 2012155767 A JP2012155767 A JP 2012155767A JP 2012155767 A JP2012155767 A JP 2012155767A JP 2014016953 A JP2014016953 A JP 2014016953A
Authority
JP
Japan
Prior art keywords
synchronization
database server
database
log
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2012155767A
Other languages
Japanese (ja)
Inventor
Takeshi Mishima
健 三島
Masao Fujii
雅雄 藤井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2012155767A priority Critical patent/JP2014016953A/en
Publication of JP2014016953A publication Critical patent/JP2014016953A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To suppress a decrease in performance resulting from synchronization processing in an unshared type database system.SOLUTION: There is provided an unshared type database system including a synchronizing device connected to a client through a network and a plurality of database servers connected to the synchronizing device and occupying predetermined storage areas respectively. The synchronizing device transmits a synchronization instruction and a synchronization completion signal to a first database server to control synchronization between the first database server and a second database server. When receiving the synchronization instruction, the first database server copies a storage area to be occupied to the second database server after starting generating a log of transactions to be processed, and transmits the log to the second database server. The first database server finishes generating the log on receiving the synchronization completion instruction from the synchronizing device. The second database server receives the log and executes update of storage areas.

Description

本発明は、無共有型データベースシステム、同期装置、データベースサーバ、その同期方法および同期プログラムに関する。   The present invention relates to a non-shared database system, a synchronization device, a database server, a synchronization method thereof, and a synchronization program.

従来、システム中のノード(コンピュータ)がストレージを共有しないノード内蔵型ストレージによって構成された無共有型データベースシステムが知られている。そして、無共有型のデータベースシステムに適用できるデータベース管理システム(DBMS:Database Management System)ソフトウェアとして、MySQL(登録商標)やPostgreSQL等が知られている。   2. Description of the Related Art Conventionally, there is known a non-shared database system configured by a node built-in storage in which nodes (computers) in the system do not share storage. As a database management system (DBMS) software that can be applied to a non-shared database system, MySQL (registered trademark), PostgreSQL, and the like are known.

無共有型データベースシステムでは、各ノード(コンピュータ)上のデータベースサーバが論理的または物理的に1つのデータ領域(データベース)を有し、他のノードとデータ領域を共有しない。したがって、最適な性能を得るためには、無共有型データベースシステムが処理するデータ量の増減に伴い、各ノードのデータ領域の量に応じて処理を割り当て、必要に応じてノードを追加する等の構成の変更を行う。   In the non-shared database system, the database server on each node (computer) has one data area (database) logically or physically, and does not share the data area with other nodes. Therefore, in order to obtain optimum performance, as the amount of data processed by the non-shared database system increases or decreases, processing is allocated according to the amount of data area of each node, and nodes are added as necessary. Make configuration changes.

たとえば、特許文献1は、無共有型データベースシステムにおいて、複数のデータベースサーバの構成を変更する場合、データベース管理ノードが、構成の変更に応じて、データを移動させるデータ領域を特定し、特定されたデータ領域のデータを移動可能か否か、を判定する。すなわち、そのデータ領域とデータベースサーバとの対応付けを変更可能か否か、を判定する。具体的には、当該データ領域についてトランザクションが実行中か否かを判定する。そして、データベース管理ノードは、当該データ領域についてトランザクションが実行中でなければ、当該データ領域を移動させる。すなわち、当該データ領域と対応付けられるデータベースサーバを変更する。また、データベース管理ノードは、当該データ領域についてトランザクションが実行中であれば、トランザクションの完了を待ってから当該データ領域を移動させる。   For example, in Patent Document 1, when a configuration of a plurality of database servers is changed in a non-shared database system, a database management node specifies and specifies a data area to which data is moved in accordance with the configuration change. It is determined whether or not the data in the data area can be moved. That is, it is determined whether or not the association between the data area and the database server can be changed. Specifically, it is determined whether or not a transaction is being executed for the data area. Then, the database management node moves the data area if a transaction is not being executed for the data area. That is, the database server associated with the data area is changed. Also, if a transaction is being executed for the data area, the database management node moves the data area after waiting for completion of the transaction.

また、たとえば、特許文献2は、データベースシステムに新しいデータベースを追加する場合に、既存のデータベースと新規データベースとの同一性を確保した後に、両データベースに対するアクセスを分散することで、システムを停止せずにデータベースを追加する技術を提案している。具体的には、新規データベースをネットワークに接続した後、レプリケーション機能を利用して、既存データベースと新規データベースとのデータの同一性を確保する。レプリケーションとは、データベース管理システムが有する機能の一つであって、所定のデータベースと同一の内容の複製を他のコンピュータ上に作成して、内容の同期を維持する機能である。これによって、システムを停止することなく、新しいデータベースを追加することができる。   Further, for example, in Patent Document 2, when a new database is added to the database system, after ensuring the identity between the existing database and the new database, the system is not stopped by distributing access to both databases. It proposes a technology to add a database. Specifically, after the new database is connected to the network, the replication function is used to ensure the same data in the existing database and the new database. Replication is one of the functions of a database management system, and is a function for maintaining the synchronization of contents by creating a duplicate of the same contents as a predetermined database on another computer. Thus, a new database can be added without stopping the system.

特開2007−328711号公報JP 2007-328711 A 特開2006−178587号公報Japanese Patent Laid-Open No. 2006-178588

T. Mishima and H. Nakamura, Pangea: An Eager Database Replication Middleware guaranteeing Snapshot Isolation without Modification of Database Servers. Update 2, no. 1: 1066-1077 (2009).T. Mishima and H. Nakamura, Pangea: An Eager Database Replication Middleware guaranteeing Snapshot Isolation without Modification of Database Servers.Update 2, no. 1: 1066-1077 (2009).

しかしながら、特許文献1のように、実行中のトランザクションの完了を待ってデータ領域を移動させる場合、トランザクションごとにストレージへのアクセスを伴うコミット処理やロールバック処理が発生し、完了までの待機時間が長くなる。つまり、ハードディスクへのアクセスに要する時間など、ストレージが性能のボトルネックとなる。また、共有型ストレージを利用する場合、通常、SAN(Storage Area Network)やNAS(Network Attached Storage)といった高価な装置が必要となり、コストが高くなる。さらに、新規データベースサーバを追加した直後は、当該サーバはコールド状態であるため、性能が低下する。   However, as in Patent Document 1, when a data area is moved after waiting for completion of a transaction being executed, commit processing or rollback processing involving access to the storage occurs for each transaction, and the waiting time until completion is completed. become longer. In other words, storage becomes a performance bottleneck, such as the time required to access the hard disk. Further, when using a shared storage, an expensive device such as a SAN (Storage Area Network) or NAS (Network Attached Storage) is usually required, resulting in an increase in cost. Furthermore, immediately after adding a new database server, the server is in a cold state, so the performance is degraded.

また、特許文献2のように、レプリケーション機能を利用した場合には、データベースサーバを追加する直前にレプリケーション機能を停止させることになる。そのため、レプリケーション機能を停止した後、データベースサーバが追加されてクライアントからのアクセス(クエリ)を受け付けることができるようになるまでの間に、データベースが更新されることが考えられる。このような場合には、新規に追加されたデータベースサーバには更新が反映されず、全てのデータベースサーバ間での同期を確保することができない。   Further, as in Patent Document 2, when the replication function is used, the replication function is stopped immediately before the database server is added. Therefore, it is conceivable that the database is updated after the replication function is stopped and before the database server is added and access (query) from the client can be accepted. In such a case, the update is not reflected on the newly added database server, and synchronization among all the database servers cannot be ensured.

開示の実施の形態は、上記に鑑みてなされたものであって、無共有型データベースシステムにおいて、システムの性能低下を抑制することができる、無共有型データベースシステム、同期装置、データベースサーバ、その同期方法および同期プログラムを提供することを目的とする。   An embodiment of the disclosure has been made in view of the above, and in a non-shared database system, a non-shared database system, a synchronization device, a database server, and synchronization thereof that can suppress system performance degradation It is an object to provide a method and a synchronization program.

上述した課題を解決し、目的を達成するために、本発明に係る実施の形態は、ネットワークを介してクライアントに接続される同期装置と、当該同期装置と接続され、各々所定の記憶領域を占有する複数のデータベースサーバとを備える無共有型データベースシステムにおいて、同期を実行する場合、複数のデータベースサーバのうち第1のデータベースサーバに同期命令を送信し、第1のデータベースサーバが同期命令を受信した場合、処理するトランザクションのログの作成を開始した後、当該第1のデータベースサーバが占有する記憶領域を前記複数のデータベースサーバのうち第2のデータベースサーバにコピーして、作成したログを第2のデータベースサーバへ送信し、第2のデータベースサーバがログを受信して、記憶領域の更新を実行し、同期が完了したと判定した場合、第1のデータベースサーバに同期完了命令を送信し、第1のデータベースサーバが同期完了命令を受信した場合、第1のデータベースサーバが処理するトランザクションのログの作成を終了することを特徴とする。   In order to solve the above-described problems and achieve the object, an embodiment according to the present invention includes a synchronization device connected to a client via a network, and the synchronization device connected to the synchronization device, each occupying a predetermined storage area. In a non-shared database system including a plurality of database servers that perform synchronization, when synchronization is executed, a synchronization command is transmitted to the first database server among the plurality of database servers, and the first database server receives the synchronization command In this case, after starting the creation of the log of the transaction to be processed, the storage area occupied by the first database server is copied to the second database server among the plurality of database servers, and the created log is Sent to the database server, the second database server receives the log and updates the storage area. When the synchronization is determined to be completed, a synchronization completion command is transmitted to the first database server. When the first database server receives the synchronization completion command, the transaction of the transaction to be processed by the first database server is transmitted. The log creation is terminated.

本発明の実施の形態に係る無共有型データベースシステム、その同期方法、同期装置、データベースサーバおよび同期プログラムは、無共有型データベースシステムにおいて、システムの性能低下を抑制することができるという効果を奏する。   The non-shared database system, the synchronization method thereof, the synchronization device, the database server, and the synchronization program according to the embodiment of the present invention have an effect that the performance degradation of the system can be suppressed in the non-shared database system.

図1は、第1の実施の形態に係る無共有型データベースシステムの構成の一例を示す図である。FIG. 1 is a diagram illustrating an example of a configuration of a non-shared database system according to the first embodiment. 図2は、無共有型データベースシステムに新規データベースサーバを追加する例を説明するための図である。FIG. 2 is a diagram for explaining an example of adding a new database server to a non-shared database system. 図3は、第1の実施の形態に係る同期装置の構成の一例を示す図である。FIG. 3 is a diagram illustrating an example of the configuration of the synchronization device according to the first embodiment. 図4は、第1の実施の形態に係る同期装置が備える管理テーブルに格納される情報の構成の一例を示す図である。FIG. 4 is a diagram illustrating an example of a configuration of information stored in a management table included in the synchronization device according to the first embodiment. 図5は、第1の実施の形態に係る同期装置が備える同期状態記憶部に格納される情報の構成の一例を示す図である。FIG. 5 is a diagram illustrating an example of a configuration of information stored in a synchronization state storage unit included in the synchronization device according to the first embodiment. 図6は、第1の実施の形態に係る無共有型データベースシステムにおける同期制御処理の流れの一例を説明するためのシーケンスチャートである。FIG. 6 is a sequence chart for explaining an example of the flow of the synchronization control process in the non-shared database system according to the first embodiment. 図7は、第1の実施の形態に係るデータベースサーバの構成の一例を示す図である。FIG. 7 is a diagram illustrating an example of the configuration of the database server according to the first embodiment. 図8は、第1の実施の形態に係る無共有型データベースシステムにおける同期処理の流れの一例を示すフローチャートである。FIG. 8 is a flowchart illustrating an example of the flow of synchronization processing in the non-shared database system according to the first embodiment. 図9は、第1の実施の形態の変形例に係る無共有型データベースシステムの構成の一例を示す図である。FIG. 9 is a diagram illustrating an example of a configuration of a non-shared database system according to a modification of the first embodiment. 図10は、第1の実施の形態の変形例に係る無共有型データベースシステムの動作の一例を示すシーケンスチャートである。FIG. 10 is a sequence chart showing an example of the operation of the non-shared database system according to the modification of the first embodiment. 図11は、第2の実施の形態に係るインタークラウドシステムの構成の一例を示す図である。FIG. 11 is a diagram illustrating an example of a configuration of an intercloud system according to the second embodiment. 図12は、無共有型データベースシステムにおける一連の処理を実行するプログラムである同期プログラムによる情報処理が、コンピュータを用いて具体的に実現されることを示す図である。FIG. 12 is a diagram illustrating that information processing by a synchronization program that is a program for executing a series of processes in a non-shared database system is specifically realized using a computer.

以下に、本発明にかかる無共有型データベースシステム、同期装置、データベースサーバ、その同期方法および同期プログラムの実施の形態を図面に基づいて詳細に説明する。なお、この実施の形態によりこの発明が限定されるものではない。また、各実施の形態は適宜組み合わせることができる。   Hereinafter, embodiments of a non-shared database system, a synchronization apparatus, a database server, a synchronization method thereof, and a synchronization program according to the present invention will be described in detail with reference to the drawings. Note that the present invention is not limited to the embodiments. Moreover, each embodiment can be combined suitably.

(第1の実施の形態)
図1は、第1の実施の形態に係る無共有型データベースシステム1の構成の一例を示す図である。図1を参照して、第1の実施の形態に係る無共有型データベースシステム1について説明する。図1に示すように、無共有型データベースシステム1は、同期装置100と、データベースサーバ200A,200B,200Cと、データベース300A,300B,300Cと、を備える。同期装置100には、クライアント400−1,400−2がネットワーク500を介して接続される。また、同期装置100には、ネットワーク500を介して、オペレータ端末700が接続される。さらに、同期装置100には、ネットワーク600を介して、データベースサーバ200A,200B,200Cが接続される。データベースサーバ200A,200B,200Cはそれぞれ、個別のデータベース300A,300B,300Cを有する。
(First embodiment)
FIG. 1 is a diagram illustrating an example of a configuration of a non-shared database system 1 according to the first embodiment. A non-shared database system 1 according to a first embodiment will be described with reference to FIG. As shown in FIG. 1, the non-shared database system 1 includes a synchronization device 100, database servers 200A, 200B, and 200C, and databases 300A, 300B, and 300C. Clients 400-1 and 400-2 are connected to the synchronization apparatus 100 via a network 500. An operator terminal 700 is connected to the synchronization device 100 via the network 500. Furthermore, database servers 200A, 200B, and 200C are connected to the synchronization apparatus 100 via the network 600. The database servers 200A, 200B, and 200C have individual databases 300A, 300B, and 300C, respectively.

ここで、無共有型データベースシステムとは、各データベースサーバが記憶領域を共有しないシステムを言う。すなわち、データベースサーバ200A,200B,200Cは、一つのストレージ装置を共有するのではなく、それぞれが占有する記憶領域を有している。ただし、記憶領域は物理的に別々に構成されるものであってもよいし、論理的に別々に構成されるものであってもよい。   Here, the non-shared database system refers to a system in which each database server does not share a storage area. That is, the database servers 200A, 200B, and 200C do not share a single storage device, but have storage areas that each occupies. However, the storage areas may be physically configured separately, or may be logically configured separately.

また、データベースサーバ200A,200B,200Cおよびデータベース300A,300B,300Cは、仮想技術を利用して実現されてもよい。例えば、データセンタ内のサーバ上に、複数のデータベースサーバを構築し、それぞれに個別の記憶領域を割り当ててデータベースとしてもよい。また、同期装置100は、インタークラウドサービスを提供するクラウド業者が管理するサーバ等によって実現されてもよい。   Further, the database servers 200A, 200B, and 200C and the databases 300A, 300B, and 300C may be realized using virtual technology. For example, a plurality of database servers may be constructed on servers in the data center, and individual storage areas may be allocated to the respective databases to form a database. The synchronization apparatus 100 may be realized by a server or the like managed by a cloud provider that provides an intercloud service.

図1には、2つのクライアント400−1,400−2を示すが、同期装置100に接続されるクライアントの数は特に限定されず、任意の複数の数のクライアントを同期装置100に接続し、各クライアントにデータベースサーバ200A〜200Cを利用させるように構成してもよい。また、図1には、3つのデータベースサーバ200A,200B,200Cを示すが、データベースサーバの数も特に限定されず、任意の複数の数のデータベースサーバを同期装置100に接続することができる。   FIG. 1 shows two clients 400-1 and 400-2, but the number of clients connected to the synchronization device 100 is not particularly limited, and an arbitrary number of clients can be connected to the synchronization device 100. You may comprise so that each client may utilize database server 200A-200C. 1 shows three database servers 200A, 200B, and 200C, the number of database servers is not particularly limited, and any number of database servers can be connected to the synchronization device 100.

[同期装置100による処理の例]
第1の実施の形態に係る同期装置100は、クライアント400−1,400−2からの要求(クエリ)を受信する。クライアント400−1,400−2からの要求には、たとえば、データベースから情報を読み出すリード要求や、データベースに情報を書き込むライト要求が含まれる。以下、特にデータベース上の情報の変更を伴う要求を更新要求と呼ぶ。
[Example of processing by synchronization device 100]
The synchronization device 100 according to the first embodiment receives requests (queries) from the clients 400-1 and 400-2. The requests from the clients 400-1 and 400-2 include, for example, a read request for reading information from the database and a write request for writing information to the database. Hereinafter, a request accompanied by a change in information on the database will be referred to as an update request.

同期装置100は、受信した要求を適宜データベースサーバ200A〜200Cに送信して、要求に係るトランザクションを処理する。トランザクションとは、分けることができない情報処理の単位である。一つの要求に関連してデータの整合性を保つために一体的に処理される一連の操作のまとまりをトランザクションという。   The synchronization device 100 transmits the received request to the database servers 200A to 200C as appropriate, and processes the transaction related to the request. A transaction is a unit of information processing that cannot be divided. A group of a series of operations that are processed together to maintain data integrity in relation to one request is called a transaction.

[同期処理]
第1の実施の形態に係る同期装置100はまた、オペレータ端末700から同期要求を受信し、受信した同期要求に応じて同期処理を実行する。同期要求とは、複数のデータベースサーバ間のデータ内容の同期、すなわち、異なるデータベースサーバが同一のデータ内容を保持するようにする処理の実行を求める要求である。また、同期処理とは、同期装置100に接続されるデータベースサーバ200A〜200Cが同一のデータ内容を保持すること、すなわち、データベース300A〜300Cの記憶内容の同一性を維持するための処理である。第1の実施の形態に係る同期装置100は、通常データ処理時および構成変更処理時において、異なる同期処理を実行する。
[Synchronization processing]
The synchronization device 100 according to the first embodiment also receives a synchronization request from the operator terminal 700 and executes a synchronization process in response to the received synchronization request. The synchronization request is a request for synchronization of data contents between a plurality of database servers, that is, execution of a process for causing different database servers to hold the same data contents. The synchronization process is a process for maintaining the same data contents in the database servers 200A to 200C connected to the synchronization apparatus 100, that is, maintaining the same stored contents of the databases 300A to 300C. The synchronization apparatus 100 according to the first embodiment executes different synchronization processes during normal data processing and configuration change processing.

[構成変更処理]
構成変更処理時とは、無共有型データベースシステム1の構成に関連する処理を行う時である。たとえば、無共有型データベースシステム1に対する処理負荷が過大になった場合に、新規データベースを無共有型データベースシステム1に追加する処理が該当する。すなわち、無共有型データベースシステム1に含まれるデータベースサーバ200A〜200Cの構成になんらかの変更を行う場合を指す。たとえば、一般的にスケーリングと呼ばれる処理が、構成変更処理に該当する。第1の実施の形態では特に、オンラインスケーリングを行う場合を想定する。オンラインスケーリングとは、システムを停止させることなくスケーリングを行うものである。また、データベースサーバ200A〜200Cのいずれかに問題が発生し、問題解決のため、リカバリ等の記憶領域の更新処理を行う場合も構成変更処理時に該当する。第1の実施の形態では、記憶領域の更新処理も新規データベースサーバの追加処理と同様の手順で実行できるため、構成変更処理の一つとして説明する。
[Configuration change processing]
The configuration change processing time is a time when processing related to the configuration of the non-shared database system 1 is performed. For example, when a processing load on the non-shared database system 1 becomes excessive, a process of adding a new database to the non-shared database system 1 is applicable. That is, it refers to a case where some change is made to the configuration of the database servers 200A to 200C included in the non-shared database system 1. For example, a process generally called scaling corresponds to the configuration change process. In the first embodiment, it is assumed that online scaling is performed. Online scaling performs scaling without stopping the system. In addition, when a problem occurs in any of the database servers 200A to 200C and a storage area update process such as recovery is performed to solve the problem, it corresponds to the configuration change process. In the first embodiment, the storage area update process can be executed in the same procedure as the process for adding a new database server.

[通常データ処理]
通常データ処理時とは、無共有型データベースシステム1の構成の変更を伴わない処理である。たとえば、同期装置100が、クライアント400−1,400−2からの要求を受けてデータベースサーバ200A〜200Cに対して要求を送信し、データベースサーバ200A〜200Cからの応答をクライアント400−1,400−2へ返す処理が通常データ処理に該当する。
[Normal data processing]
Normal data processing is processing that does not involve a change in the configuration of the non-shared database system 1. For example, the synchronization device 100 receives requests from the clients 400-1 and 400-2, transmits requests to the database servers 200A to 200C, and sends responses from the database servers 200A to 200C to the clients 400-1, 400-. The processing returned to 2 corresponds to normal data processing.

同期装置100は、通常データ処理時には、全てのデータベースサーバ200A〜200C間で同期を取るように、受信した要求を処理する。たとえば、同期装置100は、データベースサーバ200A,200B,200Cのうち一つのデータベースサーバ、たとえばデータベースサーバ200Aをリーダ(Leader)に指定し、他の二つのデータベースサーバをフォロワ(Follower)に指定する。同期装置100は、クライアント400−1,400−2からの要求をリーダであるデータベースサーバ200Aのみに送信する。そして、リーダであるデータベースサーバ200Aにおける処理が完了してデータベースサーバ200Aからの応答を受信すると、同期装置100は、フォロワであるデータベースサーバ200B,200Cに同じ要求を送信する。すべてのデータベースサーバ200A〜200Cからの応答を受信すると、同期装置100は、クライアント400−1,400−2に応答を送信する。このようにして、同期装置100は通常データ処理時にデータベースサーバ間の同期を確保する。   The synchronization device 100 processes the received request so that all the database servers 200A to 200C are synchronized during normal data processing. For example, the synchronization device 100 designates one of the database servers 200A, 200B, and 200C, for example, the database server 200A as a leader, and designates the other two database servers as followers. The synchronization device 100 transmits requests from the clients 400-1 and 400-2 only to the database server 200A that is a reader. When the processing in the database server 200A as a reader is completed and a response is received from the database server 200A, the synchronization device 100 transmits the same request to the database servers 200B and 200C as followers. When receiving responses from all of the database servers 200A to 200C, the synchronization device 100 transmits responses to the clients 400-1 and 400-2. In this way, the synchronization device 100 ensures synchronization between database servers during normal data processing.

また、同期装置100は、ライトコンフリクトが生じた場合は、ロックを獲得したトランザクションの更新クエリのみを実行可能とし、ロックを獲得できなかったトランザクションの更新クエリはロックを取得するまでブロックする。ライトコンフリクトとは、複数のクライアントから発行された更新クエリが同一のデータを同時に更新しようとすることを指す。たとえば、図1の例では、クライアント400−1とクライアント400−2とが同時に同一のデータの更新を伴う要求(クエリ)を同期装置100に送信した場合である。このように処理することで、同一データに対する更新順序が、全てのデータベースサーバにおいて同一となることを保障する。   Further, when a write conflict occurs, the synchronization apparatus 100 can execute only the update query of the transaction that acquired the lock, and blocks the update query of the transaction that could not acquire the lock until the lock is acquired. Write conflict means that update queries issued from a plurality of clients attempt to update the same data at the same time. For example, in the example of FIG. 1, the client 400-1 and the client 400-2 simultaneously transmit a request (query) that involves updating the same data to the synchronization device 100. Processing in this way ensures that the update order for the same data is the same in all database servers.

なお、通常データ処理時に適用する同期確保のための手法は特に限定されない。ただし、非特許文献1に記載のPangeaとして知られる同期方法を採用することが好ましい。   Note that the method for ensuring synchronization applied during normal data processing is not particularly limited. However, it is preferable to employ a synchronization method known as Pangea described in Non-Patent Document 1.

[ログの作成]
一般的にデータベースシステムにおいては、データ損失を防ぎ保守性を確保するために、各データベースサーバにおいて、ログを作成することが広く行われている。たとえば、ライトアヘッドログ(WALs:Write-Ahead Logs)と呼ばれるログを作成することが知られている。通常ライトアヘッドログは、トランザクションが実行されコミットが行われたことで生じた変更を記録するものであり、不揮発性のディスク、たとえばハードディスクに強制書き込みにより記録される。深刻なデータ損失や故障が発生した場合であっても、WALを参照することでデータを回復することができる。
[Create Log]
In general, in a database system, in order to prevent data loss and ensure maintainability, it is widely performed to create a log in each database server. For example, it is known to create logs called write-ahead logs (WALs). The normal write-ahead log records changes that occur as a result of transactions being executed and commits, and is recorded on a non-volatile disk, such as a hard disk, by forced writing. Even if serious data loss or failure occurs, data can be recovered by referring to WAL.

第1の実施の形態では、通常データ処理時には、データベースサーバ200A〜200Cはログ(WAL)を作成しない。ログを作成しない代わりに、無共有型データベースシステム1は、複数のデータベースサーバ200A〜200C間で同期を取ることによって、すなわちレプリカを作成することによって、データの保守性を確保する。   In the first embodiment, during normal data processing, the database servers 200A to 200C do not create a log (WAL). Instead of creating a log, the non-shared database system 1 ensures data maintainability by synchronizing the database servers 200A to 200C, that is, by creating a replica.

構成変更処理時には、無共有型データベースシステム1のデータベースサーバ200A〜200Cのうち、同期元データベースサーバに指定されたデータベースサーバが、ログを作成する。具体的には、同期装置100から同期元データベースサーバにログ作成を指示し、同期元データベースサーバは、指示に応じてログを作成する。同期元データベースサーバは、作成したログを逐一ハードディスクすなわちデータベースに格納するのではなく、キャッシュファイル等のメモリに格納する。格納したログは、同期装置100からの指示に応じて、同期先データベースサーバに送信される。   During the configuration change process, the database server designated as the synchronization source database server among the database servers 200A to 200C of the non-shared database system 1 creates a log. Specifically, the synchronization apparatus 100 instructs the synchronization source database server to create a log, and the synchronization source database server creates a log in response to the instruction. The synchronization source database server stores the created logs in a memory such as a cache file instead of storing them in the hard disk, that is, the database. The stored log is transmitted to the synchronization destination database server in response to an instruction from the synchronization device 100.

[構成変更処理の一例−新規データベースサーバ追加処理の流れ]
図2を参照して、構成変更処理の一例について説明する。図2は、無共有型データベースシステム1に新規データベースサーバを追加する例を説明するための図である。
[Example of configuration change process-Flow of new database server addition process]
An example of the configuration change process will be described with reference to FIG. FIG. 2 is a diagram for explaining an example of adding a new database server to the non-shared database system 1.

同期装置100は、構成変更処理時、たとえば新規データベースサーバを追加する場合には次の処理を実行する。まず、同期装置100は、オペレータ端末700から追加要求を受信する。追加要求は、新規データベースサーバ、たとえば図2に示すデータベース300Dを占有するデータベースサーバ200Dをシステムに追加する要求である。追加要求は、追加するデータベースサーバのアドレスと、当該データベースサーバと同期させる現用系データベースサーバのアドレスとを指定する。   The synchronization device 100 executes the following process when a configuration change process is performed, for example, when a new database server is added. First, the synchronization device 100 receives an addition request from the operator terminal 700. The addition request is a request for adding a new database server, for example, the database server 200D occupying the database 300D shown in FIG. 2 to the system. The addition request specifies the address of the database server to be added and the address of the active database server to be synchronized with the database server.

新規データベースサーバを追加する場合、新規データベースサーバのデータベースにはまだデータが蓄積されておらず、直ちに無共有型データベースシステム1の構成に追加しても、高い処理性能を達成することができない。そこで、現用系データベースサーバ200A〜200Cの一つにおいて、当該データベースサーバが占有するデータベースのデータコピーを作成させ、新規データベースサーバに転送させる。以下、データコピーを作成するデータベースサーバを同期元データベースサーバまたはマスタ、データコピーを受信する新規データベースサーバを同期先データベースサーバまたはスレーブとも呼ぶ。図2の例では、データベースサーバ200Bが同期元データベースサーバであり、データベースサーバ200Dが同期先データベースサーバである。   When a new database server is added, data is not yet accumulated in the database of the new database server, and even if it is immediately added to the configuration of the non-shared database system 1, high processing performance cannot be achieved. Therefore, in one of the active database servers 200A to 200C, a data copy of the database occupied by the database server is created and transferred to the new database server. Hereinafter, a database server that creates a data copy is also called a synchronization source database server or master, and a new database server that receives a data copy is also called a synchronization destination database server or slave. In the example of FIG. 2, the database server 200B is a synchronization source database server, and the database server 200D is a synchronization destination database server.

追加要求において同期元データベースサーバと同期先データベースサーバを特定する場合は、オペレータがそのアドレスを指定して追加要求に含めて送信する。また、オペレータは追加するデータベースサーバのアドレスのみを指定して、同期装置100が所定の基準に基づき同期元データベースサーバを選択してもよい。同期装置100は、同期元データベースサーバを、フォロワの役割を持つデータベースサーバの中から選択する(図4参照)。たとえば、同期装置100は、図1に示すデータベースサーバ200Bを同期元データベースサーバとして選択する。オペレータが同期元データベースサーバを指定する場合も、同様に、フォロワの役割を持つデータベースサーバの一つを指定する。   When specifying the synchronization source database server and the synchronization destination database server in the addition request, the operator designates the address and transmits it in the addition request. The operator may specify only the address of the database server to be added, and the synchronization device 100 may select the synchronization source database server based on a predetermined criterion. The synchronization device 100 selects the synchronization source database server from the database servers having the role of a follower (see FIG. 4). For example, the synchronization device 100 selects the database server 200B shown in FIG. 1 as the synchronization source database server. Similarly, when the operator designates the synchronization source database server, one of the database servers having the follower role is designated.

[データ転送処理]
新規データベースサーバの追加要求があると、同期装置100は、同期元データベースサーバ200Bにデータベース300Bに格納した情報のコピーであるデータコピーを作成し同期先データベースサーバへ転送するよう指示する。図2の例では、データベースサーバ200Bは、データベースサーバ200Dにデータコピーを転送し、データベースサーバ200Dは、受信したデータコピーをデータベース300Dに格納する。
[Data transfer processing]
When there is a request to add a new database server, the synchronization apparatus 100 instructs the synchronization source database server 200B to create a data copy that is a copy of the information stored in the database 300B and transfer it to the synchronization destination database server. In the example of FIG. 2, the database server 200B transfers a data copy to the database server 200D, and the database server 200D stores the received data copy in the database 300D.

同期装置100はまた、同期元データベースサーバ200Bにログを作成し、データベースサーバ200Dに送信するよう指示する。新規データベースサーバの追加処理中も、クライアント400−1,400−2から同期装置100への要求送信は続いており、同期装置100は通常データ処理を継続して実行している。つまり、追加処理の開始後も、同期装置100は、リード要求やライト要求等を受信し、適宜、データベースサーバ200A〜200Cに要求を送信しているため、データベース300A〜300Cの内容に変更が生じている場合がある。したがって、同期元データベースサーバ200Bがデータコピーを作成した後にデータベース300Bの内容に変更が発生する場合がある。このような変更を、同期先データベースサーバ200Dのデータベース300Dに反映できるよう、データベースサーバ200Bは、実行したトランザクションのログを作成して一時的に記憶し、データベースサーバ200Dに送信する。この際、データベースサーバ200Bは、作成したログをキャッシュファイル等のメモリに格納し、データベース300Bには格納しない。このため、データベース300Bにログを格納する場合と比較して、アクセス時間が低減される。   The synchronization device 100 also instructs the synchronization source database server 200B to create a log and send it to the database server 200D. During the process of adding a new database server, request transmission from the clients 400-1 and 400-2 to the synchronization apparatus 100 continues, and the synchronization apparatus 100 continues to execute normal data processing. That is, even after the start of the additional process, the synchronization device 100 receives a read request, a write request, and the like, and appropriately transmits the request to the database servers 200A to 200C, so that the contents of the databases 300A to 300C change. There may be. Therefore, the contents of the database 300B may change after the synchronization source database server 200B creates a data copy. In order to reflect such a change in the database 300D of the synchronization destination database server 200D, the database server 200B creates a log of the executed transaction, temporarily stores it, and transmits it to the database server 200D. At this time, the database server 200B stores the created log in a memory such as a cache file and does not store it in the database 300B. For this reason, compared with the case where a log is stored in database 300B, access time is reduced.

データベースサーバ200Bから送信されるログがデータベース300Dに反映されて、データベース300Bが格納するデータ内容と、データベース300Dが格納するデータ内容とが、所定の程度まで一致したと判定すると、同期装置100は、クライアント400−1,400−2から受信する新しい更新要求の実行を保留する。ただし、同期装置100は、送信される更新要求の受付は行う。また、同期装置100は、更新を伴わない要求については処理を継続する。したがって、サービスの提供自体は継続されている状態が維持される。同期装置100は、受け付けた更新要求を一時的に記憶して保留する。   When the log transmitted from the database server 200B is reflected in the database 300D and it is determined that the data content stored in the database 300B matches the data content stored in the database 300D to a predetermined extent, The execution of the new update request received from the clients 400-1 and 400-2 is suspended. However, the synchronization device 100 accepts an update request to be transmitted. In addition, the synchronization device 100 continues processing for requests that do not involve updating. Therefore, the service provision itself is maintained. The synchronization device 100 temporarily stores the received update request and holds it.

その後も、データベースサーバ200Bにおけるログの作成と、データベースサーバ200Dへのログの送信は継続する。同期装置100は、データベースサーバ200Bのデータ内容と、データベースサーバ200Dのデータ内容とが完全に一致したと判定すると、データベースサーバ200Bとデータベースサーバ200Dとを切り離す。そして、同期装置100は、データベースサーバ200Dでのログのデータベースへの反映、すなわち記憶領域の更新処理を完了させる。また、同期装置100は、同期元データベースサーバ200Bでのログ作成を終了させる。そして、同期装置100は、データベースサーバ200Dを無共有型データベースシステム1に登録して、データベースサーバ200A〜200Dを利用して、保留していた更新要求の実行を再開する。これによって、構成変更処理は完了し、通常データ処理に戻る。   Thereafter, the creation of the log in the database server 200B and the transmission of the log to the database server 200D are continued. When the synchronization device 100 determines that the data content of the database server 200B and the data content of the database server 200D completely match, the synchronization device 100 separates the database server 200B and the database server 200D. Then, the synchronization device 100 completes the reflection of the log in the database server 200D to the database, that is, the storage area update processing. In addition, the synchronization device 100 ends log creation in the synchronization source database server 200B. Then, the synchronization apparatus 100 registers the database server 200D in the non-shared database system 1 and resumes executing the pending update request using the database servers 200A to 200D. Thereby, the configuration change process is completed, and the process returns to the normal data process.

[第1の実施の形態に係る同期装置100の構成]
次に、図3を参照して、同期装置100の構成の一例について詳細に説明する。図3は、第1の実施の形態に係る同期装置100の構成の一例を示す図である。図3に示すように、同期装置100は、記憶部110および制御部120を備える。
[Configuration of Synchronizing Device 100 according to First Embodiment]
Next, an example of the configuration of the synchronization device 100 will be described in detail with reference to FIG. FIG. 3 is a diagram illustrating an example of the configuration of the synchronization device 100 according to the first embodiment. As illustrated in FIG. 3, the synchronization device 100 includes a storage unit 110 and a control unit 120.

記憶部110は、同期装置100における処理に利用される情報や、処理の結果生成される情報を記憶する。たとえば、記憶部110は、クライアント400−1,400−2から送信される要求を一次的に格納する。また、記憶部110は、ネットワーク500を介して同期装置100に接続されるクライアント400−1,400−2についての情報や、ネットワーク600を介して同期装置100に接続されるデータベースサーバ200A〜200Cについての情報を記憶する。たとえば、記憶部110は、データベースサーバ200A〜200Cのうち、いずれのデータベースサーバがリーダとしての役割を持ち、いずれのデータベースサーバがフォロワとしての役割を持つかを示す情報を記憶する(図4参照)。また、記憶部100は、構成変更処理時には、同期元データベースサーバと同期先データベースサーバを特定する情報を記憶する。   The storage unit 110 stores information used for processing in the synchronization device 100 and information generated as a result of the processing. For example, the storage unit 110 temporarily stores requests transmitted from the clients 400-1 and 400-2. The storage unit 110 also stores information about the clients 400-1 and 400-2 connected to the synchronization device 100 via the network 500 and the database servers 200 </ b> A to 200 </ b> C connected to the synchronization device 100 via the network 600. The information is memorized. For example, the storage unit 110 stores information indicating which of the database servers 200A to 200C has a role as a leader and which database server has a role as a follower (see FIG. 4). . Further, the storage unit 100 stores information for specifying the synchronization source database server and the synchronization destination database server during the configuration change process.

制御部120は、同期装置100が備える各部における処理を制御する。たとえば、制御部120は、後述する同期維持部123による各データベースサーバ間の同期維持のための処理を制御する。また、制御部120は、後述する同期制御部124による同期処理を制御する。たとえば、制御部120は、オペレータ端末700から新規データベースサーバの追加要求を受信すると、同期制御部124を制御して、同期元データベースサーバに対してログ作成開始指示を送信させる。また、制御部120は、同期制御部124を制御して、同期元データベースサーバと同期先データベースサーバとの同期の状態を検出させる。そして、制御部120は、同期制御部124を制御して、同期状態が所定の状態に達したと判定した場合、新しい更新要求(更新クエリ)の実行を保留する。さらに制御部120は、同期制御部124を制御して、同期状態が完了状態に達したと判定した場合、同期先データベースサーバを切り離し、同期元データベースサーバにログの送信を終了させて、同期先データベースサーバを無共有型データベースシステム1に登録し、更新要求の実行を再開する。記憶部110および制御部120の詳細については、以下にさらに詳細に説明する。なお、制御部120は、同期元データベースサーバから同期先データベースサーバに対する、最新のデータベースの内容に相当するデータコピーおよびログの転送が完了した時点で、同期状態が完了状態に達したと判定して、ログ送信を終了させてもよいし、転送完了後、同期先データベースサーバでの更新処理が完了した時点で、同期状態が完了状態に達したと判定して、ログ送信を終了させてもよい。   The control unit 120 controls processing in each unit included in the synchronization device 100. For example, the control unit 120 controls processing for maintaining synchronization between the database servers by the synchronization maintaining unit 123 described later. Further, the control unit 120 controls synchronization processing by a synchronization control unit 124 described later. For example, when receiving a request for adding a new database server from the operator terminal 700, the control unit 120 controls the synchronization control unit 124 to transmit a log creation start instruction to the synchronization source database server. Further, the control unit 120 controls the synchronization control unit 124 to detect the synchronization state between the synchronization source database server and the synchronization destination database server. When the control unit 120 controls the synchronization control unit 124 to determine that the synchronization state has reached a predetermined state, the control unit 120 suspends execution of a new update request (update query). Further, when the control unit 120 controls the synchronization control unit 124 to determine that the synchronization state has reached the completion state, the control unit 120 disconnects the synchronization destination database server, terminates log transmission to the synchronization source database server, and The database server is registered in the non-shared database system 1 and execution of the update request is resumed. Details of the storage unit 110 and the control unit 120 will be described in more detail below. The control unit 120 determines that the synchronization state has reached the completion state when the data copy and log transfer corresponding to the latest database contents from the synchronization source database server to the synchronization destination database server are completed. The log transmission may be terminated, or when the update processing at the synchronization destination database server is completed after the transfer is completed, it is determined that the synchronization state has reached the completion state, and the log transmission may be terminated. .

[記憶部110の構成]
記憶部110は、管理テーブル111と同期状態記憶部112とを備える。
[Configuration of Storage Unit 110]
The storage unit 110 includes a management table 111 and a synchronization state storage unit 112.

管理テーブル111は、同期装置100に接続されるデータベースサーバ200A〜200Cを管理するための情報を格納する。図4は、第1の実施の形態に係る同期装置100が備える管理テーブル111に格納される情報の構成の一例を示す図である。たとえば、図4に示すように、管理テーブル111は、同期装置100に接続される各データベースサーバ200A〜200Cを一意に特定するデータベースサーバID(Identifier)と、各データベースサーバ200A〜200Cの役割と、各データベースサーバ200A〜200Cの状態とを記憶する。無共有型データベースシステム1に新しいデータベースサーバが追加されると、その情報は後述する処理を経て管理テーブル111に格納される。   The management table 111 stores information for managing the database servers 200A to 200C connected to the synchronization device 100. FIG. 4 is a diagram illustrating an example of a configuration of information stored in the management table 111 included in the synchronization device 100 according to the first embodiment. For example, as illustrated in FIG. 4, the management table 111 includes a database server ID (Identifier) that uniquely identifies each database server 200 </ b> A to 200 </ b> C connected to the synchronization apparatus 100, a role of each database server 200 </ b> A to 200 </ b> C, The state of each database server 200A-200C is memorize | stored. When a new database server is added to the non-shared database system 1, the information is stored in the management table 111 through a process described later.

図4中、データベースサーバID「DBS001」で特定されるデータベースサーバ200Aの役割が「リーダ」であり、その状態が「同期」状態であることが示されている。また、データベースサーバID「DBS002」で特定されるデータベースサーバ200Bの役割が「フォロワ」であり、その状態が「同期」状態であることが示されている。また、データベースサーバID「DBS003」で特定されるデータベースサーバ200Cの役割が「フォロワ」であり、その状態が「同期」状態であることが示されている。   In FIG. 4, the role of the database server 200 </ b> A identified by the database server ID “DBS001” is “leader”, and its state is “synchronized”. Further, it is indicated that the role of the database server 200B identified by the database server ID “DBS002” is “follower”, and the state thereof is “synchronized”. Further, it is indicated that the role of the database server 200C specified by the database server ID “DBS003” is “follower”, and the state thereof is “synchronized”.

同期状態記憶部112は、構成変更処理時に、構成変更の対象となるデータベースサーバの同期状態を記憶する。図5は、第1の実施の形態に係る同期装置100が備える同期状態記憶部112に格納される情報の構成の一例を示す図である。図5に示すように、たとえば、新規データベースサーバの追加処理が開始されると、すなわち、同期装置100がオペレータ端末700からの新規データベースサーバの追加要求を受信すると、同期状態記憶部112の「状態:同期」の欄にフラグが立てられる。そして、同期装置100により、同期元データベースサーバと同期先データベースサーバの同期状態が所定の状態に達したと判定されると、同期状態記憶部112の「状態:保留(同期)」の欄にフラグが立てられる。さらに、同期装置100が、同期元データベースサーバと同期先データベースサーバの同期状態が完了したと判定し、同期先データベースサーバを管理テーブル111に登録すると、同期状態記憶部112の「状態:通常」の欄にフラグが立てられる。   The synchronization state storage unit 112 stores the synchronization state of the database server that is the target of the configuration change during the configuration change process. FIG. 5 is a diagram illustrating an example of a configuration of information stored in the synchronization state storage unit 112 included in the synchronization device 100 according to the first embodiment. As shown in FIG. 5, for example, when a process for adding a new database server is started, that is, when the synchronization apparatus 100 receives a request for adding a new database server from the operator terminal 700, Flag is set in the ": Sync" column. When the synchronization apparatus 100 determines that the synchronization state of the synchronization source database server and the synchronization destination database server has reached a predetermined state, a flag is set in the “status: pending (synchronization)” column of the synchronization state storage unit 112. Is established. Further, when the synchronization apparatus 100 determines that the synchronization state of the synchronization source database server and the synchronization destination database server is completed and registers the synchronization destination database server in the management table 111, the “status: normal” in the synchronization state storage unit 112 is stored. The field is flagged.

また、データベースサーバのいずれかが故障して記憶領域の更新処理(例えばリカバリ処理)を行う場合も、同様に同期状態記憶部112に記憶領域の更新処理の進行状態を示す情報を記憶する。たとえば、データベースサーバ200Cに故障が発生し、他のデータベースサーバ200Bからデータをコピーして記憶領域の更新処理を行う場合には、同期装置100は、記憶領域の更新処理の開始を指示するときに、同期状態記憶部112の「状態:同期」にフラグを立てる。そして、同期装置100により、データベースサーバ200Bとデータベースサーバ200Cの同期状態が所定の状態に達したと判定されると、同期状態記憶部112の「状態:保留(同期)」の欄にフラグを立てる。さらに、同期装置100により、データベースサーバ200Bからデータベースサーバ200Cの同期状態が完了したと判定され、データベースサーバ200Bおよび200Cに記憶領域の更新処理の終了が指示されると、同期状態記憶部112の「状態:通常」の欄にフラグが立てられる。なお、図5には図示しないが、同期状態記憶部112は、同期処理の対象となっているデータベースサーバを特定する情報も記憶してもよい。   Similarly, when any of the database servers fails and performs storage area update processing (for example, recovery processing), information indicating the progress of the storage area update processing is similarly stored in the synchronization state storage unit 112. For example, when a failure occurs in the database server 200C and data is copied from another database server 200B and storage area update processing is performed, the synchronization device 100 instructs the start of storage area update processing. Then, a flag is set for “state: synchronization” in the synchronization state storage unit 112. When the synchronization device 100 determines that the synchronization state between the database server 200B and the database server 200C has reached a predetermined state, a flag is set in the “state: pending (synchronization)” column of the synchronization state storage unit 112. . Furthermore, when the synchronization device 100 determines that the synchronization state of the database server 200C has been completed from the database server 200B, and instructs the database servers 200B and 200C to end the storage area update processing, “ A flag is set in the “Status: Normal” column. Although not shown in FIG. 5, the synchronization state storage unit 112 may also store information for specifying the database server that is the target of the synchronization process.

[制御部120の構成]
再び図3を参照して制御部120の構成の一例について説明する。制御部120は、受信部121と、送信部122と、同期維持部123と、同期制御部124と、を備える。受信部121は、外部から送信されるデータ、たとえばクライアント400−1,400−2から送信される要求(クエリ)を受信する。また、受信部121は、オペレータ端末700から送信される要求を受信する。さらに、受信部121は、データベースサーバ200A〜200Cから送信される応答等を受信する。
[Configuration of Control Unit 120]
With reference to FIG. 3 again, an example of the configuration of the control unit 120 will be described. The control unit 120 includes a reception unit 121, a transmission unit 122, a synchronization maintaining unit 123, and a synchronization control unit 124. The receiving unit 121 receives data transmitted from the outside, for example, requests (queries) transmitted from the clients 400-1 and 400-2. The receiving unit 121 receives a request transmitted from the operator terminal 700. Furthermore, the receiving unit 121 receives responses and the like transmitted from the database servers 200A to 200C.

送信部122は、外部にむけてデータを送信する。たとえば、送信部122は、クライアント400−1,400−2からの要求を、データベースサーバ200A〜200Cに送信する。また、送信部122は、オペレータ端末700からの要求に対する応答をオペレータ端末700に送信する。送信部122は、データベースサーバ200A〜200Cから受信した応答をクライアント400に送信する。   The transmission unit 122 transmits data to the outside. For example, the transmission unit 122 transmits requests from the clients 400-1 and 400-2 to the database servers 200A to 200C. In addition, the transmission unit 122 transmits a response to the request from the operator terminal 700 to the operator terminal 700. The transmission unit 122 transmits the response received from the database servers 200 </ b> A to 200 </ b> C to the client 400.

同期維持部123は、データベースサーバ200A〜200Cの間で同期状態を維持する処理を実行する。たとえば、受信部121がクライアント400からライト要求を受信すると、同期維持部123はまず、ライト要求をその時点でリーダの役割を持つデータベースサーバ、たとえばデータベースサーバ200Aに送信する。そして、データベースサーバ200Aにおいてライト要求が実行されコミットが完了すると、すなわち、処理後の状態がデータベース300Aに反映されると、データベースサーバ200Aは、同期装置100に応答を送信する。   The synchronization maintaining unit 123 executes processing for maintaining a synchronization state between the database servers 200A to 200C. For example, when the receiving unit 121 receives a write request from the client 400, the synchronization maintaining unit 123 first transmits the write request to a database server having the role of a reader at that time, for example, the database server 200A. When the write request is executed and the commit is completed in the database server 200A, that is, when the processed state is reflected in the database 300A, the database server 200A transmits a response to the synchronization device 100.

データベースサーバ200Aからの応答を受信すると、同期維持部123は、ライト要求をフォロワであるデータベースサーバ200B,200Cに送信する。そして、データベースサーバ200B,200Cでもライト要求の実行とコミットが完了すると、すなわち、処理後の状態がデータベース300B,300Cに反映されると、データベースサーバ200B,200Cは同期装置100に応答を送信する。同期維持部123は、すべてのデータベースサーバ200A〜200Cから応答を受信すると、クライアント400に応答を送信する。このようにして、同期維持部123は、現用系データベースサーバ200A〜200Cの間でデータの同一性が維持されるように処理を行う。   Upon receiving a response from the database server 200A, the synchronization maintaining unit 123 transmits a write request to the database servers 200B and 200C that are followers. Then, when the execution and commit of the write request are completed in the database servers 200B and 200C, that is, when the processed state is reflected in the databases 300B and 300C, the database servers 200B and 200C transmit a response to the synchronization device 100. When the synchronization maintaining unit 123 receives responses from all the database servers 200 </ b> A to 200 </ b> C, the synchronization maintaining unit 123 transmits responses to the client 400. In this way, the synchronization maintaining unit 123 performs processing so that the data identity is maintained between the active database servers 200A to 200C.

なお、同期維持部123が行う同期維持のための処理は特に限定されず、複数のデータベースが常時同じデータを保持するようにできる処理であればよい。すなわち、レイジーレプリケーション(Lazy Replication)やイーガーレプリケーション(Eager Replication)に分類される同期処理等を同期維持部123での処理に適用することができる。ただし、本発明においては、非特許文献1に記載の同期処理を適用することが好ましい。   Note that the process for maintaining synchronization performed by the synchronization maintaining unit 123 is not particularly limited as long as a plurality of databases can always hold the same data. That is, synchronization processing classified into lazy replication and eager replication can be applied to processing in the synchronization maintaining unit 123. However, in the present invention, it is preferable to apply the synchronization processing described in Non-Patent Document 1.

同期制御部124は、受信部121がオペレータ端末700から二つのデータベースサーバ間での同期を伴う要求を受信した場合に、データベースサーバ間での同期を実現する処理を実行する。同期を伴う要求とは、たとえば、新規データベースサーバの追加要求である。また、同期を伴う要求とは、たとえば、現用系データベースサーバ200A〜200Cにおける記憶領域の更新処理の要求である。   When the receiving unit 121 receives a request involving synchronization between two database servers from the operator terminal 700, the synchronization control unit 124 executes processing for realizing synchronization between the database servers. The request with synchronization is, for example, a request for adding a new database server. The request with synchronization is, for example, a request for storage area update processing in the active database servers 200A to 200C.

同期制御部124は、受信部121がオペレータ端末700から新規データベースサーバの追加要求を受信した場合に、現用系データベースサーバと新規データベースサーバとの間の同期を実現する処理を実行する。処理の詳細は後述する。   When the receiving unit 121 receives a request for adding a new database server from the operator terminal 700, the synchronization control unit 124 executes processing for realizing synchronization between the active database server and the new database server. Details of the processing will be described later.

また、同期制御部124は、現用系データベースサーバ200A〜200Cのいずれかにおいて故障が発生し、故障が通知された場合に、故障が発生したデータベースサーバの記憶領域の更新処理を実行する。また、同期制御部124は、同期装置100がデータベースサーバ200A〜200Cの故障を検出した場合に、故障が検出されたデータベースサーバの記憶領域の更新処理を実行する。記憶領域の更新処理においては、現用系データベースサーバの一つから故障したデータベースサーバに対してデータベースに格納されたデータのデータコピーと記憶領域の更新処理の指示を受けてから実行したトランザクションのログとを送信することになるため、実質的に、新規データベースサーバの追加時と同様の処理を実行することになる。   In addition, when a failure occurs in any of the active database servers 200A to 200C and the failure is notified, the synchronization control unit 124 performs an update process of the storage area of the database server in which the failure has occurred. Further, when the synchronization device 100 detects a failure of the database servers 200A to 200C, the synchronization control unit 124 executes an update process of the storage area of the database server where the failure is detected. In the storage area update process, a data copy of the data stored in the database to the failed database server from one of the active database servers, and a log of transactions executed after receiving an instruction for the storage area update process, Therefore, substantially the same processing as when a new database server is added is executed.

[同期制御処理の流れ]
次に、同期制御部124において実行される同期制御処理の流れの一例について説明する。図6は、第1の実施の形態に係る無共有型データベースシステム1における同期制御処理の流れの一例を説明するためのシーケンスチャートである。
[Synchronous control process flow]
Next, an example of the flow of the synchronization control process executed in the synchronization control unit 124 will be described. FIG. 6 is a sequence chart for explaining an example of the flow of the synchronization control process in the non-shared database system 1 according to the first embodiment.

図6に示すように、まずオペレータ端末700が同期装置100に新規データベースサーバの追加要求を送信する(図6の(1))。追加要求を受信した同期装置100の同期制御部124は、同期状態記憶部112の「状態:同期」にフラグを立てる(図6の(2))。そして、同期制御部124は、管理テーブル111を参照して、同期元データベースサーバを選択する。なお、オペレータ端末700からの追加要求において、同期元データベースサーバのアドレスを指定してもよい。   As shown in FIG. 6, first, the operator terminal 700 transmits a request for adding a new database server to the synchronization device 100 ((1) in FIG. 6). Upon receiving the addition request, the synchronization control unit 124 of the synchronization device 100 sets a flag in “status: synchronization” in the synchronization status storage unit 112 ((2) in FIG. 6). Then, the synchronization control unit 124 refers to the management table 111 and selects a synchronization source database server. Note that, in the addition request from the operator terminal 700, the address of the synchronization source database server may be specified.

次に、同期制御部124は、現用系データベースサーバ200Bに、データベース300Bのデータコピーの作成とログの作成開始を指示する(図6の(3))。現用系データベースサーバ200Bは、ログの作成を開始した後、データコピーを作成し、作成したデータコピーを新規データベースサーバ200Dに送信する(図6の(4))。新規データベースサーバ200Dは、データコピーの受信を完了すると、受信完了応答を現用系データベースサーバ200Bに送信する(図6の(5))。現用系データベースサーバ200Bは、データコピーの送受信が完了したことを示す完了応答を同期装置100に送信する(図6の(6))。次に、現用系データベースサーバ200Bは、新規データベースサーバ200Dに対してログを送信する(図6の(7))。なお、図には明示しないが、現用系データベースサーバ200Bは、この後、同期制御部124が同期状態記憶部112の「状態:通常」にフラグを立てるまでの間、継続的に新規データベースサーバ200Dにログを送信する。また、ログの送信は、データコピーの送信と並行して実行してもよい。   Next, the synchronization control unit 124 instructs the active database server 200B to create a data copy of the database 300B and start creating a log ((3) in FIG. 6). The active database server 200B starts creating a log, creates a data copy, and transmits the created data copy to the new database server 200D ((4) in FIG. 6). When the new database server 200D completes reception of the data copy, it transmits a reception completion response to the active database server 200B ((5) in FIG. 6). The active database server 200B transmits a completion response indicating that transmission / reception of the data copy has been completed to the synchronization device 100 ((6) in FIG. 6). Next, the active database server 200B transmits a log to the new database server 200D ((7) in FIG. 6). Although not explicitly shown in the figure, the active database server 200B continuously continues to the new database server 200D until the synchronization control unit 124 sets a flag “status: normal” in the synchronization state storage unit 112. Send logs to. The log transmission may be executed in parallel with the data copy transmission.

新規データベースサーバ200Dは、ログを受信しデータベース300Dへの反映を完了すると、完了応答を現用系データベースサーバ200Bに送信する(図6の(8))。現用系データベースサーバ200Bは、さらに完了応答を同期装置100に送信する(図6の(9))。なお、図6では、ログの送受信結果を逐一、現用系データベースサーバ200Bおよび同期装置100に通知するものとして記載したが、応答送信等は適宜省略してもよい。   When the new database server 200D receives the log and completes reflection in the database 300D, the new database server 200D transmits a completion response to the active database server 200B ((8) in FIG. 6). The active database server 200B further transmits a completion response to the synchronization device 100 ((9) in FIG. 6). In FIG. 6, the log transmission / reception results are described as being notified to the active database server 200 </ b> B and the synchronization apparatus 100 one by one, but response transmission and the like may be omitted as appropriate.

同期制御部124は、現用系データベースサーバ200Bから新規データベースサーバ200Dへのデータの転送が進むと、同期状態が所定の程度に到達したか否かを判定する(図6の(10))。ここで、同期制御部124は、たとえば、現用系データベースサーバ200Bに送信した要求のログを作成しておき、現用系データベースサーバ200Bから受信したログ反映完了応答を参照して、新規データベースサーバ200Dとの同期状態を判定してもよい。同期状態の判定手法は特に限定されない。   When the data transfer from the active database server 200B to the new database server 200D proceeds, the synchronization control unit 124 determines whether or not the synchronization state has reached a predetermined level ((10) in FIG. 6). Here, for example, the synchronization control unit 124 creates a log of the request transmitted to the active database server 200B, refers to the log reflection completion response received from the active database server 200B, and sets the new database server 200D. The synchronization state may be determined. The method for determining the synchronization state is not particularly limited.

同期制御部124は、現用系データベースサーバ200Bと新規データベースサーバ200Dとの同期状態が所定の程度に到達したと判定すると、同期状態記憶部112の「状態:保留(同期)」にフラグを立てる(図6の(11))。同期状態記憶部112が「保留(同期)」状態となると、同期装置100は以後、同期状態記憶部112が「通常」状態に変更されるまでの間、クライアント400−1,400−2からの更新要求を受信した場合、実行せずに、記憶部110に格納して保留する。   When the synchronization control unit 124 determines that the synchronization state between the active database server 200B and the new database server 200D has reached a predetermined level, the synchronization control unit 124 sets a flag for “state: pending (synchronization)” in the synchronization state storage unit 112 ( (11) of FIG. When the synchronization state storage unit 112 enters the “pending (synchronization)” state, the synchronization apparatus 100 thereafter performs the processes from the clients 400-1 and 400-2 until the synchronization state storage unit 112 is changed to the “normal” state. When an update request is received, the update request is stored in the storage unit 110 without being executed.

つまり、同期状態記憶部112が「保留(同期)」状態となってから「通常」状態になるまでの間、同期装置100は、クライアント400−1,400−2からの要求を受信した場合、まず、更新要求であるか否かを判定する。そして、更新要求でない場合は、同期装置100は、当該要求をリーダであるデータベースサーバ200Aに送信して通常の処理を行う。他方、更新要求である場合は、同期装置100は、当該要求を記憶部110に格納し、実行せずに保留する。なお、「保留(同期)」状態に移行した際に、既に実行中の更新トランザクションについては、実行を中止せずに継続する。したがって、「保留(同期)状態」に移行した後も、データベースサーバ200Bは適宜ログを作成してデータベースサーバ200Dに送信する(図6の(12)、(13)、(14)、(15))。   That is, when the synchronization apparatus 100 receives a request from the clients 400-1 and 400-2 until the synchronization state storage unit 112 enters the “pending (synchronization)” state and then enters the “normal” state, First, it is determined whether it is an update request. If it is not an update request, the synchronization device 100 transmits the request to the database server 200A, which is a reader, and performs normal processing. On the other hand, if it is an update request, the synchronization device 100 stores the request in the storage unit 110 and holds it without executing it. Note that, when the state is shifted to the “pending (synchronous)” state, an update transaction that is already being executed continues without being stopped. Therefore, even after shifting to the “pending (synchronized) state”, the database server 200B creates a log as appropriate and transmits it to the database server 200D ((12), (13), (14), (15) in FIG. 6). ).

同期状態記憶部112が「保留(同期)」状態に移行した後、所定時間が経過すると、同期制御部124は、実行中のトランザクションの有無を判定する(図6の(16))。実行中のトランザクションがなければ、現用系データベースサーバ200Bから新規データベースサーバ200Dへのデータコピーおよびログの転送が完了しているか否かを判定する(図6の(17))。他方、実行中のトランザクションが存在すれば、当該トランザクションの完了を待つため、さらに所定時間待機する。転送が完了していると判定すると、同期制御部124は、新規データベースサーバ200Dと現用系データベースサーバ200Bとを切り離す(図6の(18))。そして、同期制御部124は、新規データベースサーバ200Dにおけるログの反映処理(リカバリ処理等の記憶領域の更新処理)が完了したか否かを判定する(図6の(19))。反映処理が完了していれば、同期制御部124は、新規データベースサーバ200Dを管理テーブル111に登録し(図6の(20))、同期状態記憶部112の「状態:通常」にフラグをたてる(図6の(21))。これで、同期制御部124による同期処理が完了する。   When a predetermined time elapses after the synchronization state storage unit 112 shifts to the “pending (synchronization)” state, the synchronization control unit 124 determines whether there is a transaction being executed ((16) in FIG. 6). If there is no transaction being executed, it is determined whether data copy and log transfer from the active database server 200B to the new database server 200D have been completed ((17) in FIG. 6). On the other hand, if there is a transaction being executed, it waits for a predetermined time in order to wait for the completion of the transaction. If it is determined that the transfer has been completed, the synchronization control unit 124 disconnects the new database server 200D and the active database server 200B ((18) in FIG. 6). Then, the synchronization control unit 124 determines whether or not the log reflection processing (storage area update processing such as recovery processing) in the new database server 200D is completed ((19) in FIG. 6). If the reflection processing has been completed, the synchronization control unit 124 registers the new database server 200D in the management table 111 ((20) in FIG. 6), and flags “status: normal” in the synchronization status storage unit 112. ((21) in FIG. 6). Thus, the synchronization process by the synchronization control unit 124 is completed.

なお、図6においては、データベースサーバ200Bは、同期装置100からログ作成指示を受信した後、同期状態記憶部112が「状態:通常」に移行するまでの間、ログ作成および送信を行うものとして記載した。しかし、これに限定されず、データベースサーバ200Bによるログの作成は、実行中のトランザクションが完了した後、すなわち、図6の(16)において実行中トランザクションなしと判定されれば、終了してよい。ただし、ログ作成終了のタイミングは特に限定されず、実行中トランザクションなしと判定された後、同期状態記憶部112が「状態:通常」に移行するまでの間の任意の時点で終了するようにすればよい。   In FIG. 6, the database server 200 </ b> B performs log creation and transmission until the synchronization state storage unit 112 shifts to “status: normal” after receiving the log creation instruction from the synchronization device 100. Described. However, the present invention is not limited to this, and the creation of the log by the database server 200B may be ended after the transaction being executed is completed, that is, when it is determined that there is no transaction being executed in (16) of FIG. However, the timing of the end of log creation is not particularly limited, and may be terminated at any time after the synchronization state storage unit 112 shifts to “status: normal” after it is determined that there is no transaction in progress. That's fine.

[第1の実施の形態に係るデータベースサーバの構成]
図7は、第1の実施の形態に係るデータベースサーバ200Aの構成の一例を示す図である。図1に示すデータベースサーバ200A〜200Cのいずれも、図7に示す構成と同様の構成を備えるが、図7は例としてデータベースサーバ200Aを示す。
[Configuration of database server according to the first embodiment]
FIG. 7 is a diagram illustrating an example of the configuration of the database server 200A according to the first embodiment. All of the database servers 200A to 200C shown in FIG. 1 have the same configuration as that shown in FIG. 7, but FIG. 7 shows the database server 200A as an example.

図7に示すように、データベースサーバ200Aは、記憶部210と制御部220とを備える。記憶部210は、データベースサーバ200Aにおける処理に利用する情報や、データベースサーバ200Aにおける処理の結果として生成される情報を記憶する。制御部220は、データベースサーバ200Aにおける各部の処理を制御する。   As shown in FIG. 7, the database server 200 </ b> A includes a storage unit 210 and a control unit 220. The storage unit 210 stores information used for processing in the database server 200A and information generated as a result of processing in the database server 200A. The control unit 220 controls processing of each unit in the database server 200A.

[記憶部210の構成]
記憶部210は、ログ記憶部211とデータコピー記憶部212とを備える。ログ記憶部211は、同期装置100からの指示に応じて、データベースサーバ200Aにおいて作成されるログを記憶するメモリである。ログ記憶部211はたとえば、データベースサーバ200Aが作成したWALを記憶する。データベースサーバ200Aは、作成したログをデータベース300Aやハードディスクに格納することはせず、ログ記憶部211に保持する。ログ記憶部211は、ハードディスク等と比較してアクセス速度が速いメモリ、たとえばキャッシュファイルで構成する。
[Configuration of Storage Unit 210]
The storage unit 210 includes a log storage unit 211 and a data copy storage unit 212. The log storage unit 211 is a memory that stores a log created in the database server 200 </ b> A in response to an instruction from the synchronization device 100. For example, the log storage unit 211 stores the WAL created by the database server 200A. The database server 200 </ b> A does not store the created log in the database 300 </ b> A or the hard disk but holds it in the log storage unit 211. The log storage unit 211 is configured by a memory having a higher access speed than a hard disk or the like, for example, a cache file.

ログ記憶部211の内容は、同期装置100から、ログ作成指示を受信したタイミングで一端初期化される。ただし、処理ごとに、新しくログを作成することができればよく、たとえば、同期制御部124が同期状態記憶部112の状態を「保留(同期)」から「通常」に変更したときに、同期装置100からデータベースサーバ200Aに初期化指示を送信し、ログ記憶部211を初期化するものとしてもよい。   The contents of the log storage unit 211 are initialized once when a log creation instruction is received from the synchronization device 100. However, it is only necessary that a new log can be created for each process. For example, when the synchronization control unit 124 changes the state of the synchronization state storage unit 112 from “pending (synchronous)” to “normal”, the synchronization device 100 It is also possible to initialize the log storage unit 211 by transmitting an initialization instruction to the database server 200A.

データコピー記憶部212は、データベースサーバ200Aが同期装置100からの指示に応じて作成したデータコピーを一次的に記憶する。記憶したデータコピーは逐次、新規データベースサーバへ送信される。   The data copy storage unit 212 temporarily stores a data copy created by the database server 200A in response to an instruction from the synchronization device 100. The stored data copy is sequentially transmitted to the new database server.

[制御部220の構成]
制御部220は、トランザクション処理部221と、ログ受信部222と、ログ送信部223と、更新実行部224と、を備える。
[Configuration of Control Unit 220]
The control unit 220 includes a transaction processing unit 221, a log reception unit 222, a log transmission unit 223, and an update execution unit 224.

トランザクション処理部221は、同期装置100を介して送信されるクライアント400−1,400−2からの要求に応じてトランザクションを実行する。トランザクション処理部221は、たとえば、ライト要求を受信すると、スナップショットの作成や、データベースへの情報の書き込み処理、コミット処理等を実行する。処理が完了するとトランザクション処理部221は、応答を同期装置100へ送信する。   The transaction processing unit 221 executes a transaction in response to a request from the clients 400-1 and 400-2 transmitted via the synchronization device 100. For example, when the transaction processing unit 221 receives a write request, the transaction processing unit 221 executes creation of a snapshot, writing information to a database, commit processing, and the like. When the processing is completed, the transaction processing unit 221 transmits a response to the synchronization device 100.

トランザクション処理部221はまた、同期装置100からログ作成開始指示を受信した場合に、ログの作成を開始し、同期装置100からログ作成終了指示を受信した場合に、ログの作成を終了する。トランザクション処理部221が作成したログは、ログ記憶部211に格納する。トランザクション処理部221は、常時ログを作成するのではなく、同期装置100からの指示を受信した場合にログを作成する。また、トランザクション処理部221は、同期装置100からログ作成開始指示を受信すると、ログ記憶部211を初期化する。   The transaction processing unit 221 also starts log creation when a log creation start instruction is received from the synchronization apparatus 100, and ends log creation when a log creation end instruction is received from the synchronization apparatus 100. The log created by the transaction processing unit 221 is stored in the log storage unit 211. The transaction processing unit 221 does not always create a log, but creates a log when receiving an instruction from the synchronization device 100. In addition, when the transaction processing unit 221 receives a log creation start instruction from the synchronization device 100, the transaction processing unit 221 initializes the log storage unit 211.

トランザクション処理部221はまた、同期装置100からデータコピーを作成する指示を受信した場合に、データコピーの作成を実行し、データコピー記憶部212に格納する。   When the transaction processing unit 221 receives an instruction to create a data copy from the synchronization device 100, the transaction processing unit 221 also creates a data copy and stores it in the data copy storage unit 212.

ログ受信部222は、他のデータベースサーバが作成したログを受信する。図1および図4の例では、データベースサーバ200Aは、リーダである。しかし、構成が変更された場合は、データベースサーバ200Aは、フォロワやスレーブとして動作する場合もある。たとえば、データベースサーバ200Aがスレーブ、すなわち同期先データベースサーバとして動作する場合、ログ受信部222は、同期元データベースサーバが作成したログを受信する。   The log receiving unit 222 receives logs created by other database servers. In the example of FIGS. 1 and 4, the database server 200A is a reader. However, when the configuration is changed, the database server 200A may operate as a follower or a slave. For example, when the database server 200A operates as a slave, that is, a synchronization destination database server, the log receiving unit 222 receives a log created by the synchronization source database server.

ログ送信部223は、データベースサーバ200Aが作成し、ログ記憶部211に格納したログを、他のデータベースサーバに送信する。たとえば、データベースサーバ200Aがマスタ、すなわち同期元データベースサーバとして動作する場合、ログ送信部223は、ログ記憶部211に格納されたログを、同期先データベースサーバへ送信する。たとえば、ログ送信部223は、定期的にログ記憶部211を参照し、ログが格納されていれば、適宜、同期先データベースサーバにログを送信する。   The log transmission unit 223 transmits the log created by the database server 200A and stored in the log storage unit 211 to another database server. For example, when the database server 200A operates as a master, that is, a synchronization source database server, the log transmission unit 223 transmits the log stored in the log storage unit 211 to the synchronization destination database server. For example, the log transmission unit 223 periodically refers to the log storage unit 211 and, if a log is stored, appropriately transmits the log to the synchronization destination database server.

更新実行部224は、ログ受信部222が受信したログに基づいて記憶領域の更新処理を実行する。たとえば、更新実行部224は、データベースサーバ200Aが新規データベースサーバとして新たに無共有型データベースシステム1に追加される場合に、他のデータベースサーバからデータコピーとログを受信してデータを取得する場合の処理を実行する。また、更新実行部224は、データベースサーバ200Aに故障が発生し、他のデータベースサーバからデータコピーとログを受信してデータを回復する場合の処理を実行する。   The update execution unit 224 executes storage area update processing based on the log received by the log reception unit 222. For example, when the database server 200A is newly added to the non-shared database system 1 as a new database server, the update execution unit 224 receives data copies and logs from other database servers and acquires data. Execute the process. In addition, the update execution unit 224 executes processing when a failure occurs in the database server 200A and data is recovered by receiving a data copy and a log from another database server.

[第1の実施の形態における同期処理の流れ]
図8は、第1の実施の形態に係る無共有型データベースシステム1における同期処理の流れの一例を示すフローチャートである。以下、図8を参照して、第1の実施の形態に係る無共有型データベースシステム1における同期処理の流れの一例について説明する。
[Flow of Synchronization Processing in First Embodiment]
FIG. 8 is a flowchart illustrating an example of the flow of synchronization processing in the non-shared database system 1 according to the first embodiment. Hereinafter, an example of the flow of the synchronization process in the non-shared database system 1 according to the first embodiment will be described with reference to FIG.

まず、同期装置100は、オペレータ端末700が送信する同期要求を受信する(ステップS101)。同期要求は、同期の対象となるデータベースサーバを特定する。たとえば、同期要求は、新規に追加するデータベースサーバのアドレスを含む。また、同期要求は、同期元となるデータベースサーバのアドレスも含んでもよい。   First, the synchronization device 100 receives a synchronization request transmitted from the operator terminal 700 (step S101). The synchronization request specifies a database server to be synchronized. For example, the synchronization request includes the address of a newly added database server. The synchronization request may also include the address of the database server that is the synchronization source.

同期要求を受信した同期装置100の受信部121は、同期制御部124に同期要求の受信を通知する。これを受けて、同期制御部124は、同期元となるデータベースサーバを選択する。または、同期制御部124は、同期要求において指定されたデータベースサーバを同期元として特定する。そして、同期制御部124は、当該データベースサーバに対して、ログ記憶部211を初期化するよう指示する(ステップS102)。   The receiving unit 121 of the synchronization device 100 that has received the synchronization request notifies the synchronization control unit 124 of the reception of the synchronization request. In response to this, the synchronization control unit 124 selects a database server as a synchronization source. Alternatively, the synchronization control unit 124 identifies the database server specified in the synchronization request as the synchronization source. Then, the synchronization control unit 124 instructs the database server to initialize the log storage unit 211 (step S102).

次に、同期制御部124は、同期状態記憶部112の「状態:同期」にフラグを立てる(ステップS103)。そして、同期制御部124は、同期元データベースサーバにデータコピーの作成とログの作成開始を指示する(ステップS104)。また、同期制御部124は、作成したデータコピーとログを同期先データベースサーバに送信するよう同期元データベースサーバに指示する(ステップS104)。   Next, the synchronization control unit 124 sets a flag for “state: synchronization” in the synchronization state storage unit 112 (step S103). Then, the synchronization control unit 124 instructs the synchronization source database server to create a data copy and start creating a log (step S104). In addition, the synchronization control unit 124 instructs the synchronization source database server to transmit the created data copy and log to the synchronization destination database server (step S104).

そして、同期制御部124は、同期元データベースサーバに対してデータコピーを同期先データベースサーバに転送させる(ステップS105)。同期元データベースサーバは作成したデータコピーをデータコピー記憶部212から読み出して、同期先データベースサーバへ転送する。なお、データコピーおよびログの作成と送信についての指示は必ずしも別個に出す必要はなく、一つの命令が作成および送信の指示を兼ねてよいし、別個に出してもよい。   Then, the synchronization control unit 124 causes the synchronization source database server to transfer the data copy to the synchronization destination database server (step S105). The synchronization source database server reads the created data copy from the data copy storage unit 212 and transfers it to the synchronization destination database server. It is not always necessary to separately issue instructions for data copy and log creation and transmission, and one instruction may also serve as an instruction for creation and transmission, or may be issued separately.

データコピーの転送中も、同期元データベースサーバから同期先データベースサーバへのログの送信は継続する。そして、データコピーの転送が完了すると、同期制御部124は、同期先データベースサーバにインスタンスを起動するよう指示する(ステップS106)。指示に応じて、同期先データベースサーバはインスタンスを起動し、データベースにログを反映させる。   Even during the transfer of the data copy, the log transmission from the synchronization source database server to the synchronization destination database server continues. When the transfer of the data copy is completed, the synchronization control unit 124 instructs the synchronization destination database server to start the instance (step S106). In response to the instruction, the synchronization destination database server starts an instance and reflects the log in the database.

インスタンス起動から所定の期間が経過すると、同期制御部124は、同期元データベースサーバと同期先データベースサーバとの同期状態が所定の程度に達したか否かを判定する(ステップS107)。同期状態が所定の程度に達していないと判定した場合(ステップS107、否定)、同期制御部124はさらに所定の期間待機して、再び、同期状態が所定の程度に達したか否かを判定する。同期状態が所定の程度に達したと判定した場合(ステップS107、肯定)、同期制御部124は、同期状態記憶部112の「状態:保留(同期)」にフラグを立てる(ステップS108)。   When a predetermined period has elapsed since the instance activation, the synchronization control unit 124 determines whether or not the synchronization state between the synchronization source database server and the synchronization destination database server has reached a predetermined level (step S107). When it is determined that the synchronization state has not reached the predetermined level (No at Step S107), the synchronization control unit 124 further waits for a predetermined period and determines again whether the synchronization state has reached the predetermined level. To do. When it is determined that the synchronization state has reached a predetermined level (Yes at Step S107), the synchronization control unit 124 sets a flag for “state: hold (synchronization)” in the synchronization state storage unit 112 (Step S108).

同期状態記憶部112が「保留(同期)」状態になると、同期装置100は、新たにクライアント400−1,400−2から更新要求が送信された場合、更新要求を実行することなく保留して記憶部110に格納する。   When the synchronization state storage unit 112 enters the “hold (synchronization)” state, the synchronization apparatus 100 holds the update request without executing the update request when a new update request is transmitted from the clients 400-1 and 400-2. Store in the storage unit 110.

そして、同期制御部124は、同期元データベースサーバにおいて実行中のトランザクションが存在するか否かを判定する(ステップS109)。同期元データベースサーバにおいて実行中のトランザクションがあると判定した場合(ステップS109、肯定)、同期制御部124は所定の期間待機して、再び、実行中のトランザクションの有無を判定する。他方、同期元データベースサーバにおいて実行中のトランザクションはないと判定した場合(ステップS109、否定)、同期制御部124は、同期元データベースサーバから同期先データベースサーバへのログの転送が完了したか否かを判定する(ステップS110)。転送が完了していないと判定した場合(ステップS110、否定)、同期制御部124は、所定の期間待機して再び転送が完了したか否かを判定する。転送が完了したと判定した場合(ステップS110、肯定)、同期制御部124は、同期先データベースサーバを同期元データベースサーバから切り離す(ステップS111)。   Then, the synchronization control unit 124 determines whether there is a transaction being executed in the synchronization source database server (step S109). If it is determined that there is a transaction being executed in the synchronization source database server (Yes at step S109), the synchronization control unit 124 waits for a predetermined period and determines again whether there is a transaction being executed. On the other hand, when it is determined that there is no transaction being executed in the synchronization source database server (No in step S109), the synchronization control unit 124 determines whether or not the transfer of the log from the synchronization source database server to the synchronization destination database server is completed. Is determined (step S110). When it is determined that the transfer is not completed (No at Step S110), the synchronization control unit 124 waits for a predetermined period and determines whether the transfer is completed again. When it is determined that the transfer is completed (Yes at Step S110), the synchronization control unit 124 disconnects the synchronization destination database server from the synchronization source database server (Step S111).

そして、同期制御部124は、同期先データベースサーバにおいて、記憶領域の更新処理すなわちログのデータベースへの反映処理が完了したか否かを判定する(ステップS112)。反映処理が完了していないと判定した場合(ステップS112、否定)、同期制御部124はさらに所定の期間待機した後、再び反映処理が完了したか否かを判定する。他方、反映処理が完了したと判定した場合(ステップS112、肯定)、同期制御部124は、同期先データベースサーバを管理テーブル111に登録する(ステップS113)。たとえば、同期制御部124は、図4に示す管理テーブルの空欄部分に、同期先データベースを一意に特定するデータベースIDと、その役割と、状態とを格納する。   Then, the synchronization control unit 124 determines whether or not the update process of the storage area, that is, the process of reflecting the log in the database is completed in the synchronization destination database server (step S112). If it is determined that the reflection process has not been completed (No at Step S112), the synchronization control unit 124 further waits for a predetermined period, and then determines again whether the reflection process has been completed. On the other hand, when it is determined that the reflection process is completed (Yes at Step S112), the synchronization control unit 124 registers the synchronization destination database server in the management table 111 (Step S113). For example, the synchronization control unit 124 stores a database ID that uniquely identifies the synchronization destination database, its role, and state in the blank portion of the management table shown in FIG.

その後、同期制御部124は、同期状態記憶部112の状態を「保留(同期)」から「通常」に移行させる(ステップS114)。すなわち、同期制御部124は、「状態:通常」にフラグを立てる。同期状態記憶部112の「状態:通常」にフラグが立てられると、同期元データベースサーバは、ログの作成と送信を終了する。また、同期装置100は、保留して記憶部110に格納していた更新要求の処理を再開する。これによって、同期処理が終了する。   Thereafter, the synchronization control unit 124 shifts the state of the synchronization state storage unit 112 from “hold (synchronization)” to “normal” (step S114). That is, the synchronization control unit 124 sets a flag “status: normal”. When the “status: normal” flag is set in the synchronization status storage unit 112, the synchronization source database server ends the creation and transmission of the log. In addition, the synchronization device 100 resumes the processing of the update request that has been suspended and stored in the storage unit 110. This completes the synchronization process.

[第1の実施の形態の効果]
上記の通り、第1の実施の形態に係る無共有型データベースシステム1は、ネットワークを介してクライアントに接続される同期装置と、当該同期装置と接続され、各々所定の記憶領域を占有する複数のデータベースサーバとを備える無共有型データベースシステムである。同期装置は、同期を実行する場合、同期元データベースサーバに同期命令、すなわち、データコピーとログの作成および送信を指示する命令を送信し、同期が完了したと判定した場合、同期元データベースサーバに同期完了命令、すなわち、ログの作成の終了を指示する命令を送信して、同期を制御する。同期元データベースサーバは、同期命令を受信した場合、同期元データベースサーバが占有する記憶領域のコピーを作成するとともに、処理するトランザクションのログの作成を開始する。そして、同期元データベースサーバは、作成したコピーとログとを同期先データベースサーバへ送信する。同期元データベースサーバはまた、同期装置から同期完了命令を受信した場合、ログの作成を終了する。同期先データベースサーバは、同期元データベースサーバからコピーとログとを受信して、記憶領域の更新処理を実行する。このように、第1の実施の形態に係る無共有型データベースシステムは、データベースサーバにおいて作成されるログを利用して、新規データベースサーバの同期等の構成変更処理を実行するため、構成変更処理時のオーバヘッドを抑制することができる。
[Effect of the first embodiment]
As described above, the non-shared database system 1 according to the first embodiment includes a synchronization device that is connected to a client via a network, and a plurality of devices that are connected to the synchronization device and occupy a predetermined storage area. A non-shared database system including a database server. When performing synchronization, the synchronization device transmits a synchronization command to the synchronization source database server, that is, a command for instructing creation and transmission of data copy and log. A synchronization completion command, that is, a command for instructing the end of log creation is transmitted to control synchronization. When receiving the synchronization command, the synchronization source database server creates a copy of the storage area occupied by the synchronization source database server and starts creating a log of the transaction to be processed. Then, the synchronization source database server transmits the created copy and log to the synchronization destination database server. When the synchronization source database server receives a synchronization completion command from the synchronization device, the synchronization source database server ends the creation of the log. The synchronization destination database server receives a copy and a log from the synchronization source database server, and executes a storage area update process. As described above, the non-shared database system according to the first embodiment uses the log created in the database server to execute the configuration change process such as synchronization of the new database server. Can be suppressed.

すなわち、第1の実施の形態に係る無共有型データベースシステム1は、通常データ処理の間は、各データベースサーバ200A〜200Cにおいて処理したトランザクションのログを作成せず、同期装置100からログ作成開始の指示が送信された場合のみ、ログを作成する。このため、ログの作成とハードディスクへの格納のために要される時間や処理が不要となり、処理効率を向上させることができる。   That is, the non-shared database system 1 according to the first embodiment does not create a log of transactions processed in each of the database servers 200A to 200C during normal data processing, and starts log creation from the synchronization device 100. Create a log only when an instruction is sent. This eliminates the time and processing required for creating a log and storing it in the hard disk, thereby improving the processing efficiency.

また、上記のように第1の実施の形態に係る無共有型データベースシステム1は、無共有型のシステム構成を採用しているため、共有ディスクを使用してシステムを構築する場合のように、高価な共有ディスクを必要とせず、通常のコンピュータをクラスタ化して構築することができる。このため、コスト低減することができる。また、複数のデータベースサーバが一つのストレージを共有しないため、ストレージが障害点となった不具合の発生を回避することができる。   In addition, as described above, the non-shared database system 1 according to the first embodiment adopts a non-shared system configuration, so that when a system is constructed using a shared disk, A common computer can be clustered and constructed without requiring an expensive shared disk. For this reason, cost can be reduced. In addition, since a plurality of database servers do not share one storage, it is possible to avoid the occurrence of a problem that caused the storage to become a failure point.

また、上記のように第1の実施の形態に係る無共有型データベースシステム1においては、同期元データベースサーバは、同期命令を受信した場合にログの作成を開始し、同期完了命令を受信した場合にログの作成を終了するため、常時ログを作成する場合と比較して、ハードディスクへのアクセスが減じられ、処理速度を向上させることができる。   In the non-shared database system 1 according to the first embodiment as described above, the synchronization source database server starts creating a log when receiving a synchronization command and receives a synchronization completion command. Since the creation of the log is completed, the access to the hard disk is reduced and the processing speed can be improved as compared with the case where the log is always created.

また、第1の実施の形態に係る無共有型データベースシステム1において、同期装置は、同期元データベースサーバと同期先データベースサーバとの同期の状態が所定の程度に達したと判定したときから、同期完了命令を送信するまでの間、クライアントからの更新要求を実行せずに保留する。このため、同期元データベースサーバと同期先データベースサーバとの間の同期を保障しつつ、クライアントからの要求の処理の遅延を最小限に抑えることができる。   In the non-shared database system 1 according to the first embodiment, the synchronization apparatus determines that the synchronization state between the synchronization source database server and the synchronization destination database server has reached a predetermined level, Until the completion command is transmitted, the update request from the client is not executed and is suspended. Therefore, it is possible to minimize the delay in processing the request from the client while ensuring the synchronization between the synchronization source database server and the synchronization destination database server.

また、第1の実施の形態に係る無共有型データベースシステム1において、同期元データベースサーバは、作成したログをキャッシュファイルに格納する。すなわち、同期元データベースサーバは、作成したログを逐次ハードディスクに格納しない。このため、相対的に速度が遅いハードディスクへのアクセスを行う必要がなく、ログの作成や格納にかかるオーバヘッドを削減することができる。また、ログの転送はメモリ間コピーとなるため、オーバヘッドが小さい。このため、無共有型データベースシステムにおける処理効率を向上させることができる。   In the non-shared database system 1 according to the first embodiment, the synchronization source database server stores the created log in a cache file. That is, the synchronization source database server does not sequentially store the created logs on the hard disk. For this reason, it is not necessary to access a hard disk having a relatively low speed, and the overhead for creating and storing the log can be reduced. Further, since the log transfer is an inter-memory copy, the overhead is small. For this reason, the processing efficiency in the non-shared database system can be improved.

また、第1の実施の形態に係る無共有型データベースシステム1において、同期制御部は、運用系の同期元データベースサーバと、待機系の同期先データベースサーバとの同期を実行することにより同期先データベースサーバを運用系に切り替える。また、同期制御部は、運用系の同期元データベースサーバと、運用系の同期先データベースサーバとの同期を実行することにより、同期先データベースサーバの記憶領域の更新を実行する。このため、第1の実施の形態に係る無共有型データベースシステムは、新規データベースサーバの追加や運用系データベースサーバの記憶領域の更新を行う場合に、全てのデータベースを同期させることができる。   In the non-shared database system 1 according to the first embodiment, the synchronization control unit synchronizes the active synchronization source database server with the standby synchronization destination database server, thereby synchronizing the synchronization destination database. Switch the server to the active system. In addition, the synchronization control unit updates the storage area of the synchronization destination database server by performing synchronization between the active synchronization source database server and the active synchronization destination database server. Therefore, the non-shared database system according to the first embodiment can synchronize all the databases when adding a new database server or updating the storage area of the active database server.

また、同期完了後は、同期元データベースサーバと同期先データベースサーバとが同期しているため、同期先データベースサーバは最初からウォーム状態で動作することになり、同期後の性能低下を防止することができる。   In addition, after the synchronization is completed, the synchronization source database server and the synchronization destination database server are synchronized, so the synchronization destination database server will operate in a warm state from the beginning, and performance degradation after synchronization may be prevented. it can.

なお、本実施の形態においては、構成変更処理の一例として、新規データベースサーバを追加する場合と、現用系データベースサーバが故障して記憶領域の更新処理を行う場合について説明した。しかし、これに限られず、本発明は、データベースシステムにおいて異なるデータベースサーバ間で同期を取る様々な場合に適用できる。   In the present embodiment, as an example of the configuration change process, a case where a new database server is added and a case where the active database server fails and the storage area is updated are described. However, the present invention is not limited to this, and the present invention can be applied to various cases where synchronization is performed between different database servers in a database system.

(第1の実施の形態の変形例)
上述した第1の実施の形態は、同期元データベースサーバがデータコピーを作成した上で、作成したデータコピーを同期先データベースサーバに送信するように構成した。しかし、同期元データベースサーバがデータコピーを作成せず、ファイルレベルでデータを同期先データベースサーバにコピーするように構成することもできる。以下、第1の実施の形態の変形例として、同期元データベースサーバがデータコピーを作成しない場合を説明する。変形例においては、第1の実施の形態と共通する部分については詳細な説明は省略し、第1の実施の形態と相違する部分のみ説明する。
(Modification of the first embodiment)
The first embodiment described above is configured such that after the synchronization source database server creates a data copy, the created data copy is transmitted to the synchronization destination database server. However, the synchronization source database server can also be configured to copy data to the synchronization destination database server at the file level without creating a data copy. Hereinafter, as a modification of the first embodiment, a case where the synchronization source database server does not create a data copy will be described. In the modified example, detailed description of portions common to the first embodiment is omitted, and only portions different from the first embodiment are described.

[変形例に係る無共有型データベースシステムの構成]
図9は、変形例に係る無共有型データベースシステム1Aの構成の一例を示す図である。第1の実施の形態と同様、無共有型データベースシステム1Aにおいては、同期装置100Aと複数のデータベースサーバ250A,250B,250Cがネットワーク600Aを介して接続される。さらに、データベースサーバ250A,250B,250Cはそれぞれデータベース350A,350B,350Cと接続される。同期装置100Aはまた、ネットワーク500Aを介してクライアント400A,400Bおよびオペレータ端末700Aに接続される。
[Configuration of non-shared database system according to modification]
FIG. 9 is a diagram illustrating an example of a configuration of a non-shared database system 1A according to a modification. As in the first embodiment, in the non-shared database system 1A, the synchronization device 100A and a plurality of database servers 250A, 250B, 250C are connected via a network 600A. Furthermore, the database servers 250A, 250B, and 250C are connected to the databases 350A, 350B, and 350C, respectively. The synchronization device 100A is also connected to the clients 400A and 400B and the operator terminal 700A via the network 500A.

[変形例に係る同期装置の構成]
図9に示すように、変形例に係る同期装置100Aの構成は、図3に示す実施の形態1の同期装置100の構成と同様である。同期装置100Aは、記憶部110Aと制御部120Aとを備え、記憶部110Aは、管理テーブル111Aおよび同期状態記憶部112Aを備える。また、制御部120Aは、受信部121A、送信部122A、同期維持部123A、同期制御部124Aを備える。これら各部の機能は、実施の形態1と同様である。
[Configuration of Synchronization Device According to Modification]
As shown in FIG. 9, the configuration of synchronization apparatus 100A according to the modification is the same as the configuration of synchronization apparatus 100 of the first embodiment shown in FIG. The synchronization device 100A includes a storage unit 110A and a control unit 120A, and the storage unit 110A includes a management table 111A and a synchronization state storage unit 112A. The control unit 120A includes a reception unit 121A, a transmission unit 122A, a synchronization maintaining unit 123A, and a synchronization control unit 124A. The functions of these units are the same as those in the first embodiment.

[変形例に係るデータベースサーバの構成]
変形例においては、図9に示すように、データベースサーバ250Aの構成は、第1の実施の形態に係るデータベースサーバ200Aの構成と異なる。データベースサーバ250Aは、記憶部210Aと制御部220Aとを備える。記憶部210Aはログ記憶部211Aを備える。また、制御部220Aはトランザクション処理部221A、ログ受信部222A、ログ送信部223Aおよび更新実行部224Aを備える。すなわち、第1の実施の形態のデータベースサーバ200Aと異なり、変形例のデータベースサーバ250Aは、記憶部210A内にデータコピー記憶部212を有しない。また、データベースサーバ250Aのトランザクション処理部221Aは、たとえば新規データベースサーバを追加する指示を同期装置100Aから受信した場合、データコピーを作成して一時的に格納するのではなく、rsyncを利用したりCPコマンド等の命令を利用することで、ファイルレベルでのコピーを実行する。これら以外の点では、変形例のデータベースサーバ250Aの各部の動作および機能は、第1の実施の形態に係るデータベースサーバ200Aの各部の動作および機能と同様である。
[Configuration of database server according to modification]
In the modification, as shown in FIG. 9, the configuration of the database server 250A is different from the configuration of the database server 200A according to the first embodiment. The database server 250A includes a storage unit 210A and a control unit 220A. The storage unit 210A includes a log storage unit 211A. The control unit 220A includes a transaction processing unit 221A, a log reception unit 222A, a log transmission unit 223A, and an update execution unit 224A. That is, unlike the database server 200A of the first embodiment, the database server 250A of the modified example does not have the data copy storage unit 212 in the storage unit 210A. Further, for example, when the transaction processing unit 221A of the database server 250A receives an instruction to add a new database server from the synchronization device 100A, the transaction processing unit 221A uses rsync instead of creating a data copy and temporarily storing it. Copying at the file level is executed by using an instruction such as a command. Except for these points, the operation and function of each part of the database server 250A according to the modification are the same as the operation and function of each part of the database server 200A according to the first embodiment.

[変形例に係る無共有型データベースシステムの動作]
図10は、変形例に係る無共有型データベースシステムの動作の一例を示すシーケンスチャートである。図10を参照して、無共有型データベースシステム1Aの動作の一例を説明する。ここでは、同期元データベースサーバとしてデータベースサーバ250Aが指定され、同期先データベースサーバとしてデータベースサーバ250Bが指定され、データベースサーバ250Bを新規にシステムに追加する場合を想定する。
[Operation of non-shared database system according to modification]
FIG. 10 is a sequence chart showing an example of the operation of the non-shared database system according to the modification. An example of the operation of the non-shared database system 1A will be described with reference to FIG. Here, it is assumed that the database server 250A is designated as the synchronization source database server, the database server 250B is designated as the synchronization destination database server, and the database server 250B is newly added to the system.

まず、オペレータ端末700Aから同期装置100Aに対して、追加要求を送信する(図10の(1))。同期装置100Aは、同期状態記憶部112Aを「状態:同期」とする(図10の(2))。そして同期装置100Aは、データベースサーバ250Aにログ作成の開始を指示する(図10の(3))。データベースサーバ250Aは、ログの作成を開始する。   First, an addition request is transmitted from the operator terminal 700A to the synchronization device 100A ((1) in FIG. 10). The synchronization device 100A sets the synchronization state storage unit 112A to “state: synchronization” ((2) in FIG. 10). Then, the synchronization device 100A instructs the database server 250A to start log creation ((3) in FIG. 10). The database server 250A starts creating a log.

次に、同期装置100Aは、データベースサーバ250Aにコピー開始を指示する(図10の(4))。データベースサーバ250Aは、コピー開始指示に応じて、データベースサーバ250Bへのコピーを開始する(図10の(5))。ここで、コピーは例えば、rsync等のソフトウェアやCPコマンド等の命令を利用して実現することができる。コピーが完了すると、データベースサーバ250Bからデータベースサーバ250Aにコピー完了応答が送信される(図10の(6))。データベースサーバ250Aは、コピー完了応答を同期装置100Aに送信する(図10の(7))。なお、図10では便宜上、コピー完了応答をログ送信より前の処理として記載しているが、データコピーが完了する前にログ送信を実行してもよい。   Next, the synchronization device 100A instructs the database server 250A to start copying ((4) in FIG. 10). In response to the copy start instruction, the database server 250A starts copying to the database server 250B ((5) in FIG. 10). Here, for example, copying can be realized by using software such as rsync or an instruction such as a CP command. When copying is completed, a copy completion response is transmitted from the database server 250B to the database server 250A ((6) in FIG. 10). The database server 250A transmits a copy completion response to the synchronization device 100A ((7) in FIG. 10). In FIG. 10, for the sake of convenience, the copy completion response is described as processing prior to log transmission, but log transmission may be executed before data copying is completed.

データベースサーバ250Aは、コピー中にデータの更新が発生した場合はログをログ記憶部211Aに格納する。そして、例えば所定期間が経過するごとにログ記憶部211Aに新しいログが記憶されているか否かを検出する。新しいログが記憶されていることを検出した場合、データベースサーバ250Aは、検出したログをデータベースサーバ250Bに送信する(図10の(8))。データベースサーバ250Bでは受信したログを格納し、データベースサーバ250Bにログ反映完了応答を返す(図10の(9))。さらに、データベースサーバ250Bは、ログ反映完了応答をデータベースサーバ250Aに送信する(図10の(10))。その後の処理は、図6に示す(10)〜(21)と同様である。   The database server 250A stores a log in the log storage unit 211A when data update occurs during copying. Then, for example, every time a predetermined period elapses, it is detected whether a new log is stored in the log storage unit 211A. When it is detected that a new log is stored, the database server 250A transmits the detected log to the database server 250B ((8) in FIG. 10). The database server 250B stores the received log and returns a log reflection completion response to the database server 250B ((9) in FIG. 10). Furthermore, the database server 250B transmits a log reflection completion response to the database server 250A ((10) in FIG. 10). The subsequent processing is the same as (10) to (21) shown in FIG.

[変形例の効果]
上記の通り、変形例に係る無共有型データベースシステムでは、同期処理において、同期元データベースサーバがデータのコピーを作成するのではなく、同期先データベースサーバにファイルレベルでコピーを実行する。また、コピーを開始する前に、同期装置が同期元データベースサーバにログの作成を指示し、コピー中に発生した処理のログを記憶させる。このため、同期先データベースサーバにおいてデータコピー作成のための記憶領域を準備する必要がなく、容易にコピーを実行し、コピー中に発生したデータの更新はログによって反映させることができる。このため、同期処理の実行による無共有型データベースシステムの性能低下を抑制することができる。この他、変形例も第1の実施の形態と同様の効果を奏することができる。
[Effect of modification]
As described above, in the non-shared database system according to the modification, in the synchronization process, the synchronization source database server does not create a copy of the data, but performs a copy at the file level to the synchronization destination database server. Also, before starting the copy, the synchronization device instructs the synchronization source database server to create a log, and stores a log of the processing that occurred during the copy. For this reason, it is not necessary to prepare a storage area for creating a data copy in the synchronization destination database server, and copying can be easily executed, and data updates occurring during copying can be reflected in the log. For this reason, it is possible to suppress the performance degradation of the non-shared database system due to the execution of the synchronization process. In addition, the modified example can achieve the same effects as those of the first embodiment.

(第2の実施の形態)
本発明に係る無共有型データベースシステム、その同期方法、同期装置、データベースサーバおよび同期プログラムは、インタークラウドシステムに適用することができる。そこで、第2の実施の形態として、インタークラウドシステムにおける本発明の適用例を説明する。
(Second Embodiment)
The non-shared database system, the synchronization method thereof, the synchronization device, the database server, and the synchronization program according to the present invention can be applied to an intercloud system. Therefore, an application example of the present invention in an intercloud system will be described as a second embodiment.

図11は、第2の実施の形態に係るインタークラウドシステム2の構成の一例を示す図である。図11に示すように、インタークラウドシステム2は、クラウドサービスプロバイダ(CSP:Cloud Service Provider)オペレータ端末1000と、インタークラウドサーバ(ICS:Inter-Cloud Server)2000と、データセンタDC1,DC2と、クライアント4000−1,4000−2,4000−3と、を備える。CSPオペレータ端末1000は、インタークラウドサーバ2000と接続される。また、インタークラウドサーバ2000は、データセンタDC1,DC2と、ネットワーク3000−1を介して接続される。また、インタークラウドサーバ2000は、クライアント4000−1,4000−2,4000−3と、ネットワーク3000−1を介して接続される。また、データセンタDC1,DC2は、ネットワーク3000−2を介してクライアント4000−1,4000−2,4000−3と接続される。なお、図11には二つのデータセンタと、三つのクライアントを示しているが、データセンタおよびクライアントの数は図示する数に限定されない。   FIG. 11 is a diagram illustrating an example of a configuration of the intercloud system 2 according to the second embodiment. As shown in FIG. 11, the inter-cloud system 2 includes a cloud service provider (CSP) operator terminal 1000, an inter-cloud server (ICS) 2000, data centers DC1 and DC2, and a client. 4000-1, 4000-2, 4000-3. The CSP operator terminal 1000 is connected to the intercloud server 2000. The intercloud server 2000 is connected to the data centers DC1 and DC2 via the network 3000-1. In addition, the intercloud server 2000 is connected to the clients 4000-1, 4000-2, 4000-3 via the network 3000-1. Data centers DC1 and DC2 are connected to clients 4000-1, 4000-2, and 4000-3 via network 3000-2. Although FIG. 11 shows two data centers and three clients, the numbers of data centers and clients are not limited to the numbers shown.

第2の実施の形態に係るインタークラウドサーバ2000は、データセンタDC1,DC2のリソースを用いて、仮想マシン(VM:Virtual Machine)を構築し、構築した仮想マシンを用いたサービスを、クライアント4000−1,4000−2,4000−3に対して提供する。データセンタDC1,DC2内には、サーバや、データベース等が適宜構築され、また再構築される。インタークラウドサーバ2000は、データセンタDC1,DC2等のリソースを管理するため、管理情報データベース(DB)2100と、制約条件データベース(DB)2200を備える。管理情報データベース2100には、管理対象であるリソースやデータセンタオペレーションシステム(DC−OPS)等の情報を格納する。また、制約条件データベース2200には、各クライアント4000−1,4000−2,4000−3について定められた制約条件等を格納する。たとえば、クライアント4000−1が利用するリソースの性能要件等を格納する。   The intercloud server 2000 according to the second embodiment constructs a virtual machine (VM) using the resources of the data centers DC1 and DC2, and provides a service using the constructed virtual machine to the client 4000- Provided for 1,4000-2,4000-3. In the data centers DC1 and DC2, servers, databases, and the like are appropriately constructed and reconstructed. The intercloud server 2000 includes a management information database (DB) 2100 and a constraint condition database (DB) 2200 for managing resources such as the data centers DC1 and DC2. The management information database 2100 stores information such as resources to be managed and data center operation system (DC-OPS). Further, the constraint condition database 2200 stores constraint conditions and the like determined for each of the clients 4000-1, 4000-2, 4000-3. For example, the performance requirements of resources used by the client 4000-1 are stored.

第2の実施の形態に係るインタークラウドサーバ2000は、データセンタDC1,DC2を用いて、無共有型データベースシステムを構築する。つまり、データセンタDC1内のコンピュータ上にデータベースサーバが仮想的に構築され、コンピュータのローカルディスクが、データベースサーバが占有するデータベースとして機能する。また、仮想的に構築されたデータベースサーバ各々は他のデータベースサーバと記憶領域を共有しない、無共有型(Shared-nothing)の構成である。   The intercloud server 2000 according to the second embodiment constructs a non-shared database system using the data centers DC1 and DC2. That is, a database server is virtually constructed on a computer in the data center DC1, and a local disk of the computer functions as a database occupied by the database server. Each database server constructed virtually has a shared-nothing configuration that does not share a storage area with other database servers.

インタークラウドサーバ2000は、各種のハードウェアを有し、OSやミドルウェアなどの各種プログラムが予めインストールされる。具体的には、インタークラウドサーバ2000は、詳細については後述するように、インタークラウドサーバ2000が有する各種のハードウェアにより実行されるプログラムとして、ICSソフトウェア2001を実行する。   The intercloud server 2000 has various hardware, and various programs such as an OS and middleware are installed in advance. Specifically, the intercloud server 2000 executes the ICS software 2001 as a program executed by various hardware included in the intercloud server 2000, as will be described in detail later.

なお、ICSソフトウェア2001は、第1の実施の形態における同期装置100の制御部120の各部およびデータベースサーバ200Aの制御部220の各部により実行される処理を実行する。   The ICS software 2001 executes processing executed by each unit of the control unit 120 of the synchronization device 100 and each unit of the control unit 220 of the database server 200A according to the first embodiment.

[第2の実施の形態に係るインタークラウドサーバ2000の処理]
インタークラウドサーバ2000は、CSPオペレータ端末1000から送信される、システム構成を変更する指示や、リソースの割当を変更する指示等を受信する。また、インタークラウドサーバ2000は、CSPオペレータ端末1000から、データセンタDC1,DC2に構築されたデータベースサーバの構成の変更、たとえば新規データベースサーバの追加の指示や、故障したデータベースサーバの記憶領域の更新の指示等を受信する。インタークラウドサーバ2000は、ICSソフトウェア2001を実行することで、新規データベースサーバの追加の処理や故障データベースサーバの記憶領域の更新処理を実行する。
[Process of inter-cloud server 2000 according to the second embodiment]
The intercloud server 2000 receives an instruction to change the system configuration, an instruction to change resource allocation, and the like transmitted from the CSP operator terminal 1000. In addition, the intercloud server 2000 changes the configuration of the database server constructed in the data centers DC1 and DC2 from the CSP operator terminal 1000, for example, an instruction to add a new database server or update the storage area of the failed database server. Receive instructions. The intercloud server 2000 executes the ICS software 2001, thereby executing a process for adding a new database server and a process for updating a storage area of a failure database server.

たとえば、データセンタDC1内のデータベースサーバに故障が生じた場合、データセンタDC2内のデータベースサーバが占有するデータベースのデータコピーを作成する。そして、その後、データセンタDC2内のデータベースサーバに対してクライアント4000−1〜4000−3の要求に応じて実行されたトランザクションのログを作成する。作成したデータコピーとログとを、故障したデータセンタDC1内のデータベースサーバに送信する。故障したデータベースサーバは送信されるデータコピーとログとを用いて記憶領域の更新処理を行う。   For example, when a failure occurs in the database server in the data center DC1, a data copy of the database occupied by the database server in the data center DC2 is created. Then, a log of transactions executed in response to requests from the clients 4000-1 to 4000-3 is created for the database server in the data center DC2. The created data copy and log are transmitted to the database server in the failed data center DC1. The failed database server performs storage area update processing using the transmitted data copy and log.

このとき、データセンタDC2内のデータベースサーバ(同期元データベースサーバ)は、データコピーを作成して送信した後、ログの作成と送信を継続する。そして、インタークラウドサーバ2000は、二つのデータベースサーバ間の同期状態が所定の程度に達したか否かを判定して、所定の程度になったと判定すれば、その後、クライアント4000−1〜4000−3からの要求のうち、データベースの内容の更新を伴う要求を実行せずに保留する。そして、実行中のトランザクションがなくなれば、再び同期状態を判定し、ログの転送が完了したと判定すれば、同期先データベースサーバと同期元データベースサーバとを切り離して、同期元のデータベースサーバによるログの作成を終了させる。   At this time, the database server (synchronization source database server) in the data center DC2 creates and transmits the data copy, and then continues to create and transmit the log. Then, the intercloud server 2000 determines whether or not the synchronization state between the two database servers has reached a predetermined level. If the intercloud server 2000 determines that the level has reached the predetermined level, then the client 4000-1 to 4000- Among the requests from 3, the request with the update of the contents of the database is not executed and is suspended. When there is no transaction in progress, the synchronization state is determined again. If it is determined that the log transfer is completed, the synchronization destination database server is separated from the synchronization source database server, and the log of the synchronization source database server is logged. Finish creation.

インタークラウドサーバ2000は、新規データベースサーバを追加する場合も同様に処理を実行する。   The intercloud server 2000 performs the same process when adding a new database server.

[第2の実施の形態の効果]
上記のように、インタークラウドシステムにおいて第1の実施の形態に係る同期方法を実装することで、仮想技術を利用して柔軟にリソース構成を変更しつつ、クライアントに対してシームレスなサービスを提供することができる。
[Effect of the second embodiment]
As described above, by implementing the synchronization method according to the first embodiment in the intercloud system, a seamless service is provided to clients while flexibly changing the resource configuration using virtual technology. be able to.

(第3の実施の形態)
これまで本発明の実施例について説明したが、本発明は上述した実施例以外にも、その他の実施例にて実施されてもよい。以下に、その他の実施例を説明する。
(Third embodiment)
Although the embodiments of the present invention have been described so far, the present invention may be implemented in other embodiments besides the above-described embodiments. Other embodiments will be described below.

[ログイン機能]
たとえば、インタークラウドサーバは、アクセス時に、パスワードを要求してもよい。すなわち、システムの使用時に許可されたオペレータのみがログインできるように、ログイン時にユーザ名とパスワードとを用いて認証処理を実行してもよい。
[Login function]
For example, the intercloud server may request a password when accessing. That is, the authentication process may be executed using a user name and a password at the time of login so that only an operator who is permitted at the time of using the system can log in.

[システム構成]
また、本実施例において説明した各処理のうち、自動的に行われるものとして説明した処理の全部又は一部を手動的に行うこともでき、あるいは、手動的に行われるものとして説明した処理の全部又は一部を公知の方法で自動的に行うこともできる。この他、上述文書中や図面中に示した処理手順、制御手順、具体的名称、各種のデータやパラメータを含む情報については、特記する場合を除いて任意に変更することができる。
[System configuration]
Also, among the processes described in this embodiment, all or part of the processes described as being performed automatically can be performed manually, or the processes described as being performed manually can be performed. All or a part can be automatically performed by a known method. In addition, the processing procedures, control procedures, specific names, and information including various data and parameters shown in the above-described document and drawings can be arbitrarily changed unless otherwise specified.

また、図示した各装置の各構成要素は機能概念的なものであり、必ずしも物理的に図示の如く構成されていることを要しない。すなわち、各装置の分散・統合の具体的形態は図示のものに限られず、その全部又は一部を、各種の負荷や使用状況などに応じて、任意の単位で機能的又は物理的に分散・統合して構成することができる。たとえば、図1に示す例では、記憶部110を同期装置100の内部に配置したが、記憶部110を同期装置100の外部装置としてネットワーク経由で接続するようにしてもよい。また、図7に示すログ受信部222とログ送信部223は、実際にはまとめて一つの通信部として実装してもよい。また、記憶部110,210はそれぞれ、他の情報も記憶するように構成できる。   Further, each component of each illustrated apparatus is functionally conceptual, and does not necessarily need to be physically configured as illustrated. That is, the specific form of distribution / integration of each device is not limited to the one shown in the figure, and all or a part of the distribution / integration may be functionally or physically distributed in arbitrary units according to various loads or usage conditions. Can be integrated and configured. For example, in the example illustrated in FIG. 1, the storage unit 110 is disposed inside the synchronization device 100, but the storage unit 110 may be connected as an external device of the synchronization device 100 via a network. In addition, the log reception unit 222 and the log transmission unit 223 illustrated in FIG. 7 may actually be implemented as a single communication unit. In addition, each of the storage units 110 and 210 can be configured to store other information.

[プログラム]
図12は、無共有型データベースシステムにおける一連の処理を実行するプログラムである同期プログラムによる情報処理が、コンピュータを用いて具体的に実現されることを示す図である。図12に例示するように、コンピュータ5000は、たとえば、メモリ5010と、CPU(Central Processing Unit)5020と、ハードディスクドライブ5080と、ネットワークインタフェース5070とを有する。コンピュータ5000の各部はバス5100によって接続される。
[program]
FIG. 12 is a diagram illustrating that information processing by a synchronization program that is a program for executing a series of processes in a non-shared database system is specifically realized using a computer. As illustrated in FIG. 12, the computer 5000 includes, for example, a memory 5010, a CPU (Central Processing Unit) 5020, a hard disk drive 5080, and a network interface 5070. Each part of the computer 5000 is connected by a bus 5100.

メモリ5010は、図12に例示するように、ROM5011およびRAM5012を含む。ROM5011は、たとえば、BIOS(Basic Input Output System)等のブートプログラムを記憶する。   The memory 5010 includes a ROM 5011 and a RAM 5012 as illustrated in FIG. The ROM 5011 stores a boot program such as BIOS (Basic Input Output System).

ここで、図12に例示するように、ハードディスクドライブ5080は、たとえば、OS5081、アプリケーションプログラム5082、プログラムモジュール5083、プログラムデータ5084を記憶する。すなわち、開示の技術に係るリソース管理プログラムは、コンピュータによって実行される指令が記述されたプログラムモジュール5083として、たとえばハードディスクドライブ5080に記憶される。たとえば、制御部120および制御部220の各部と同様の情報処理を実行する手順各々が記述されたプログラムモジュール5083が、ハードディスクドライブ5080に記憶される。   Here, as illustrated in FIG. 12, the hard disk drive 5080 stores, for example, an OS 5081, an application program 5082, a program module 5083, and program data 5084. That is, the resource management program according to the disclosed technique is stored in, for example, the hard disk drive 5080 as a program module 5083 in which a command to be executed by a computer is described. For example, the hard disk drive 5080 stores a program module 5083 in which each procedure for executing the same information processing as each unit of the control unit 120 and the control unit 220 is described.

また、記憶部110,210に記憶されるデータのように、リソース管理プログラムによる情報処理に用いられるデータは、プログラムデータ5084として、たとえばハードディスクドライブ5080に記憶される。そして、CPU5020が、ハードディスクドライブ5080に記憶されたプログラムモジュール5083やプログラムデータ5084を必要に応じてRAM5012に読み出し、各種の手順を実行する。   Further, data used for information processing by the resource management program, such as data stored in the storage units 110 and 210, is stored as program data 5084 in, for example, the hard disk drive 5080. The CPU 5020 reads the program module 5083 and program data 5084 stored in the hard disk drive 5080 to the RAM 5012 as necessary, and executes various procedures.

なお、リソース管理プログラムに係るプログラムモジュール5083やプログラムデータ5084は、ハードディスクドライブ5080に記憶される場合に限られない。たとえば、プログラムモジュール5083やプログラムデータ5084は、着脱可能な記憶媒体に記憶されてもよい。この場合、CPU5020は、ディスクドライブなどの着脱可能な記憶媒体を介してデータを読み出す。また、同様に、プログラムモジュール5083やプログラムデータ5084は、ネットワーク(LAN(Local Area Network)、WAN(Wide Area Network)等)を介して接続された他のコンピュータに記憶されてもよい。この場合、CPU5020は、ネットワークインタフェース5070を介して他のコンピュータにアクセスすることで各種データを読み出す。   The program module 5083 and the program data 5084 related to the resource management program are not limited to being stored in the hard disk drive 5080. For example, the program module 5083 and the program data 5084 may be stored in a removable storage medium. In this case, the CPU 5020 reads data via a removable storage medium such as a disk drive. Similarly, the program module 5083 and the program data 5084 may be stored in another computer connected via a network (LAN (Local Area Network), WAN (Wide Area Network), etc.). In this case, the CPU 5020 reads various data by accessing another computer via the network interface 5070.

[その他]
なお、本実施例で説明した同期プログラムは、インターネット等のネットワークを介して配布することができる。また、同期プログラムは、ハードディスク、フレキシブルディスク(FD)、CD−ROM、MO、DVDなどのコンピュータで読取可能な記録媒体に記録され、コンピュータによって記録媒体から読み出されることによって実行することもできる。
[Others]
The synchronization program described in this embodiment can be distributed via a network such as the Internet. The synchronization program can also be executed by being recorded on a computer-readable recording medium such as a hard disk, a flexible disk (FD), a CD-ROM, an MO, and a DVD, and being read from the recording medium by the computer.

1 無共有型データベースシステム
2 インタークラウドシステム
100 同期装置
110 記憶部
111 管理テーブル
112 同期状態記憶部
120 制御部
121 受信部
122 送信部
123 同期維持部
124 同期制御部
200A,200B,200C データベースサーバ(現用系)
200D データベースサーバ(待機系)
210 記憶部
211 ログ記憶部
212 データコピー記憶部
220 制御部
221 トランザクション処理部
222 ログ受信部
223 ログ送信部
224 更新実行部
300A,300B,300C データベース(現用系)
300D データベース(待機系)
400−1,400−2 クライアント
500 ネットワーク
600 ネットワーク
700 オペレータ端末
1000 CSPオペレータ端末
2000 インタークラウドサーバ
2100 管理情報データベース
2200 制約条件データベース
3000−1,3000−2 ネットワーク
4000−1,4000−2,4000−3 クライアント
5000 コンピュータ
DESCRIPTION OF SYMBOLS 1 Unshared database system 2 Intercloud system 100 Synchronizer 110 Storage part 111 Management table 112 Synchronization state storage part 120 Control part 121 Reception part 122 Transmission part 123 Synchronization maintenance part 124 Synchronization control part 200A, 200B, 200C Database server (current use) system)
200D database server (standby system)
210 storage unit 211 log storage unit 212 data copy storage unit 220 control unit 221 transaction processing unit 222 log reception unit 223 log transmission unit 224 update execution unit 300A, 300B, 300C database (current system)
300D database (standby system)
400-1,400-2 Client 500 Network 600 Network 700 Operator terminal 1000 CSP operator terminal 2000 Intercloud server 2100 Management information database 2200 Restriction condition database 3000-1,3000-2 Network 4000-1,4000-2,4000-3 Client 5000 computer

Claims (8)

ネットワークを介してクライアントに接続される同期装置と、当該同期装置と接続され、各々所定の記憶領域を占有する複数のデータベースサーバとを備える無共有型データベースシステムであって、
前記同期装置は、同期を実行する場合、前記複数のデータベースサーバのうち第1のデータベースサーバに同期命令を送信し、当該同期が完了したと判定した場合、前記第1のデータベースサーバに同期完了命令を送信することによって、前記第1のデータベースサーバと、第2のデータベースサーバとの同期を制御する同期制御部を備え、
前記第1のデータベースサーバは、前記同期命令を受信した場合、処理するトランザクションのログの作成を開始した後、当該第1のデータベースサーバが占有する記憶領域を前記第2のデータベースサーバにコピーして、作成した前記ログを前記第2のデータベースサーバへ送信し、前記同期装置から同期完了命令を受信した場合、ログの作成を終了し、
前記第2のデータベースサーバは、前記ログを受信して、記憶領域の更新を実行することを特徴とする無共有型データベースシステム。
A non-shared database system comprising a synchronization device connected to a client via a network, and a plurality of database servers each connected to the synchronization device and occupying a predetermined storage area,
When performing synchronization, the synchronization device transmits a synchronization command to the first database server among the plurality of database servers. When the synchronization device determines that the synchronization is completed, the synchronization device transmits a synchronization completion command to the first database server. A synchronization control unit for controlling the synchronization between the first database server and the second database server by transmitting
When the first database server receives the synchronization command, it starts to create a log of transactions to be processed, and then copies the storage area occupied by the first database server to the second database server. , Sending the created log to the second database server and receiving a synchronization completion command from the synchronization device, ending the creation of the log,
The second database server receives the log and updates a storage area.
前記同期装置は、前記第1のデータベースサーバと前記第2のデータベースサーバとの同期の状態が所定の程度に達したと判定したときから、前記同期完了命令を送信するまでの間、前記クライアントからの更新要求を実行せずに保留することを特徴とする請求項1に記載の無共有型データベースシステム。   From the time when the synchronization device determines that the synchronization state between the first database server and the second database server has reached a predetermined level until the synchronization completion command is transmitted, the synchronization device The non-shared database system according to claim 1, wherein the update request is suspended without being executed. 前記第1のデータベースサーバは、作成したログをキャッシュファイルに格納することを特徴とする請求項1または2に記載の無共有型データベースシステム。   The non-shared database system according to claim 1 or 2, wherein the first database server stores the created log in a cache file. 前記同期制御部は、運用系の前記第1のデータベースサーバと、待機系の前記第2のデータベースサーバとの同期を実行することにより、前記第2のデータベースサーバを運用系に切り替え、または、運用系の前記第1のデータベースサーバと、運用系の前記第2のデータベースサーバとの同期を実行することにより、前記第2のデータベースサーバの記憶領域の更新を実行することを特徴とする請求項1〜3のいずれか1項に記載の無共有型データベースシステム。   The synchronization control unit switches the second database server to the active system by performing synchronization between the first database server in the active system and the second database server in the standby system, or operates 2. The storage area of the second database server is updated by executing synchronization between the first database server in the system and the second database server in the active system. The non-shared database system according to any one of to 3. ネットワークを介してクライアントに接続される同期装置と、当該同期装置と接続され、各々所定の記憶領域を占有する複数のデータベースサーバとを備える無共有型データベースシステムにおいて、前記複数のデータベースサーバのうち第1のデータベースサーバと第2のデータベースサーバとを同期する同期装置であって、
同期を実行する場合、前記第1のデータベースサーバに、処理するトランザクションのログの作成を開始した後、当該第1のデータベースサーバが占有する記憶領域を前記第2のデータベースサーバにコピーして、作成した前記ログを前記第2のデータベースサーバへ送信することを指示する同期命令を送信し、当該同期が完了したと判定した場合、前記第1のデータベースサーバに、ログの作成の終了を指示する同期完了命令を送信することによって、前記第1のデータベースサーバと、第2のデータベースサーバとの同期を制御する同期制御部を備えることを特徴とする同期装置。
In a non-shared database system comprising a synchronization device connected to a client via a network and a plurality of database servers each connected to the synchronization device and occupying a predetermined storage area, the first of the plurality of database servers A synchronization device for synchronizing one database server and a second database server,
When performing synchronization, start creating a log of the transaction to be processed in the first database server, and then copy the storage area occupied by the first database server to the second database server. A synchronization command for instructing to transmit the log to the second database server, and when it is determined that the synchronization is completed, the synchronization for instructing the first database server to end the creation of the log. A synchronization apparatus comprising: a synchronization control unit that controls synchronization between the first database server and the second database server by transmitting a completion command.
所定の記憶領域を占有するデータベースサーバであって、
同期命令の受信に応じて、処理するトランザクションのログの作成を開始した後、前記記憶領域を他のデータベースサーバにコピーして、作成した前記ログを他のデータベースサーバへ送信し、同期完了命令の受信に応じて、ログの作成を終了することを特徴とするデータベースサーバ。
A database server occupying a predetermined storage area,
In response to the reception of the synchronization command, the creation of a transaction log to be processed is started, and then the storage area is copied to another database server, and the created log is transmitted to the other database server. A database server characterized by terminating log creation upon receipt.
ネットワークを介してクライアントに接続される同期装置と、当該同期装置と接続され、各々所定の記憶領域を占有する複数のデータベースサーバとを備える無共有型データベースシステムにおいて実行される同期方法であって、
同期を実行する場合、前記複数のデータベースサーバのうち第1のデータベースサーバに同期命令を送信する工程と、
前記第1のデータベースサーバが前記同期命令を受信した場合、処理するトランザクションのログの作成を開始した後、当該第1のデータベースサーバが占有する記憶領域を前記複数のデータベースサーバのうち第2のデータベースサーバにコピーして、作成した前記ログを前記第2のデータベースサーバへ送信する工程と、
前記第2のデータベースサーバが前記ログを受信して、記憶領域の更新を実行する工程と、
当該同期が完了したと判定した場合、前記第1のデータベースサーバに同期完了命令を送信する工程と、
前記第1のデータベースサーバが前記同期完了命令を受信した場合、前記第1のデータベースサーバが処理するトランザクションのログの作成を終了する工程と、
を含んだことを特徴とする無共有型データベースシステムにおけるデータベースサーバの同期方法。
A synchronization method executed in a non-shared database system including a synchronization device connected to a client via a network, and a plurality of database servers each connected to the synchronization device and occupying a predetermined storage area,
When performing synchronization, a step of transmitting a synchronization command to a first database server among the plurality of database servers;
When the first database server receives the synchronization command, it starts creating a log of the transaction to be processed, and then allocates a storage area occupied by the first database server to the second database among the plurality of database servers. Copying to a server and transmitting the created log to the second database server;
The second database server receiving the log and executing a storage area update;
If it is determined that the synchronization is completed, a step of transmitting a synchronization completion command to the first database server;
When the first database server receives the synchronization completion command, ending the creation of a log of transactions processed by the first database server;
A database server synchronization method in a non-shared database system, comprising:
ネットワークを介してクライアントに接続される同期装置と、当該同期装置と接続され、各々所定の記憶領域を占有する複数のデータベースサーバとを備える無共有型データベースシステムにおいて実行される同期プログラムであって、
同期を実行する場合、前記複数のデータベースサーバのうち第1のデータベースサーバに同期命令を送信する手順と、
前記第1のデータベースサーバが前記同期命令を受信した場合、処理するトランザクションのログの作成を開始した後、当該第1のデータベースサーバが占有する記憶領域を前記複数のデータベースサーバのうち第2のデータベースサーバにコピーして、作成した前記ログを前記第2のデータベースサーバへ送信する手順と、
前記第2のデータベースサーバが前記ログを受信して、記憶領域の更新を実行する手順と、
当該同期が完了したと判定した場合、前記第1のデータベースサーバに同期完了命令を送信する手順と、
前記第1のデータベースサーバが前記同期完了命令を受信した場合、前記第1のデータベースサーバが処理するトランザクションのログの作成を終了する手順と、
をコンピュータに実行させることを特徴とする無共有型データベースシステムにおけるデータベースサーバの同期プログラム。
A synchronization program executed in a non-shared database system including a synchronization device connected to a client via a network and a plurality of database servers each connected to the synchronization device and occupying a predetermined storage area,
When performing synchronization, a procedure for transmitting a synchronization command to a first database server among the plurality of database servers;
When the first database server receives the synchronization command, it starts creating a log of the transaction to be processed, and then allocates a storage area occupied by the first database server to the second database among the plurality of database servers. A procedure of copying to the server and sending the created log to the second database server;
A procedure in which the second database server receives the log and updates a storage area;
If it is determined that the synchronization is completed, a procedure for transmitting a synchronization completion command to the first database server;
When the first database server receives the synchronization completion instruction, a procedure for ending creation of a log of transactions processed by the first database server;
A database server synchronization program in a non-shared database system, characterized in that a computer is executed.
JP2012155767A 2012-07-11 2012-07-11 Unshared type database system, synchronizing device, database server, its synchronizing method, and synchronizing program Pending JP2014016953A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012155767A JP2014016953A (en) 2012-07-11 2012-07-11 Unshared type database system, synchronizing device, database server, its synchronizing method, and synchronizing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012155767A JP2014016953A (en) 2012-07-11 2012-07-11 Unshared type database system, synchronizing device, database server, its synchronizing method, and synchronizing program

Publications (1)

Publication Number Publication Date
JP2014016953A true JP2014016953A (en) 2014-01-30

Family

ID=50111540

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012155767A Pending JP2014016953A (en) 2012-07-11 2012-07-11 Unshared type database system, synchronizing device, database server, its synchronizing method, and synchronizing program

Country Status (1)

Country Link
JP (1) JP2014016953A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015153285A (en) * 2014-02-18 2015-08-24 日本電信電話株式会社 Redundancy database system, database device, and master changing method
CN109828720A (en) * 2019-01-21 2019-05-31 上海达梦数据库有限公司 Date storage method, device, server and storage medium
KR20200144768A (en) * 2019-06-19 2020-12-30 주식회사 코비젼 Synchronizing system for public resources in multi-WEB server environment
CN114553894A (en) * 2022-02-24 2022-05-27 苏州峰之鼎信息科技有限公司 Data synchronization method, device, system and storage medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015153285A (en) * 2014-02-18 2015-08-24 日本電信電話株式会社 Redundancy database system, database device, and master changing method
CN109828720A (en) * 2019-01-21 2019-05-31 上海达梦数据库有限公司 Date storage method, device, server and storage medium
CN109828720B (en) * 2019-01-21 2022-06-03 上海达梦数据库有限公司 Data storage method, device, server and storage medium
KR20200144768A (en) * 2019-06-19 2020-12-30 주식회사 코비젼 Synchronizing system for public resources in multi-WEB server environment
KR102211403B1 (en) 2019-06-19 2021-02-03 주식회사 코비젼 Synchronizing system for public resources in multi-WEB server environment
CN114553894A (en) * 2022-02-24 2022-05-27 苏州峰之鼎信息科技有限公司 Data synchronization method, device, system and storage medium
CN114553894B (en) * 2022-02-24 2024-04-09 苏州峰之鼎信息科技有限公司 Data synchronization method, device, system and storage medium

Similar Documents

Publication Publication Date Title
US11853263B2 (en) Geographically-distributed file system using coordinated namespace replication over a wide area network
AU2019236685B2 (en) Distributed file system using consensus nodes
US9880753B2 (en) Write requests in a distributed storage system
US11647075B2 (en) Commissioning and decommissioning metadata nodes in a running distributed data storage system
JP6084624B2 (en) Split brain tolerant failover in high availability clusters
US11726984B2 (en) Data redistribution method and apparatus, and database cluster
US9846704B2 (en) Distributed file system using consensus nodes
CN109547512B (en) NoSQL-based distributed Session management method and device
WO2016070375A1 (en) Distributed storage replication system and method
US10430217B2 (en) High availability using dynamic quorum-based arbitration
CN103870570A (en) HBase (Hadoop database) data usability and durability method based on remote log backup
US9747291B1 (en) Non-disruptive upgrade configuration translator
CN113010496B (en) Data migration method, device, equipment and storage medium
US20230418716A1 (en) Anti-entropy-based metadata recovery in a strongly consistent distributed data storage system
JP2014016953A (en) Unshared type database system, synchronizing device, database server, its synchronizing method, and synchronizing program
JP2010257284A (en) Data processing method, computer, and data processing program
CN105323271B (en) Cloud computing system and processing method and device thereof
JP5685213B2 (en) Differential replication system, master database device, and slave database device
Guarnieri et al. Linearizable Low-latency Reads at the Edge
JP5544516B2 (en) Highly available server system, high availability server system failure recovery method, and highly available server
CN114531394A (en) Data synchronization method and device
JP2010218159A (en) Management device, database management method and program
JP2015014929A (en) Master server, information synchronization method, and information synchronization program
JP5449471B2 (en) Method for synchronous processing of update processing for shared data, data sharing system, and data sharing program
WO2023155706A1 (en) Data storage system and method