JP5832592B1 - Data management device - Google Patents
Data management device Download PDFInfo
- Publication number
- JP5832592B1 JP5832592B1 JP2014114060A JP2014114060A JP5832592B1 JP 5832592 B1 JP5832592 B1 JP 5832592B1 JP 2014114060 A JP2014114060 A JP 2014114060A JP 2014114060 A JP2014114060 A JP 2014114060A JP 5832592 B1 JP5832592 B1 JP 5832592B1
- Authority
- JP
- Japan
- Prior art keywords
- data
- record
- leaf
- stored
- data management
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
【課題】キーバリューストア方式のデータ領域を用いて、ロールバック処理や排他制御を実現することを目的とする。【解決手段】インメモリデータベース120は、キーに対応する間接レコードを記憶する間接レコード記憶部122と、間接レコードに対応するマスタレコードを記憶するマスタレコード記憶部123と、マスタレコードに対応するリーフレコードを記憶するリーフレコード記憶部124と、リーフレコードに対応する実データを記憶する実データ記憶部125とを備える。間接レコードは、対応するマスタレコードが記憶された位置と、関連する他の間接レコードが記憶された位置とを示すポインタとを含み、マスタレコードは、対応するリーフレコードが記憶された位置を示すポインタを含み、リーフレコードは、対応する実データが記憶された位置と、次の改訂版の実データに対応するリーフレコードが記憶された位置とを示すポインタを含む。【選択図】図7An object of the present invention is to realize rollback processing and exclusive control using a key-value store data area. An in-memory database 120 includes an indirect record storage unit 122 that stores an indirect record corresponding to a key, a master record storage unit 123 that stores a master record corresponding to the indirect record, and a leaf record corresponding to the master record. Are stored, and a real data storage unit 125 stores actual data corresponding to the leaf records. The indirect record includes a pointer indicating a position where the corresponding master record is stored and a position where another related indirect record is stored, and the master record is a pointer indicating a position where the corresponding leaf record is stored. The leaf record includes a pointer indicating the position where the corresponding actual data is stored and the position where the leaf record corresponding to the next revised version of the actual data is stored. [Selection] Figure 7
Description
この発明は、キーに対応させてデータを記憶するキーバリューストア方式(KVS方式)によるデータ管理技術に関する。 The present invention relates to a data management technique based on a key-value store system (KVS system) that stores data corresponding to a key.
識別情報であるキーと、データ(バリュー)とをペアにして記憶するKVS方式というデータ管理方式がある。KVS方式では、キーを指定することにより、対応するデータを取得することができる。 There is a data management method called a KVS method in which a key that is identification information and data (value) are stored in pairs. In the KVS system, corresponding data can be acquired by designating a key.
分けることのできない一連の処理(以下、サービス)をトランザクションという。
トランザクションの途中のサービスでエラーが発生した場合、それまでに実行されたサービスで更新されたデータを元の状態に戻すロールバック処理が実行される。また、あるトランザクションで更新されたデータが、そのトランザクションの処理中に他のトランザクションによって更新されないように、排他制御が行われる。
A series of processes (hereinafter referred to as services) that cannot be divided is called a transaction.
When an error occurs in a service in the middle of a transaction, a rollback process is performed to return data updated by the service executed so far to the original state. Further, exclusive control is performed so that data updated in a certain transaction is not updated by another transaction during the processing of the transaction.
インメモリデータベースという、データをコンピュータのメインメモリに展開し動作するデータベースがある。インメモリデータベースを用いると、データをハードディスク上に展開するディスク型データベースと比較して、高速に処理ができる。 There is an in-memory database that operates by expanding data in the main memory of a computer. If an in-memory database is used, data can be processed at a higher speed than a disk-type database in which data is developed on a hard disk.
KVS方式のデータ領域を用いてトランザクションを処理する場合、KVS方式のデータ領域以外に、キュー構造を有するメモリ領域を利用しなければ、ロールバック処理や排他制御を実現することができなかった。
この発明は、KVS方式のデータ管理を行う場合に、キュー構造を有するメモリ領域を利用することなく、ロールバック処理や排他制御を実現可能とすることを目的とする。
When a transaction is processed using a KVS data area, rollback processing and exclusive control cannot be realized unless a memory area having a queue structure is used in addition to the KVS data area.
An object of the present invention is to enable rollback processing and exclusive control without using a memory area having a queue structure when performing KVS data management.
この発明に係るデータ管理装置は、
キーに対応させて実データを記憶するキーバリューストア方式によるデータ管理を行うデータ管理装置であり、
キーに対応する間接レコードを記憶する間接レコード記憶部と、
間接レコードに対応するリーフレコードを記憶するリーフレコード記憶部とを備え、
前記間接レコードは、対応するリーフレコードが記憶された位置を示すマスタポインタと、関連する他の間接レコードが記憶された位置を示す間接ポインタとを含み、
前記リーフレコードは、対応する実データの情報と、次の改訂版の実データに対応するリーフレコードが記憶された位置を示すリーフポインタとを含む
ことを特徴とする。
The data management device according to the present invention is:
A data management device that performs data management by a key-value store method that stores actual data corresponding to a key,
An indirect record storage unit for storing an indirect record corresponding to the key;
A leaf record storage unit for storing leaf records corresponding to indirect records,
The indirect record includes a master pointer indicating a position where a corresponding leaf record is stored, and an indirect pointer indicating a position where another related indirect record is stored;
The leaf record includes information of corresponding actual data and a leaf pointer indicating a position where a leaf record corresponding to the next revised version of actual data is stored.
この発明に係るデータ管理装置は、データ構造を工夫することにより、キュー構造を有するメモリ領域を利用することなく、ロールバック処理や排他制御を実現可能である。 The data management apparatus according to the present invention can realize rollback processing and exclusive control without using a memory area having a queue structure by devising a data structure.
実施の形態1.
最初に本実施の形態において用いる用語について、説明する。
スラブとは、インメモリデータベース内のデータの固まりを意味し、チャンクとは、スラブ内のデータの固まりを意味する。チャンクポインタとは、インメモリデータベースにおいて予め定められた基準アドレスを基準とした相対的な位置を示す論理アドレス情報である。
First, terms used in the present embodiment will be described.
A slab means a chunk of data in the in-memory database, and a chunk means a chunk of data in the slab. The chunk pointer is logical address information indicating a relative position with reference to a predetermined reference address in the in-memory database.
図1は、実施の形態1に係る分散システム10の構成図である。
分散システム10は、複数のデータ管理装置100を備える。各データ管理装置100は、サービスバス20によって接続されている。
分散システム10は、外部からトランザクションの実行命令を受信する。トランザクションには、実行順序の定められた複数のサービス(アプリケーション)が含まれている。各サービスは、どのデータ管理装置100によって実行されるかと、入出力のデータ構造とが定められている。分散システム10は、実行命令によって指定されたトランザクションの各サービスを、定められた実行順序に従い、定められたデータ管理装置100により実行する。
FIG. 1 is a configuration diagram of a
The
The
図2は、実施の形態1に係るデータ管理装置100の構成図である。
データ管理装置100は、TPM(Transaction Process Monitor)110、インメモリデータベース120を備える。
TPM110は、インメモリデータベース120に記憶されたデータを用いて、トランザクションの処理を行う。TPM110は、実行部111、データ管理部112、データ送信部113を備える。
インメモリデータベース120は、KVS方式によりデータを管理する。インメモリデータベース120は、ハッシュテーブル121、間接レコード記憶部122、マスタレコード記憶部123、リーフレコード記憶部124、実データ記憶部125を備える。
FIG. 2 is a configuration diagram of the
The
The TPM 110 performs transaction processing using the data stored in the in-
The in-
図3は、分散システム10によるトランザクションの処理の説明図である。
図3では、分散システム10は、データ管理装置100A、データ管理装置100B、データ管理装置100Cを備える。データ管理装置100Aとデータ管理装置100Bとが稼働系であり、データ管理装置100Cがデータ管理装置100Bのバックアップとなる待機系である。
図3では、分散システム10は、サービスA、サービスB、サービスCという実行順序が定められたトランザクションの実行命令を受信する。サービスAは、データ管理装置100Aで実行され、サービスB,Cはデータ管理装置100Bで実行されることがトランザクションに定められている。
FIG. 3 is an explanatory diagram of transaction processing by the
In FIG. 3, the
In FIG. 3, the
図4は、図3に示すトランザクションの処理におけるデータ状態推移を示す図である。
図4では、各データ管理装置100のインメモリデータベース120に記憶されたデータと、トランザクション処理中に他のデータ管理装置100へのデータ渡し用に一時記憶されるトランザクションデータとを示す。トランザクションデータは、後述する主記憶装置903に記憶される。
図4では、コミット前の更新状態のデータを破線で示し、コミット後の確定状態のデータを実線で示す。
FIG. 4 is a diagram showing data state transition in the transaction processing shown in FIG.
FIG. 4 shows data stored in the in-
In FIG. 4, the update state data before committing is indicated by a broken line, and the confirmed state data after committing is indicated by a solid line.
(1)分散システム10がトランザクションの実行命令を受信する。正確には、分散システム10の各データ管理装置100がサービスバス20を介して実行命令を受信する。すると、各データ管理装置100は、実行命令を参照して、実行順序が1番のサービスAを実行することになっているか否かを確認する。そして、実行順序が1番のサービスAを実行することになっているデータ管理装置100AのTPM110が動作を開始し、他のデータ管理装置100B及びデータ管理装置100CのTPM110は待機する。
(1) The
(2)データ管理装置100Aの実行部111は、トランザクションデータを生成する。そして、実行部111は、サービスAを実行し、データXを生成する。
(3)データ管理装置100Aのデータ管理部112は、データXを更新状態としてデータ管理装置100Aのインメモリデータベース120に格納する。また、データ管理部112は、データXと、データXが記憶されたインメモリデータベース120における位置を示すチャンクポインタと、データXがサービスAによって生成されたことを示す生成元情報とを、トランザクションデータに格納する。
(4)データ管理装置100Aのデータ送信部113は、トランザクションデータを、実行順序が2番のサービスBを実行することになっているデータ管理装置100Bへ送信する。
(2) The
(3) The
(4) The
(5)トランザクションデータを受信すると、データ管理装置100BのTPM110が動作を開始する。データ管理装置100Bの実行部111は、サービスBを実行し、データYを生成する。
(6)データ管理装置100Bのデータ管理部112は、トランザクションデータに含まれるデータXを更新状態として、チャンクポインタに従いデータ管理装置100Bのインメモリデータベース120に格納する。また、データ管理部112は、データYを更新状態としてデータ管理装置100Bのインメモリデータベース120に格納する。また、データ管理部112は、データYと、データYが記憶されたインメモリデータベース120における位置を示すチャンクポインタと、データYがサービスBによって生成されたことを示す生成元情報とを、トランザクションデータに格納する。
(7)続いて、データ管理装置100Bの実行部111は、サービスCを実行し、データZを生成する。そして、データ管理装置100Bのデータ管理部112は、データZを更新状態としてデータ管理装置100Bのインメモリデータベース120に格納する。また、データ管理部112は、データZと、データZが記憶されたインメモリデータベース120における位置を示すチャンクポインタと、データZがサービスCによって生成されたことを示す生成元情報とを、トランザクションデータに格納する。
(5) When transaction data is received, the
(6) The
(7) Subsequently, the
(8)データ管理装置100Bの実行部111は、サービスCが完了すると、その旨を実行順序が1番のサービスAを実行したデータ管理装置100Aに通知する。すると、データ管理装置100Aのデータ管理部112は、コミット処理を行い、インメモリデータベース120に記憶されたデータXを更新状態から確定状態に変更する。
(9)データ管理装置100Aのデータ管理部112は、コミット処理が完了すると、その旨を実行順序が2番のサービスBを実行したデータ管理装置100Bに通知する。すると、データ管理装置100Bのデータ管理部112は、コミット処理を行い、インメモリデータベース120に記憶されたデータX,Y,Zを更新状態から確定状態に変更する。
(8) When the service C is completed, the
(9) When the commit process is completed, the
(10)データ管理装置100Cのデータ管理部112は、データ管理装置100Bのインメモリデータベース120に確定状態のデータX,Y,Zが新たに記憶されたため、同期処理を行い、データ管理装置100Cのインメモリデータベース120に確定状態としてデータX,Y,Zを格納する。
(10) The
以上のように、トランザクションで規定された順にサービスが実行され、全てのサービスが完了した後に、トランザクションで規定された順にコミット処理が実行される。 As described above, services are executed in the order specified in the transaction, and after all services are completed, commit processing is executed in the order specified in the transaction.
図5は、ロールバック処理におけるデータ状態推移を示す図である。
図5では、図4の(7)に示すように、データ管理装置100Aのインメモリデータベース120にデータXが格納され、データ管理装置100Bのインメモリデータベース120にデータX,Y,Zが格納された後に、サービスCでエラーが発生した場合を想定している。そこで、図5では、図4の(7)と、図4の(7)の後の(8’)〜(9’)を示す。
FIG. 5 is a diagram showing data state transition in the rollback processing.
In FIG. 5, as shown in (7) of FIG. 4, data X is stored in the in-
(8’)サービスCでエラーが発生すると、データ管理装置100Bの実行部111は、その旨を実行順序が1番のサービスAを実行したデータ管理装置100Aに通知する。すると、データ管理装置100Aのデータ管理部112は、ロールバック処理を行い、インメモリデータベース120に記憶されたデータXを削除する。
(9’)データ管理装置100Aのデータ管理部112は、ロールバック処理が完了すると、その旨を実行順序が2番のサービスBを実行したデータ管理装置100Bに通知する。すると、データ管理装置100Bのデータ管理部112は、ロールバック処理を行い、インメモリデータベース120に記憶されたデータX,Y,Zを削除する。その後、データ管理装置100Bのデータ管理部112は、トランザクションデータを削除する。
(8 ′) When an error occurs in the service C, the
(9 ′) When the rollback process is completed, the
以上のように、エラーが発生すると、トランザクションで規定された順にロールバック処理が実行され、インメモリデータベース120に格納されたデータが削除される。
As described above, when an error occurs, rollback processing is executed in the order specified by the transaction, and the data stored in the in-
図6は、インメモリデータベース120の基本構造図である。
インメモリデータベース120は、複数のスラブ130から構成される。
各スラブ130は、複数のチャンク131から構成される。
FIG. 6 is a basic structure diagram of the in-
The in-
Each slab 130 is composed of a plurality of
図7は、インメモリデータベース120の構成図である。
上述した通り、インメモリデータベース120は、ハッシュテーブル121、間接レコード記憶部122、マスタレコード記憶部123、リーフレコード記憶部124、実データ記憶部125を備える。
ハッシュテーブル121、間接レコード記憶部122、マスタレコード記憶部123、リーフレコード記憶部124、実データ記憶部125は、それぞれ、インメモリデータベース120を構成する一部のチャンク131によって構成される。例えば、ハッシュテーブル121、間接レコード記憶部122、マスタレコード記憶部123、リーフレコード記憶部124、実データ記憶部125は、それぞれ異なるスラブ130によって構成される。
FIG. 7 is a configuration diagram of the in-
As described above, the in-
The hash table 121, the indirect
ハッシュテーブル121は、一般的なハッシュテーブルであり、キーに対応する実データを高速に検索するための仕組みである。ハッシュテーブル121は、KVS方式におけるキーに対応して、間接レコード記憶部122が記憶された位置を示す間接ポインタ132を記憶する。
The hash table 121 is a general hash table and is a mechanism for searching for real data corresponding to a key at high speed. The hash table 121 stores an
間接レコード記憶部122は、対応するマスタレコードが記憶された位置を示すマスタポインタ133と、関連する他の間接レコードが記憶された位置を示す間接ポインタ132とを含む間接レコードを記憶する。
つまり、間接レコードは、イテレータ構造(チャンクポインタが示す実データを順番にアクセスできる構造)になっており、複数の間接レコードが間接ポインタ132によって関連付けられている。そのため、RDB(Relational DataBase)におけるレコードのように、複数のデータ項目を1つのキーに対して対応付けることが可能となる。つまり、KVS方式により、RDBと同様のデータ管理を実現することが可能となる。
The indirect
That is, the indirect record has an iterator structure (a structure in which the actual data indicated by the chunk pointer can be accessed in order), and a plurality of indirect records are associated by the
マスタレコード記憶部123は、対応するリーフレコードが記憶された位置を示すリーフポインタ134と、最新の実データの改訂版を示すバージョン情報とを含むマスタレコードを記憶する。
The master
リーフレコード記憶部124は、対応する実データが記憶された位置を示すデータポインタ135(実データの情報の一例)と、次の改訂版の実データに対応するリーフレコードが記憶された位置を示すリーフポインタ134とを含むリーフレコードを記憶する。
つまり、リーフレコードは、イテレータ構造になっており、複数のバージョンの実データに対応するリーフレコードがリーフポインタ134によって関連付けられている。そのため、新しいバージョンの実データが格納された場合に、古いバージョンの実データを削除することなく、キーに対応付けたままにすることが可能となる。
The leaf
That is, the leaf record has an iterator structure, and leaf records corresponding to a plurality of versions of actual data are associated by the
実データ記憶部125は、実データ136を記憶する。
The actual
間接レコード記憶部122に記憶された間接レコードは、アプリケーションからアクセスされる項目名を有する。つまりアプリケーション側から参照されるのは、間接レコードのみで、間接レコードから関連付けられるその他の記憶部の情報はアプリケーション側からは参照されない。間接レコードを経由しないでアプリケーションがマスタレコードへアクセスした場合、アプリケーションのアクセスにより、マスタレコード、リーフレコード、実データが破壊される可能性がある。間接レコード記憶部122がマスタレコード記憶部123と同じ構成を有し2重構成にしているのは、そのためであり、万が一、間接レコード記憶部122や間接レコードが破壊された場合は、マスタレコード記憶部123やマスタレコードから復元可能となる。
マスタレコード記憶部123に記憶されたマスタレコードは、実データに対して1つ存在するデータであり、バージョンに関わらない管理単位である。
リーフレコード記憶部124に記憶されたリーフレコードは、マスタレコードに対して複数存在し、バージョン毎に管理される。
The indirect record stored in the indirect
The master record stored in the master
A plurality of leaf records stored in the leaf
間接ポインタ132、マスタポインタ133、リーフポインタ134、データポインタ135を総称してチャンクポインタと呼ぶ。
アプリケーション側から参照される間接レコードの項目名は、これらチャンクポインタによって実データ記憶部125に記憶された実データと関連づけられる。なおマスタレコード記憶部123の構成を省略し、間接レコード記憶部122のマスタポインタ133がリーフポインタ134と同等の動作を行うことで、間接レコードからリーフレコードが関連づけられるように構成することができる。この場合、間接レコードはマスタレコードの代わりにマスタ管理機能を有することになる。
また実データ記憶部125および実データポインタ135の構成を省略し、リーフレコード記憶部124内に実データ136(実データの情報の一例)を保持することにより、図7に示す構成による処理と同様の処理を行うことができる。
The
The item name of the indirect record referred from the application side is associated with the actual data stored in the actual
Further, the configuration of the actual
図8は、コミット処理及びロールバック処理におけるリーフレコードの状態推移を示す図である。
上述した通り、トランザクションによって生成されたデータは更新状態として一旦格納され、トランザクションの完了後にコミット処理が実行され確定状態に変更される。一方、コミット処理ではなく、ロールバック処理が実行された場合、更新状態のデータが削除される。
データが更新状態又は確定状態として管理されると説明したが、具体的には、リーフレコードが更新状態又は確定状態として管理される。
FIG. 8 is a diagram showing the state transition of leaf records in the commit process and rollback process.
As described above, data generated by a transaction is temporarily stored as an updated state, and after the completion of the transaction, commit processing is executed and changed to a confirmed state. On the other hand, when the rollback process is executed instead of the commit process, the updated data is deleted.
Although it has been described that data is managed as an updated state or a confirmed state, specifically, leaf records are managed as an updated state or a confirmed state.
図8では、あるキーに対応して、バージョン1とバージョン2との2つのリーフレコードが確定状態になっているときに、実データが更新された場合を想定している。
実データが更新されると、データ管理部112は、既に記憶されている実データに上書きすることなく、更新された実データを新たに実データ記憶部125に格納する。また、データ管理部112は、格納した実データが記憶された位置を示すデータポインタ135を含むリーフレコードを更新状態としてリーフレコード記憶部124に格納する。さらに、データ管理部112は、格納したリーフレコードが記憶された位置を示すリーフポインタ134を、確定状態のリーフレコードのうち最新バージョンのリーフレコード(ここでは、バージョン2のリーフレコード)に含める。
In FIG. 8, it is assumed that actual data is updated when two leaf records of
When the actual data is updated, the
その後、コミット処理が実行されると、データ管理部112は、更新状態のリーフレコードを確定状態に変更する。また、データ管理部112は、マスタレコードに含まれるバージョン情報を最新の版に(ここでは、バージョン2からバージョン3に)更新する。
Thereafter, when the commit process is executed, the
一方、コミット処理ではなく、ロールバック処理が実行されると、データ管理部112は、更新状態のリーフレコードと、そのリーフレコードに対応する実データとを削除する。これにより、インメモリデータベース120が、トランザクションの実行前の状態に戻る。
On the other hand, when the rollback process is executed instead of the commit process, the
なお、データ管理部112は、更新状態のリーフレコードに対しては、更新元のトランザクション以外からのアクセスを拒絶する。一方、データ管理部112は、確定状態のリーフレコードに対しては、どのトランザクションからのアクセスも受理する。但し、データ管理部112は、あるキーに対応する更新状態のリーフレコードが存在する場合には、他のトランザクションからそのキーに対応する実データへの参照のみ許可し、更新は拒絶する。これにより、排他制御が実現される。
Note that the
また、ここでは、データが更新される場合について説明した。しかし、データが新規に格納される場合についても、同様にロールバック処理や排他制御を実現することができる。
但し、データが新規に格納される場合には、実データが実データ記憶部125に格納される際、リーフレコード記憶部124だけでなく、ハッシュテーブル121と間接レコード記憶部122とマスタレコード記憶部123とにも対応するレコードが格納される。そして、ロールバック処理では、更新状態のリーフレコードと、そのリーフレコードに対応する実データとともに、ハッシュテーブル121と間接レコード記憶部122とマスタレコード記憶部123とに格納された、対応するレコードも削除される。
Here, the case where data is updated has been described. However, even when data is newly stored, rollback processing and exclusive control can be similarly realized.
However, when data is newly stored, when the actual data is stored in the actual
図9は、チャンクポインタ及びデータコピーの説明図である。
チャンクポインタは、上述したとおり、インメモリデータベース120において予め定められた基準アドレスを基準とした相対的な位置を示す論理アドレス情報である。
図9では、データ管理装置100Aにおいては、インメモリデータベース120の“0x0010”が基準アドレスとされている。ここでは、スラブ130とチャンク131との番号は、左上から右下へ1から順に数えられるとする。
データXについてのチャンクポインタは、基準アドレスを基準として、6番目のスラブ130における、6番目のチャンク131を示している。また、データYについてのチャンクポインタは、基準アドレスを基準として、11番目のスラブ130における、5番目のチャンク131を示している。
FIG. 9 is an explanatory diagram of chunk pointers and data copying.
As described above, the chunk pointer is logical address information indicating a relative position based on a reference address that is predetermined in the in-
In FIG. 9, in the
The chunk pointer for the data X indicates the
図9では、データ管理装置100Bにおいては、インメモリデータベース120の“0x0100”が基準アドレスとされている。この場合に、例えば、データX,Yがデータ管理装置100Aからデータ管理装置100Bにコピーされたとする。すると、データ管理部112は、データ管理装置100Bのインメモリデータベース120の基準アドレスを基準とする、6番目のスラブ130における、6番目のチャンク131に、データXを格納する。同様に、データ管理部112は、データ管理装置100Bのインメモリデータベース120の基準アドレスを基準とする、11番目のスラブ130における、5番目のチャンク131に、データYを格納する。
つまり、データのコピーが行われる場合、コピー元のデータのチャンクポインタが示す位置にデータが格納される。
In FIG. 9, in the
That is, when data is copied, the data is stored at the position indicated by the chunk pointer of the copy source data.
これにより、データ管理装置100間のデータコピーの際に、チャンクポインタの再計算等が不要であり、データコピーの処理を高速に行うことが可能である。また、サービスがデータを参照する際も、チャンクポインタを介してデータを参照すれば、動作するデータ管理装置100を意識せずデータ参照を行うことが可能である。
As a result, when copying data between the
以上のように、実施の形態1に係る分散システム10では、インメモリデータベース120のデータ構造を工夫した。これにより、キュー構造を有するメモリ領域を利用することなく、ロールバック処理及び排他制御を実現することが可能である。また、RDBのように、1つのキーに対して複数のデータ項目を管理することが可能である。
As described above, in the distributed
また、実施の形態1に係る分散システム10では、データ管理装置100間でトランザクションデータを受け渡して、トランザクションを処理し、コミット処理及びロールバック処理を行う。これにより、複数のデータ管理装置100でトランザクションを処理する場合に、コミット処理及びロールバック処理を実現することが可能である。
In the distributed
また、実施の形態1に係る分散システム10では、サービスの実行順序や、サービスを実行するデータ管理装置100が実行命令において規定されている。そのため、サービスの実行順序や実行するデータ管理装置100を容易に変更可能である。
なお、サービスの実行順序や、サービスを実行するデータ管理装置100は、実行命令内に規定せず、外部の記憶装置等に記憶しておき、実行部111に参照させるようにしてもよい。
In the distributed
It should be noted that the service execution order and the
また、実施の形態1に係る分散システム10では、データ管理装置100間のデータコピーの際に、コピー元のデータのチャンクポインタが示す位置にデータを格納する。これにより、データコピーの際にチャンクポインタの再計算が不要であり、データコピーを高速に行うことが可能である。
In the distributed
図10は、実施の形態1に示したデータ管理装置100のハードウェア構成の例を示す図である。
データ管理装置100は、コンピュータである。データ管理装置100の各要素をプログラムで実現することができる。
データ管理装置100のハードウェア構成としては、バスに、演算装置901、外部記憶装置902、主記憶装置903、通信装置904、入出力装置905が接続されている。
FIG. 10 is a diagram illustrating an example of a hardware configuration of the
The
As a hardware configuration of the
演算装置901は、プログラムを実行するCPU(Central Processing Unit)等である。外部記憶装置902は、例えばROM(Read Only
Memory)やフラッシュメモリ、ハードディスク装置等である。主記憶装置903は、例えばRAM(Random Access Memory)等である。通信装置904は、例えば通信ボード等である。入出力装置905は、例えばマウス、キーボード、ディスプレイ装置等である。
インメモリデータベース120は、外部記憶装置902や主記憶装置903によって構成される。
The
Memory), flash memory, hard disk device, and the like. The
The in-
プログラムは、通常は外部記憶装置902に記憶されており、主記憶装置903にロードされた状態で、順次演算装置901に読み込まれ、実行される。
プログラムは、実行部111、データ管理部112、データ送信部113として説明している機能を実現するプログラムである。
更に、外部記憶装置902にはオペレーティングシステム(OS)も記憶されており、OSの少なくとも一部が主記憶装置903にロードされ、演算装置901はOSを実行しながら、上記プログラムを実行する。
また、実施の形態1の説明において、インメモリデータベース120が記憶するデータ等が主記憶装置903にファイルとして記憶されている。
The program is normally stored in the
The program is a program that realizes the functions described as the
Furthermore, an operating system (OS) is also stored in the
In the description of the first embodiment, data stored in the in-
なお、図10の構成は、あくまでもデータ管理装置100のハードウェア構成の一例を示すものであり、データ管理装置100のハードウェア構成は図10に記載の構成に限らず、他の構成であってもよい。
10 is merely an example of the hardware configuration of the
10 分散システム、100 データ管理装置、110 TPM、111 実行部、112 データ管理部、113 データ送信部、120 インメモリデータベース、121 ハッシュテーブル、122 間接レコード記憶部、123 マスタレコード記憶部、124 リーフレコード記憶部、125 実データ記憶部、130 スラブ、131 チャンク、132 間接ポインタ、133 マスタポインタ、134 リーフポインタ、135 データポインタ、136 実データ。 10 distributed system, 100 data management device, 110 TPM, 111 execution unit, 112 data management unit, 113 data transmission unit, 120 in-memory database, 121 hash table, 122 indirect record storage unit, 123 master record storage unit, 124 leaf record Storage unit, 125 actual data storage unit, 130 slab, 131 chunk, 132 indirect pointer, 133 master pointer, 134 leaf pointer, 135 data pointer, 136 actual data.
Claims (10)
キーに対応する間接レコードを記憶する間接レコード記憶部と、
間接レコードに対応するリーフレコードを記憶するリーフレコード記憶部とを備え、
前記間接レコードは、対応するリーフレコードが記憶された位置を示すマスタポインタと、関連する他の間接レコードが記憶された位置を示す間接ポインタとを含み、
前記リーフレコードは、対応する実データの情報と、次の改訂版の実データに対応するリーフレコードが記憶された位置を示すリーフポインタとを含む
ことを特徴とするデータ管理装置。 A data management device that performs data management by a key-value store method that stores actual data corresponding to a key,
An indirect record storage unit for storing an indirect record corresponding to the key;
A leaf record storage unit for storing leaf records corresponding to indirect records,
The indirect record includes a master pointer indicating a position where a corresponding leaf record is stored, and an indirect pointer indicating a position where another related indirect record is stored;
The said leaf record contains the information of the corresponding real data, and the leaf pointer which shows the position where the leaf record corresponding to the next revision actual data was memorize | stored.
キーに対応する間接レコードを記憶する間接レコード記憶部と、
間接レコードに対応するマスタレコードを記憶するマスタレコード記憶部と、
マスタレコードに対応するリーフレコードを記憶するリーフレコード記憶部と
を備え、
前記間接レコードは、対応するマスタレコードが記憶された位置を示すマスタポインタと、関連する他の間接レコードが記憶された位置を示す間接ポインタとを含み、
前記マスタレコードは、対応するリーフレコードが記憶された位置を示すリーフポインタを含み、
前記リーフレコードは、対応する実データの情報と、次の改訂版の実データに対応するリーフレコードが記憶された位置を示すリーフポインタとを含む
ことを特徴とするデータ管理装置。 A data management device that performs data management by a key-value store method that stores actual data corresponding to a key,
An indirect record storage unit for storing an indirect record corresponding to the key;
A master record storage unit for storing a master record corresponding to the indirect record;
A leaf record storage unit for storing a leaf record corresponding to the master record,
The indirect record includes a master pointer indicating a position where a corresponding master record is stored, and an indirect pointer indicating a position where another related indirect record is stored;
The master record includes a leaf pointer indicating a position where a corresponding leaf record is stored;
The said leaf record contains the information of the corresponding real data, and the leaf pointer which shows the position where the leaf record corresponding to the next revision actual data was memorize | stored.
リーフレコードに対応する実データを記憶する実データ記憶部
を備え、
前記リーフレコードは、前記実データの情報として、対応する実データが記憶された位置を示すデータポインタを含む
ことを特徴とする請求項1から3までのいずれかに記載のデータ管理装置。 The data management device further includes:
A real data storage unit for storing real data corresponding to leaf records is provided.
The data management apparatus according to any one of claims 1 to 3, wherein the leaf record includes a data pointer indicating a position where the corresponding actual data is stored as information of the actual data.
実データが更新された場合に、前記実データ記憶部が記憶した実データを上書きすることなく、更新された実データを前記実データ記憶部に格納し、格納した実データに対応するリーフレコードを前記リーフレコード記憶部に格納し、格納したリーフレコードが記憶された位置を示すリーフポインタを更新前の実データに対応するリーフレコードに含めるデータ管理部
を備えることを特徴とする請求項4に記載のデータ管理装置。 The data management device further includes:
When the actual data is updated, the updated actual data is stored in the actual data storage unit without overwriting the actual data stored in the actual data storage unit, and a leaf record corresponding to the stored actual data is stored. 5. The data management unit according to claim 4, further comprising: a data management unit that stores the leaf pointer in the leaf record corresponding to the actual data before the update, which is stored in the leaf record storage unit and indicates a position where the stored leaf record is stored. Data management device.
ことを特徴とする請求項5に記載のデータ管理装置。 When the transaction is executed and the actual data is updated, the data management unit stores the updated actual data in the actual data storage unit, and stores the leaf record corresponding to the updated actual data in the other data An update state that does not allow reference from a transaction is stored in the leaf record storage unit, and when the transaction ends normally, the leaf record is changed to a confirmed state that allows reference from another transaction. The data management device according to claim 5.
ことを特徴とする請求項6に記載のデータ管理装置。 The data management unit deletes the updated actual data from the actual data storage unit when the transaction ends abnormally, and deletes the leaf record corresponding to the updated actual data from the leaf record storage unit. The data management device according to claim 6.
ことを特徴とする請求項6又は7に記載のデータ管理装置。 8. The data management apparatus according to claim 6, wherein the data management unit rejects updating of actual data corresponding to the key when there is an updated leaf record corresponding to the key.
トランザクションに含まれる処理を実行する実行部と、
前記実行部が実行した処理によって実データが更新された場合、更新された実データと、更新された実データが記憶された位置を示すデータポインタと、更新された実データに対応するリーフレコードが記憶された位置を示すリーフポインタとを含むトランザクションデータを、他のデータ管理装置へ送信するデータ送信部と
を備え、
前記データ管理部は、他のデータ管理装置からトランザクションデータを受信すると、トランザクションデータに含まれる実データを、トランザクションデータに含まれるデータポインタが示す位置に格納し、トランザクションデータに含まれるデータポインタを含むリーフレコードを、トランザクションデータに含まれるリーフポインタが示す位置に格納し、トランザクションデータに含まれるリーフポインタを、更新前の実データに対応するリーフレコードに含める
ことを特徴とする請求項5から8までのいずれかに記載のデータ管理装置。 The data management device further includes:
An execution unit that executes the processing included in the transaction;
When actual data is updated by the process executed by the execution unit, the updated actual data, a data pointer indicating a position where the updated actual data is stored, and a leaf record corresponding to the updated actual data are A data transmission unit that transmits transaction data including a leaf pointer indicating a stored position to another data management device;
When the data management unit receives transaction data from another data management device, the data management unit stores the actual data included in the transaction data at a position indicated by the data pointer included in the transaction data, and includes the data pointer included in the transaction data. 9. The leaf record is stored at a position indicated by a leaf pointer included in the transaction data, and the leaf pointer included in the transaction data is included in the leaf record corresponding to the actual data before the update. The data management apparatus in any one of.
ことを特徴とする請求項1から9までのいずれかに記載のデータ管理装置。 10. The data management apparatus according to claim 1, wherein the master pointer, the indirect pointer, and the leaf pointer indicate relative positions based on a memory reference address.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014114060A JP5832592B1 (en) | 2014-06-02 | 2014-06-02 | Data management device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014114060A JP5832592B1 (en) | 2014-06-02 | 2014-06-02 | Data management device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP5832592B1 true JP5832592B1 (en) | 2015-12-16 |
JP2015228165A JP2015228165A (en) | 2015-12-17 |
Family
ID=54874308
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2014114060A Expired - Fee Related JP5832592B1 (en) | 2014-06-02 | 2014-06-02 | Data management device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5832592B1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2019194780A (en) * | 2018-05-01 | 2019-11-07 | 富士通株式会社 | Information processing apparatus, data management program, and data management method |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2010114006A1 (en) * | 2009-03-31 | 2010-10-07 | 日本電気株式会社 | Storage system and storage access method and program |
JP4385387B1 (en) * | 2009-07-02 | 2009-12-16 | 修平 西山 | Database system with attributed key-value store |
JP5652228B2 (en) * | 2011-01-25 | 2015-01-14 | 富士通株式会社 | Database server device, database update method, and database update program |
US9367261B2 (en) * | 2011-09-28 | 2016-06-14 | Hitachi, Ltd. | Computer system, data management method and data management program |
JPWO2013141308A1 (en) * | 2012-03-22 | 2015-08-03 | 日本電気株式会社 | Distributed storage system, storage control method and program |
WO2013172405A1 (en) * | 2012-05-17 | 2013-11-21 | 日本電気株式会社 | Storage system and data access method |
-
2014
- 2014-06-02 JP JP2014114060A patent/JP5832592B1/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2015228165A (en) | 2015-12-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10437795B2 (en) | Upgrading systems with changing constraints | |
KR102579190B1 (en) | Backup and restore in distributed databases using consistent database snapshots | |
US8832028B2 (en) | Database cloning | |
US9892183B2 (en) | Computer system, computer system management method, and program | |
US10248709B2 (en) | Promoted properties in relational structured data | |
US11263236B2 (en) | Real-time cross-system database replication for hybrid-cloud elastic scaling and high-performance data virtualization | |
US10489378B2 (en) | Detection and resolution of conflicts in data synchronization | |
US10599676B2 (en) | Replication control among redundant data centers | |
US8832022B2 (en) | Transaction processing device, transaction processing method and transaction processing program | |
CN108431807B (en) | Replication of structured data records in partitioned data storage spaces | |
US10235406B2 (en) | Reminder processing of structured data records among partitioned data storage spaces | |
US10007548B2 (en) | Transaction system | |
US20150286671A1 (en) | Transaction system | |
US10929100B2 (en) | Mitigating causality discrepancies caused by stale versioning | |
US10127270B1 (en) | Transaction processing using a key-value store | |
US8825603B2 (en) | Ordering volumes and tracks for data transfer based on usage characteristics | |
US8862550B1 (en) | Reliable in-place bootstrap metadata transformation in a shared data store | |
JP5832592B1 (en) | Data management device | |
US10268475B1 (en) | Near-zero downtime customizing change | |
US10956386B2 (en) | Methods and apparatuses for automated performance tuning of a data modeling platform | |
US20200104391A1 (en) | Ensuring integrity of records in a not only structured query language database | |
CN109710698A (en) | A kind of data assemblage method, device, electronic equipment and medium | |
US20180181310A1 (en) | System and method for disk identification in a cloud based computing environment | |
KR101789933B1 (en) | Computing system and method for data consistency | |
US20230101740A1 (en) | Data distribution in data analysis systems |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20150929 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20151027 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5832592 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |