WO2012169080A1 - データベースの管理方法 - Google Patents

データベースの管理方法 Download PDF

Info

Publication number
WO2012169080A1
WO2012169080A1 PCT/JP2011/065353 JP2011065353W WO2012169080A1 WO 2012169080 A1 WO2012169080 A1 WO 2012169080A1 JP 2011065353 W JP2011065353 W JP 2011065353W WO 2012169080 A1 WO2012169080 A1 WO 2012169080A1
Authority
WO
WIPO (PCT)
Prior art keywords
master node
minimum value
transaction
node
database
Prior art date
Application number
PCT/JP2011/065353
Other languages
English (en)
French (fr)
Inventor
山田 浩之
Original Assignee
株式会社Murakumo
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 株式会社Murakumo filed Critical 株式会社Murakumo
Priority to PCT/JP2011/065353 priority Critical patent/WO2012169080A1/ja
Priority to US13/542,324 priority patent/US9251195B2/en
Priority to EP12175043A priority patent/EP2544107A1/en
Publication of WO2012169080A1 publication Critical patent/WO2012169080A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2308Concurrency control
    • G06F16/2315Optimistic concurrency control
    • G06F16/2329Optimistic concurrency control using versioning

Definitions

  • the present invention relates to a database management method, and more particularly to a database management method in which a plurality of master nodes are hierarchically connected by a network.
  • PostgreSQL uses a transaction ID assigned to each transaction and adopts a mechanism to determine how far to completely erase while referring to the transaction ID that has already been committed as seen from the snapshot of each transaction.
  • the minimum value of the transaction IDs that are considered to be being executed in the snapshot of each transaction is calculated, and the deletion is performed in accordance with the ID of the minimum value.
  • the multi-master node system is composed of a huge number of nodes constructed hierarchically, and has a huge number of transactions that are simultaneously executed in parallel on the nodes. For this reason, when there is a variation in processing capability between nodes, the processing delay of one node affects the overall processing capability.
  • the value of the minimum value ID that can be completely erased indefinitely does not increase, so that the effectiveness of the complete erase process of the entire node cannot be ensured.
  • the upper node that subsequently received the write set may update the tuple that should have been completely erased based on the contents of the write set.
  • Claim 1 of the present invention is a method for managing a write-once database having hierarchically upper and lower master nodes capable of record update, and in a session of any lower master node, Sending the shadow copy of the database of the lower master node, the heap tuple map expanded on its own memory, and the transaction minimum value of the snapshot referenced by the executing transaction as a write set;
  • the transaction minimum value in the write set received from the lower master node is compared with the cluster minimum value held by the upper master node, and if the transaction minimum value is equal to or greater than the cluster minimum value, Heap data in the write set
  • the map is compared with its own database to verify whether there is an update in the database of the tuple registered as a target.
  • a method of managing a write-once database having a hierarchical master node comprising: notifying a lower master node of a cluster minimum value held by a node and discarding a transaction having a transaction minimum value smaller than the minimum value; is there.
  • the subordinate master node compares the transaction minimum values between a plurality of snapshots in which transactions being executed in time series are recorded, and sets the smallest value as the node minimum value.
  • the value is notified to the upper master node as a tree minimum value, and the upper master node selectively selects a cluster minimum value from its own node minimum value and the tree minimum value notified from the one or more lower master nodes.
  • a middle master node in a hierarchy between the upper master node and the lower master node, and the lower master node records a plurality of transactions being executed in time series.
  • the transaction minimum values between the snapshots of the snapshots are compared, the smallest value is set as the node minimum value, and this node minimum value is notified to the intermediate master node as the tree minimum value.
  • the value is compared with the tree minimum value notified from the one or more lower master nodes, and the smallest value is notified to the upper master node as the tree minimum value of the intermediate master node.
  • the cluster minimum value is selectively determined from its own node minimum value and the tree minimum value notified from the one or more intermediate master nodes. - a management method for write once type database according to claim 1, wherein the holding.
  • a fourth aspect of the present invention is the write-once database management method according to the third aspect, wherein the intermediate master node further has a tree structure of two or more hierarchies.
  • Claim 5 of the present invention is the write-once type according to claim 1, wherein the notification of the cluster minimum value held by the upper master node to the lower master node is performed asynchronously with the notification of the transaction log to the lower master node. This is a database management method.
  • the transaction ID can be efficiently discarded by notifying the lower master node of the cluster minimum value asynchronously with the replication management process.
  • Claim 6 of the present invention is that the notification of the cluster minimum value held by the upper master node to the lower master node is performed by including the cluster minimum value in the transaction log. Is the method.
  • the order of notification can be forced, so that it is possible to discard a transaction ID without any contradiction.
  • the write set is generated at a middle master node instead of a lower master node, and at least a snapshot transaction minimum value referred to by a transaction being executed at the middle master node is written. 5.
  • Explanatory drawing which shows the database structure of the multi-node format of the present invention
  • Block diagram showing the configuration of the database controller Diagram showing the contents of a writing set
  • Explanatory drawing showing processing of write set in the upper master node
  • Explanatory diagram showing the structure of transaction log data Diagram showing the relationship between multi-node database tree structure, transaction minimum value, tree minimum value and node minimum value
  • FIG. 1 shows the structure of the hierarchical master node of this embodiment.
  • a node configuration having a middle-level master node (MS201, MS202... MS20n) and a lower-level master node (MS301, MS302... MS30n) hierarchically under an upper master node (MS101). It has become.
  • Each node (information processing apparatus) has a database.
  • the upper master node (MS101) has a slave, but other lower master nodes may have slaves.
  • the update management technique described in PCT / JP2010 / 054311 by the present applicant may be applied to update the database between the two. it can.
  • FIG. 2 is a functional block diagram of the lower master node (MS201), but the upper master node (MS101) has the same function.
  • the database processing unit (11b) performs a write set on the back-end memory (BEM) built on the memory (MM). Generate.
  • this writing set includes a heap tuple map (HTM) and a shadow copy (SC).
  • HTM heap tuple map
  • SC shadow copy
  • the database processing unit 11b does not write directly to the master database (11a) while referring to the master database (11a), but stores the write set generated in the back-end memory (BEM) as a communication module ( 11d) to the higher master.
  • FIG. 8 shows the relationship between a transaction in each node (upper node, middle node or lower node) and its snapshot.
  • a plurality of transactions are executed in parallel at each node, and a plurality of snapshots indicating the execution state of the transactions in time series at a plurality of respective time points are held.
  • transaction ID 2, 4, 5, 6 and 9 are being executed in this node.
  • Transaction IDs 1, 3, 7, 8, and 10 are committed.
  • Transaction ID 11 is in an unexecuted state.
  • Such a snapshot is recorded in the aforementioned back-end memory (BEM).
  • BEM back-end memory
  • the smallest value is the node minimum value.
  • the node minimum value (Nmin) generated by the lower-level master node (for example, MS 301), that is, the tree minimum value (Tmin) is notified to the middle level node (for example, MS 201) as needed asynchronously with the writing set described later.
  • the middle master node (MS201) compares the tree minimum value (Tmin) received from each of the lower master nodes (MS301 to MS30n) with the node minimum value (Nmin) in its own snapshot to obtain a smaller value. Is updated as its own tree minimum value (Tmin).
  • the minimum tree value (Tmin) of each middle master node (MS201 to MS20n) is notified to the upper master node (MS101).
  • the upper master node (MS101) receives the tree minimum value (Tmin) received from each middle master node (MS201 to MS20n), it compares the node minimum value (Nmin) in its own snapshot, Any minimum value or a value between the minimum values is adopted to update its own tree minimum value (Tmin). Then, the tree minimum value (Tmin) is compared with the cluster minimum value (Cmin) at that time, and a value between them is determined and a new cluster minimum value (Cmin) is determined and updated.
  • the node minimum value (Nmin) of the lower master nodes E and F that is, the tree minimum value (Tmin), the tree minimum value (Tmin) of the middle master nodes B, C, D, and E, and the upper master A state where the tree minimum value (Tmin) and the cluster minimum value (Cmin) of the node A are updated will be described.
  • the minimum tree value is notified to the upper master node A.
  • the transaction minimum value on the snapshots of all nodes becomes 3 or more.
  • the probability that a write set generated in the lower / middle master node will be aborted when it reaches the upper master node is reduced, and the write set that is wasted is reduced, and the load on each node is reduced.
  • the standard for complete erasure becomes a small value, it is difficult to achieve efficient operation by complete erasure of the entire node.
  • Cmin cluster minimum value
  • Such a cluster minimum value (Cmin) setting method is such that a prescribed difference value between a node minimum value (Nmin) and a tree minimum value (Tmin) is determined in advance, and if this prescribed difference value is exceeded, it is compulsory.
  • the reference value may be controlled to be within the specified difference.
  • the tuple is completely erased based on the cluster minimum value (Cmin). That is, in the upper master node, tuples deleted by a transaction having a transaction ID smaller than the cluster minimum value (Cmin) can be completely deleted. The tuples completely erased by the upper master node can be safely and completely erased by the middle and lower master nodes by discarding the transaction and aborting the write set described below.
  • the minimum transaction value (Xmin), the minimum node value (Nmin), and the minimum tree value (Tmin) based on them are always greater than 6. Therefore, after the notification of the cluster minimum value (Cmin), there is no transaction that refers to the completely deleted tuple.
  • the upper master node and the lower master node may have a two-layer structure, or the middle master node may have a tree structure of three or more layers, that is, a total of five or more layers.
  • FIG. 1 shows the relationship between the master database (11a) in the lower master node (M301 as an example) and the writing set.
  • the master database (201a) is composed of line numbers, instruction contents, and pointers, and is a write-once database in which line numbers are added each time a new instruction is issued from the client terminal (CL).
  • line number 4 is deleted (DELETE) and line number 5 is rewritten with new instruction contents (UPDATE to sc1) is shown.
  • HTM heap tuple map
  • SC shadow copy
  • Xmin transaction minimum value
  • HTM heap tuple map
  • the original line number (ctid) and the line number (sctid) of the new line are associated and registered.
  • a heap tuple map (HTM) is additionally generated every time the database is updated. Note that since the line number in which the instruction content (sc1) of line number 5 is written is still unknown at this stage, a new instruction (sc1) is written in sctid.
  • the database processing unit (11b) of the subordinate master node (MS301) uses the line number 4 to which the DELETE instruction is applied by generating the heap tuple map (HTM) and the old line number 5 to which the UPDATE instruction is applied. Since it is already known that the command is deleted, only a new command (sc1) may be written as the shadow copy (SC).
  • the transaction minimum value (Xmin) added to the writing set the transaction minimum value (Xmin) recorded on the snapshot referred to by the transaction being executed is written as it is.
  • the writing set generated in this way is transmitted from the lower master node (MS301) to the middle master node (for example, MS201) and further to the upper master node (MS101).
  • the database processing unit 11b central processing unit (CPU)
  • CPU central processing unit
  • the transaction minimum value (Xmin) is compared with the cluster minimum value (Cmin) held in the back-end memory (BEM) of the upper master node (MS101).
  • BEM back-end memory
  • the transaction log processing unit (11c) is activated to start generating transaction log data, and then the following processing is performed.
  • the heap tuple map (HTM) is read and compared with its own master database 11a. Here, it is verified whether or not the contents of the target tuple (here, line numbers 4, 5, and 7) are updated on the database (11a). In FIG. 4, since the line numbers 4 to 6 are not updated, a deletion pointer is assigned to the line number 4 and a deletion pointer is also assigned to the old number 5 to be rewritten. Then, a new command (sc1) is written in the new line number 7.
  • the writing set there is a possibility that a tuple deleted by a transaction having a transaction ID smaller than the cluster minimum value (Cmin) is an update target. There is a high possibility that such a tuple has already been discarded based on the setting of the cluster minimum value (Cmin) of the upper master node. In that case, consistency cannot be detected for this tuple using the heap tuple map, resulting in a contradiction in the upper master node. Therefore, the writing set having the transaction minimum value (Xmin) smaller than the cluster minimum value (Cmin) is aborted to prevent the occurrence of the contradiction.
  • the write set generated in the middle / lower master node while notifying the cluster minimum value (Cmin) from the upper master node to the lower master node has a transaction minimum value smaller than the cluster minimum value (Cmin). Therefore, it is necessary to check when the writing set is applied on the upper master node. Therefore, as described above, the transaction minimum value (Xmin) registered in the writing set is compared with the cluster minimum value (Cmin), and if the transaction minimum value (Xmin) is small, the writing set is aborted. This is the solution.
  • the notification of the cluster minimum value (Cmin) can discard all transactions that refer to the tuples that have been completely erased, and the write set created in the wrong way of the notification (Cmin) notification is also the cluster minimum value. Abort can be performed based on (Cmin). Therefore, tuples can be completely deleted even in the middle and lower nodes without losing the consistency of the database.
  • FIG. 5 is an example of transaction log data generated by the transaction log processing unit (11c) when the master database (11a) of the upper master node (MS101) is updated as described above.
  • This transaction log is a file in which at least instructions and transaction contents (line numbers and execution process contents corresponding thereto) are continuously recorded in time series.
  • a log in which the instruction number and the line number are paired is sequentially generated. For example, line number 4 is deleted first as a DELETE instruction (D1) (D14), then line number 5 is deleted as UPDATE instruction (U1), line number 7 is added (U157), and then these commit instructions ( XC1) is issued.
  • D1 D14
  • UPDATE instruction U1
  • U157 UPDATE instruction
  • XC1 a minimum cluster value
  • This transaction log data is distributed from the communication module (11d) to the intermediate master node (MS201) and all lower master nodes (MS302... MS30n).
  • the middle / lower master node that has received the transaction log data replicates the transaction log data to its own database.
  • the transaction log processing unit 11c is activated to replicate the transaction log data to its own master database 11a. To do.
  • deletion pointers are assigned to the line numbers 4 and 5, and a new line number 7 is added.
  • the middle and lower master nodes manage the database uniformly by replicating the transaction log data transmitted from the upper master node.
  • the database processing unit (11b) first refers to the heap tuple map (HTM) to check whether or not the search corresponding row number has been entered. For example, in the example shown in FIG. 3, when the search target is line number 3, the database processing unit (11 b) determines the heap tuple in the writing set on the back-end memory (BEM) built on the memory (MM). Referring to the map (HTM), it is determined whether or not the corresponding line (line number 3) has been entered. In the example of FIG. 3, the corresponding line is not entered. In that case, the master database 201a is directly accessed to search for the corresponding line (line number 3).
  • HTM heap tuple map
  • the shadow copy (SC1) corresponding to the corresponding line (line number 5) is referred to the heap tuple map (HTM) as described above. Detect that it has been created.
  • the database processing unit (11b) may refer to the shadow copy (SC1) and search for the contents in which line number 5 is rewritten.
  • the heap tuple map (HTM) is referred to for each row has been described.
  • the present invention is not limited to such a processing method. Referring to the heap tuple map (HTM), search for the master database (201a) by removing all of the line numbers entered here, and then search the heap tuple map (HTM) again. With reference to the entry, the corresponding line may be excluded from the search target (in the case of line number 4), or the shadow copy (SC1) may be set as the search target.
  • this corresponds to the case where transaction log data relating to line number 5 is distributed from the upper master when line numbers 4 and 5 are updated based on an update instruction to the lower master node. .
  • the writing set is generated in the lower master node (MS301).
  • the present invention is not limited to this, and the writing set may be generated in the middle master node (MS201).
  • the present invention can be used for a database management system having a multi-master node structure having a hierarchical structure.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

 階層構造を備えたマルチマスタノード構造の追記型データベース管理システムにおける管理方法であって、下位マスタノードでは、自身のデータベースのシャドウコピーと自身のメモリ上に展開されたヒープタプルマップとトランザクション最小値とを書込セットとして送信し、これを受信した上位マスタノードでは、トランザクション最小値が自身が保持するクラスタ最小値と等しいかそれよりも大きい場合には、書込セットを用いてデータベースを更新するとともにトランザクションログを生成し、トランザクション最小値がクラスタ最小値よりも小さい場合には当該書込セットをアボートする。また上位マスタノードは自身が保持するクラスタ最小値を下位マスタノードに通知して、該最小値よりも小さいトランザクション最小値を有するトランザクションを廃棄させる。

Description

データベースの管理方法
 本発明は、データベースの管理方法、特に複数のマスタノードがネットワークにより階層的に接続されているデータベースの管理方法に関する。
 PostgreSQLのような追記型のデータベースといえども、リソースを有効活用するためには、タプルを削除した後に一定時間経過したら当該タプルを完全消去(vacuum)することが望ましい。
 しかし、トランザクションは実行開始から終了までを単一のスナップショットで管理するため、あるトランザクションによって特定のタプルが削除されたとしても、そのことによって即座に全てのトランザクションから当該タプルが参照されなくなるとは限らない。そのため、当該タプルを参照する一連のトランザクションが全てコミットされない限りそのタプルは完全消去されないことが原則である。もしそのタプルが削除されたとしても、その時点で実行中の他のスナップショット上では当該タプルが参照できるようにしておかなければならないのである。
 そのため、PostgreSQLでは、トランザクション毎に付与されているトランザクションIDを利用して、各トランザクションのスナップショットからみてすでにコミットされているトランザクションIDを参照しながらどこまで完全消去すればよいかを判断する仕組みを採用していた。すなわち、各トランザクションのスナップショットで実行中とみなされているトランザクションIDのうち最小の値を計算し、その最小値のIDに合わせて完全消去する運用をしていたわけである。
特開2006-293910号公報
 以上述べた運用はシングルノード構成のデータベースでの運用であるが、これをマルチマスタノードに適用した場合にはシングルノードシステムでは予期すらできない以下のような課題が発生することが本発明者によって見出された。
 すなわち、マルチマスタノードシステムは、階層的に構築された膨大な数のノードで構成され、かつそのノード上で並列に同時実行される膨大なトランザクションを有している。そのため、ノード間の処理能力にばらつきがあった場合、一つのノードの処理遅延が全体の処理能力に影響を与えてしまうことになる。
 そのため、マルチマスタノード構成のデータベースの場合、いつまでたっても完全消去できる最小値IDの値が大きくならず、そのためにノード全体の完全消去処理の実効性が確保できなかった。
 このため、強制的に最小値IDをある程度の大きさの値に設定して完全消去処理を行ってしまう方法が考えられる。
 ところで、この種のマルチマスタノード形式のデータベースにおいて、本発明者はその更新を効率的に矛盾無く行うために、下位のマスタノードのデータベースのシャドウコピーと自身のメモリ上に展開されたヒープタプルマップとを書き込みセットとして上位マスタノードに送信してノード全体のデータベースの更新処理を統一する技術を提案している(特願2010-239713)。
 ところで、この下位ノードで書き込みセットを生成して上位ノードに向けて送信している間に、書き込みセットの更新対象になっているタプルに対する完全消去命令が上位ノードから下位ノードに対して送信された場合、その後に前記書き込みセットを受信した上位ノードでは、既に完全消去されたはずのタプルを書き込みセットの内容に基づいて更新してしまう可能性があった。
 そのため、マルチマスタノード形式のデータベースにおいても、データベース全体の整合性を崩すことなく、トランザクションの廃棄処理を行う必要があった。
 前記課題を解決するために、本発明では以下の手段を採用した。
 本発明の請求項1は、レコード更新が可能な上位と下位のマスタノードを階層的に有する追記型データベースの管理方法であって、いずれかの下位マスタノードのセッションにおいて、上位マスタノードに対して、当該下位のマスタノードのデータベースのシャドウコピーと、自身のメモリ上に展開されたヒープタプルマップと、実行中のトランザクションが参照するスナップショットのトランザクション最小値とを書き込みセットとして送信するステップと、前記上位マスタノードにおいて、前記下位マスタノードから受信した書き込みセット中のトランザクション最小値と上位マスタノードが保持するクラスタ最小値とを比較して、トランザクション最小値がクラスタ最小値と等しいか大きい場合には、当該書き込みセット中のヒープタプルマップと自身のデータベースとを比較して、ターゲットとして登録されているタプルのデータベースにおける更新の有無を検証し、更新がなされているときには当該書き込みセットをアボートし、更新がなされていないときには前記シャドウコピーを用いて自身のデータベースを更新するとともに、この更新記録をトランザクションログとして生成するステップと、前記でトランザクション最小値がクラスタ最小値よりも小さい場合には、当該書き込みセットをアボートするステップと、前記トランザクションログを前記送信元の下位マスタノードを含む下位マスタノードに配信するステップと、前記下位マスタノードにおいて、前記で受信したトランザクションログに基づいて自身のデータベースを更新するステップと、前記上位マスタノードが保持するクラスタ最小値を下位マスタノードに通知して、該最小値よりも小さいトランザクション最小値を有するトランザクションを廃棄させるステップと、からなるマスタノードを階層的に有する追記型データベースの管理方法である。
 本発明の請求項2は、前記下位マスタノードは、実行中のトランザクションを時系列に記録した複数のスナップショット間のトランザクション最小値同士を比較して最も小さい値をノード最小値とし、このノード最小値をツリー最小値として上位マスタノードに通知し、前記上位マスタノードは、自身のノード最小値と、前記1または2以上の下位マスタノードから通知されたツリー最小値とから選択的にクラスタ最小値を決定・保持する請求項1記載の追記型データベースの管理方法である。
 本発明の請求項3は、前記上位マスタノードと前記下位マスタノードとの間の階層に中位マスタノードを有しており、前記下位マスタノードは、実行中のトランザクションを時系列に記録した複数のスナップショット間のトランザクション最小値同士を比較して最も小さい値をノード最小値とし、このノード最小値をツリー最小値として中位マスタノードに通知し、前記中位マスタノードは、自身のノード最小値と、前記1または2以上の下位マスタノードから通知されたツリー最小値とを比較して最も小さい値を当該中位マスタノードのツリー最小値として上位マスタノードに通知し、上位マスタノードは、自身のノード最小値と、前記1または2以上の中位マスタノードから通知されたツリー最小値とから選択的にクラスタ最小値を決定・保持する請求項1記載の追記型データベースの管理方法である。
 本発明の請求項4は、前記中位マスタノードはさらに2階層以上のツリー構造を有している請求項3記載の追記型データベースの管理方法である。
 本発明の請求項5は、前記上位マスタノードが保持するクラスタ最小値の下位マスタノードへの通知は、前記トランザクションログの下位マスタノードへの通知とは非同期で行われる請求項1記載の追記型データベースの管理方法である。
 この方法によれば、レプリケーション管理プロセスと非同期にクラスタ最小値を下位マスタノードに通知することにより、効率的なトランザクションIDの廃棄処理ができる。
 本発明の請求項6は、前記上位マスタノードが保持するクラスタ最小値の下位マスタノードへの通知は、前記トランザクションログに当該クラスタ最小値を含めて行われる請求項1記載の追記型データベースの管理方法である。
 この方法によれば、レプリケーション管理プロセスの中にクラスタ最小値を含めることによって、通知順を強制することができるため、矛盾のないトランザクションIDの廃棄が可能になる。
 本発明の請求項7は、前記書込セットは、下位マスタノードの代わりに中位マスタノードで生成され、少なくとも当該中位マスタノードで実行中のトランザクションが参照するスナップショットのトランザクション最小値が書き込まれている請求項3または4記載の追記型データベースの管理方法である。
 本発明によれば、マルチマスタノード形式のデータベースにおいても、データベース全体の整合性を崩すことなく、より大きな最小値IDレベルでツリー全体の完全消去を実現することができる。
本願発明のマルチノード形式のデータベース構造を示す説明図 データベース制御部の構成を示すブロック図 書込みセットの内容を示す図 上位マスタノードにおける書込みセットの処理を示す説明図 トランザクションログデータの構成を示す説明図 マルチノード形式のデータベースツリー構造とトランザクション最小値とツリー最小値とノード最小値との関係を示す図 クラスタ最小値の更新と、そのクラスタ最小値を用いたトランザクションの廃棄処理の説明図 スナップショットの内容を示す図
 以下、本発明の実施の形態を図面を参照して説明する。
 図1は、本実施形態の階層的マスタノードの構造を示している。同図に示すように、上位マスタノード(MS101)の下に階層的に中位マスタノード(MS201,MS202・・・MS20n)や、下位マスタノード(MS301,MS302・・・MS30n)を有するノード構成となっている。各ノード(情報処理装置)にはデータベースを有している。また上位マスタノード(MS101)にはスレーブを有しているが、他の下位マスタノードにもスレーブを有していてもよい。このようなマスタ・スレーブ構成の場合には両者間のデータベースの更新には本出願人によるPCT/JP2010/054311(本出願人による未公開先行出願)に記載された更新管理技術を適用することができる。
 図2は、下位マスタノード(MS201)の機能ブロック図であるが、上位マスタノード(MS101)も同様の機能を有している。
 同図に示すように、クライアント(CL)からデータベースの更新命令が入力されるとデータベース処理部(11b)は、メモリ(MM)上に構築されたバックエンドメモリ(BEM)上で書込セットを生成する。この書込セットは図4に示すようにヒープタプルマップ(HTM)とシャドウコピー(SC)とで構成される。ここでは、マスタデータベース(101a)の行番号4を削除(DELETE)し、行番号5を新たな値(sc1)に書き換える(UPDATE)する更新命令が入力されたものと仮定する。
 このとき、データベース処理部11bは、マスタデータベース(11a)を参照しながら当該マスタデータベース(11a)に直接書き込むことは行わずに、バックエンドメモリ(BEM)で生成された書込セットを通信モジュール(11d)より上位マスタに送信する。
 このような処理は上位マスタノード(MS101)においても、下位マスタノード(MS201,MS202・・・MS20nや、MS301,MS302・・・MS30n)においても同様である。
 図8は、各ノード(上位ノード、中位ノードまたは下位ノード)におけるトランザクションとそのスナップショットとの関係を示している。各ノードでは複数のトランザクションが並行して実行されており、複数のそれぞれの時点での時系列にトランザクションの実行状態を示すスナップショットが複数保持されている。
 同図においてこのノードでは、トランザクションID=2,4,5,6および9が実行中である。また、トランザクションID=1,3,7,8および10はコミットされている。また、トランザクションID=11は未実行状態である。この時点でのスナップショットには、実行中またはコミットされたトランザクションの最大値をトランザクション最大値(ここではXmax=10)として、実行中のトランザクションの最小値をトランザクション最小値(ここではXmin=2)として記録されている。
 このようなスナップショットは、前述のバックエンドメモリ(BEM)に記録されるようになっている。
 これらのスナップショット間の複数のトランザクション最小値の中で、最も小さい値がノード最小値となる。同図では、スナップショット701のトランザクション最小値が2(Xmin=2)であり、スナップショット702のトランザクション最小値が4(Xmin=4)であるので、ノード最小値は2(Nmin=2)となる。なお、下位マスタノードにさらに下位のノードが無い場合には、当該ノード最小値(Nmin=2)がツリー最小値(Tmin=2)となる。
 下位マスタノード(たとえばMS301)で生成されたノード最小値(Nmin)、すなわちツリー最小値(Tmin)は、後述する書込セットとは非同期で随時中位ノード(たとえばMS201)に通知される。この中位マスタノード(MS201)ではそれぞれの下位マスタノード(MS301~MS30n)から受信したツリー最小値(Tmin)と自身のスナップショット中のノード最小値(Nmin)とを比較して、より小さい値を自身のツリー最小値(Tmin)として更新する。
 次に、それぞれの中位マスタノード(MS201~MS20n)のツリー最小値(Tmin)は上位マスタノード(MS101)に通知される。
 上位マスタノード(MS101)では、それぞれの中位マスタノード(MS201~MS20n)から受信したツリー最小値(Tmin)を受信すると、自身のスナップショット中のノード最小値(Nmin)とを比較して、いずれかの最小値またはその最小値間の値を採用して自身のツリー最小値(Tmin)を更新する。そして、このツリー最小値(Tmin)とその時点でのクラスタ最小値(Cmin)を比較して、その間の値をとって新たなクラスタ最小値(Cmin)を決定・更新する。
 次に、図6を用いて下位マスタノードE,Fのノード最小値(Nmin)すなわちツリー最小値(Tmin)、中位マスタノードB,C,D,Eのツリー最小値(Tmin)および上位マスタノードAのツリー最小値(Tmin)とクラスタ最小値(Cmin)とが更新される状態を説明する。
 ここで、下位マスタノードFのトランザクション最小値(Xmin)同士を比較した結果、ノード最小値(Nmin)が3、下位マスタノードGの最小値(Nmin)が4の場合、これらの下位マスタノードF,Gにはさらに下の階層が無いので、これらのノード最小値(Nmin)がそれぞれのツリー最小値(Tmin)となる。
 これらのツリー最小値(Tmin=3,Tmin=4)がそれぞれ中位マスタノードDに通知される。
 中位マスタノードDでは、ノード最小値として4を有しており、これらが比較されて最も低い値(ここでは3)が中位ノードDのツリー最小値として設定される(Tmin=3)。
 一方、中位マスタノードEでは、ノード最小値(Nmin)が5であり、このノードは下位マスタノードを有していないため、当該ノード最小値(Nmin=5)がツリー最小値(Tmin=5)として設定される。
 中位マスタノードCでは、中位マスタノードDからのツリー最小値(Tmin=3)と中位マスタノードEからのツリー最小値(Tmin=5)とを受信する。一方、中位マスタノードCでは自身のノード最小値(Nmin)として4を有しており、これらを比較して最も小さい値である3を自身のツリー最小値(Tmin=3)として更新する。そしてこのツリー最小値は上位マスタノードAに通知される。
 一方、同図では、前記中位マスタノードCと並列な中位マスタノードBが存在しているが、この中位マスタノードBには下の階層のマスタノードが無いため、自身のノード最小値(Nmin=6)がそのままツリー最小値(Tmin=6)として上位マスタノードAに通知される。
 上位マスタノードAでは、中位マスタノードBからのツリー最小値(Tmin=6)と、中位マスタノードCからのツリー最小値(Tmin=3)とを受信して、自身のノード最小値(Nmin=7)と比較して、これらの中で最も小さい値を上位マスタノードAにおけるツリー最小値(Tmin=3)として更新する。
 そしてマスタノードAでは、自身のノード最小値(Nmin=7)と、更新されたツリー最小値(Tmin=3)との間の数値をクラスタ最小値(Cmin)として設定する。
 このときのクラスタ最小値(Cmin)の決定基準としては、クラスタ最小値をより小さい値(たとえばCmin=3)とすれば、全てのノードのスナップショット上のトランザクション最小値が3以上になるので、下位・中位マスタノードで生成される書込セットが上位マスタノードに到達したときにアボートされる確率は低くなり、無駄になる書込セットが少なくなり各ノードでの負荷は低減される。一方、完全消去の基準が小さい値となってしまうために、ノード全体の完全消去による効率的運用は図りにくくなる。
 それとは逆に、クラスタ最小値(Cmin)をより大きな値(たとえばCmin=7)とすれば、完全消去の効率は良くなるが、中位・下位マスタノードで生成された書込セットが上位マスタノードに到着したときにアボートされる確率が高くなり、中位・下位マスタノードにおける書込セットの負荷は大きくなる。
 このようなクラスタ最小値(Cmin)の設定方法は、あらかじめノード最小値(Nmin)とツリー最小値(Tmin)との規定差分値を定めておき、この規定差分値を越えた場合には強制的に規定差分内となるような基準値に制御してもよい。
 このようにクラスタ最小値(Cmin)が設定されると、このクラスタ最小値(Cmin)に基づいてタプルの完全消去が行われる。つまり、上位マスタノードにおいて、このクラスタ最小値(Cmin)より小さいトランザクションIDを持つトランザクションによって削除されたタプルを完全消去することができる。そして上位マスタノードで完全消去されたタプルは、以下で説明するトランザクションの廃棄と書き込みセットのアボート処理とによって、中位・下位マスタノードでも安全に完全消去できることになる。
 上位マスタノードAで設定・更新されたクラスタ最小値(たとえばCmin=6)は、図7に示すように、中位マスタノードB,C,D,Eおよび下位マスタノードF,Gに通知される。このクラスタ最小値(Cmin=6)を受信した各ノードでは、この値(Cmin=6)よりも小さいトランザクション最小値を持つスナップショットを参照しているトランザクションを全て廃棄する。これによって、各ノードでのトランザクション最小値(Xmin)、ノード最小値(Nmin)、それらに基づくツリー最小値(Tmin)は必ず6よりも大きな値をとる。したがって、クラスタ最小値(Cmin)の通知後は完全消去されたタプルを参照するトランザクションは存在しなくなる。
 なお、図6および図7では、上位マスタノードA、2階層の中位マスタノードB,C,D,E、下位マスタノードE,Fからなる4階層のツリー構造を有するマルチマスタノードで説明したが、上位マスタノードと下位マスタノードの2階層構造、または中位マスタノードが3階層以上すなわち全体で5階層以上のツリー構造を有していてもよい。
 次に、図3を用いて書込セットの生成およびそれを用いた更新について説明する。
 同図は、下位マスタノード(一例としてM301)におけるマスタデータベース(11a)と、書込セットとの関係を示している。マスタデータベース(201a)は行番号と、命令内容と、ポインタとによって構成されており、新たな命令がクライアント端末(CL)からなされる毎に行番号が追加されていく追記型のデータベースである。同図の場合、前記で説明したように、行番号4を削除(DELETE)し、行番号5を新たな命令内容に書き換える(sc1にUPDATE)する場合を示している。
 下位マスタノード(MS301)においてクライアント端末(CL)からの命令によりマスタデータベースに対してこのような更新命令がなされると、前述のように、バックエンドメモリ(BEM)上でヒープタプルマップ(HTM、ヒープファイル)とシャドウコピー(SC)とトランザクション最小値(Xmin)からなる書込セットが生成される。
 ヒープタプルマップ(HTM)には、元の行番号(ctid)と、新しい行の行番号(sctid)が関係付けられて登録されるようになっている。このようにヒープタプルマップ(HTM)はデータベースの更新毎に追加生成されていく。なお、行番号5の命令内容(sc1)が書き込まれる行番号はこの段階ではまだ不明であるため、sctidには新しい命令(sc1)を書き込んでおく。
 一方、シャドウコピー(SC)には、マスタデータベース(11a)を参照して書き換えられるべき行番号のシャドウコピーを生成する。このとき、新たに追加される行番号はこの段階では不明であるので、行番号には新たな命令(sc1)を書き込んでおく。
 なお、この段階で下位マスタノード(MS301)のデータベース処理部(11b)は、ヒープタプルマップ(HTM)の生成によりDELETE命令が適用される行番号4と、UPDATE命令が適用される旧行番号5は削除されることが既にわかるため、シャドウコピー(SC)としては新たな命令(sc1)だけを書き込んでおいてもよい。
 さらに、書込セットに付加されるトランザクション最小値(Xmin)は、前記で説明したように実行中のトランザクションが参照しているスナップショット上に記録されているトランザクション最小値(Xmin)をそのまま書き込む。
 このようにして生成された書込セットは、当該下位マスタノード(MS301)から中位マスタノード(たとえばMS201)、さらに上位マスタノード(MS101)に送信される。
 上位マスタノード(MS101)において、データベース処理部11b(中央処理装置(CPU))は、前記で受信した書込セットからトランザクション最小値(Xmin)を読み出す。そして、このトランザクション最小値(Xmin)と上位マスタノード(MS101)のバックエンドメモリ(BEM)に保持されたクラスタ最小値(Cmin)と比較する。このとき、トランザクション最小値(Xmin)がクラスタ最小値(Cmin)と等しいか大きいときには、トランザクションログ処理部(11c)を起動してトランザクションログデータの生成を開始した後に、以下の処理を行う。
 まず、ヒープタプルマップ(HTM)を読み出して、自身のマスタデータベース11aと比較する。ここで、ターゲットとなっているタプル(ここでは行番号4,5および7)の内容がデータベース(11a)上で更新されているか否かを検証する。図4では、行番号4~6については未更新であるため、行番号4に削除ポインタを付与し、書き換えられる旧番号5にも削除ポインタを付与する。そして、新たな行番号7に新しい命令(sc1)が書き込まれる。
 下位マスタノード(M301)からの書込セット中のヒープタプルマップ(HTM)と自身のデータベースを比較して、上位マスタノード(M101)において既に別の書込セットによって当該行が更新されているときには、当該書込セットによる処理はアボート(中断)される。
 一方、書込セット内のトランザクション最小値(Xmin)とクラスタ最小値(Cmin)と比較して、トランザクション最小値(Xmin)がクラスタ最小値(Cmin)よりも小さいときには、当該書込セットをアボートする。
 このように書込セットをアボート処理する理由を以下に説明する。
 書込セットの中にはクラスタ最小値(Cmin)よりも小さいトランザクションIDを持つトランザクションが削除したタプルが更新対象となっている可能性がある。このようなタプルは上位マスタノードのクラスタ最小値(Cmin)の設定に基づいて、既に廃棄されている可能性が高い。その場合、ヒープタプルマップを用いてこのタプルに対する整合性検出ができないので、上位マスタノードに矛盾を生じてしまう。そのため、クラスタ最小値(Cmin)よりも小さいトランザクション最小値(Xmin)を有する書込セットをアボートして係る矛盾の発生を防止しているわけである。
 クラスタ最小値(Cmin)の通知によるトランザクションの廃棄が中位・下位マスタノードで完了すれば、このような書込セットは生成されない。しかし、クラスタ最小値(Cmin)を上位マスタノードから下位マスタノードに通知している間に中位・下位マスタノードで生成された書込セットは、クラスタ最小値(Cmin)より小さいトランザクション最小値を持つ可能性があるので、書込セットを上位マスタノードで適用する際にチェックする必要がある。そこで前述のように、書込セットに登録されたトランザクション最小値(Xmin)とクラスタ最小値(Cmin)とを比較して、トランザクション最小値(Xmin)が小さい場合には書込セットをアボートするようにして解決しているわけである。
 このように、クラスタ最小値(Cmin)の通知により、完全消去されたタプルを参照するトランザクションを全て廃棄することができ、前記通知(Cmin)の通知と入れ違いに作成された書き込みセットもクラスタ最小値(Cmin)を基準にアボートできる。したがって、中位・下位ノードでもデータベースの整合性を損なわずにタプルを完全消去することができる。
 図5は、上位マスタノード(MS101)のマスタデータベース(11a)が上記により更新されたときにトランザクションログ処理部(11c)で生成されるトランザクションログデータの一例である。このトランザクションログは、少なくとも命令とトランザクション内容(行番号とそれに対する実行処理内容)が時系列で連続的に記録されたファイルである。
 同図によればトランザクションの開始命令(XB1)に続いて、命令番号と行番号とが対になったログが順次生成されている。たとえば、最初にDELETE命令(D1)として行番号4を削除し(D14)、次にUPDATE命令(U1)として行番号5を削除し行番号7を追加し(U157)次にこれらのコミット命令(XC1)を発行する。なお、このトランザクションログデータには、クラスタ最小値(Cmin=6)を追加してもよい。このようにクラスタ最小値(Cmin=6)を含めることによって、中位マスタノードB,C,D,Eまたは下位マスタノードF,Gにおけるトランザクションの廃棄順を制御することが可能となる。
 なお、前述したようにこのトランザクションログデータとは非同期にクラスタ最小値(Cmin=6)を中位マスタノードB,C,D,Eおよび下位マスタノードF,Gに通知する場合には、前述のトランザクションログデータの生成・送信を待つことなく効率的なトランザクションの廃棄処理が可能となる。
 このトランザクションログデータは、通信モジュール(11d)より中位マスタノード(MS201)をはじめ、すべての下位マスタノード(MS302・・・MS30n)に対して配信される。
 前記トランザクションログデータを受信した中位・下位マスタノードでは、当該トランザクションログデータを自身のデータベースに複製(レプリケーション)する。
 具体的には、下位マスタノード(たとえばM302)が図5に示したトランザクションログデータを通信モジュール11dで受信すると、トランザクションログ処理部11cを起動してこのトランザクションログデータを自身のマスタデータベース11aにレプリケーションする。この結果、行番号4と5に削除ポインタが付与され、新たな行番号7が追加される。そして、このトランザクションログデータにクラスタ最小値(Cmin=6)が追記されている場合には、各マスタノードにおいて、このクラスタ最小値(Cmin=6)よりも小さいトランザクション最小値(Xmin)を持つスナップショットを参照するトランザクションが全て廃棄される。
 このように、中位・下位マスタノードでは上位マスタノードから送信されるトランザクションログデータのレプリケーションによって統一的にデータベースが管理されることになる。
 以上、本発明を実施形態に基づいて説明したが、本発明はこれに限定されるものではない。以下、その変形例について説明する。
 (上位マスタノードMS101でデータベースの更新が行われる場合)
 下位マスタノード(たとえばMS301)でマスタデータベースの更新命令が発生した場合の処理については、図2で説明したように、バックエンドメモリ(BEM)上でヒープタプルマップ(HTM、ヒープファイル)とシャドウコピー(SC)とからなる書込セットが生成されるが、上位マスタノード(MS101)でマスタデータベースの更新命令が発生した場合には、上位ノードに通知する必要がないため、書込セットは生成されない。すなわち、このような場合、上位ノード(MS101)では、図4の左図に示すようにマスタデータベース(11a)に対して直接更新データの書込が行われるとともに、図5に示すトランザクションログデータが生成される。このトランザクションログデータは下位マスタノードに配信され、前記トランザクションログデータを受信した下位マスタノードでは、当該トランザクションログデータを自身のマスタデータベースにレプリケーションする。
 (下位マスタノードで書込セットを生成している段階で検索処理が実行されたとき)
 下位マスタノード(たとえばMS101)において、図3に示すような書込セットを生成している段階で、当該下位マスタノードのマスタデータベースに対して検索が実行されたとき、書込セットの生成された行番号以外の行番号を対象とした検索であれば問題はないが、該当行(ここでは行番号4および行番号5)に対する検索である場合、これらの行番号に対しては既に実質的な更新処理が行われているため、マスタデータベースの該当行を検索したとしても正確な検索結果は得られない。
 このような場合、データベース処理部(11b)は、まずヒープタプルマップ(HTM)を参照して、検索該当行番号がエントリされているか否かをチェックする。たとえば図3に示す例で、検索対象が行番号3である場合、データベース処理部(11b)は、メモリ(MM)上に構築されたバックエンドメモリ(BEM)上の書込セット内のヒープタプルマップ(HTM)を参照して、該当行(行番号3)がエントリされているか否かを判定する。図3の例では、該当行はエントリされていない。その場合には、マスタデータベース201aに直接アクセスして該当行(行番号3)を検索する。
 一方、図3に示す例で、検索対象が行番号4である場合、データベース処理部(11b)は書込セット内のヒープタプルマップ(HTM)を参照したときに、該当行(行番号4)がエントリされていることを検出することになる。この場合、マスタデータベース201aにアクセスしても、残存する該当行は既に削除する更新命令が実行されているため、検索対象としても意味がない。この場合、データベース処理部(11b)は、ヒープタプルマップ(HTM)を参照して該当行(行番号4)が削除されていることを検出する。このように、検索対象行が削除されているため、データベース処理部(11b)は該当行を検索対象とはしない。
 一方、図3に示す例で、検索対象が行番号5である場合、上記と同様に、ヒープタプルマップ(HTM)を参照して該当行(行番号5)に対応するシャドウコピー(SC1)が作成されていることを検出する。
 このとき、データベース処理部(11b)は、シャドウコピー(SC1)を参照して、行番号5を書き換えた内容を検索対象とすればよい。
 以上の説明では、1行毎にヒープタプルマップ(HTM)を参照する場合で説明したが、このような処理方法に限らず、検索を行う際にデータベース処理部(11b)は、まず一括的にヒープタプルマップ(HTM)を参照して、ここにエントリされている行番号の全てを削除されたものとしてこれらを除外してマスタデータベース(201a)を検索しその後、再度ヒープタプルマップ(HTM)を参照してそのエントリに基づいて該当行を検索対象から除外したり(行番号4の場合)、シャドウコピー(SC1)を検索対象としてもよい。
 (下位マスタで上位マスタからのトランザクションログデータによる更新が行われているときの競合が生じた場合)
 上位マスタから配信されたトランザクションログデータによって下位マスタノードのデータベースにレプリケーションが行われているときに、該当行に対して下位マスタのデータベースの更新命令が実行されている場合、競合が発生することになる。
 具体的には、下位マスタノードへの更新命令に基づいて行番号4と5とを更新しているときに、上位マスタから行番号5に関するトランザクションログデータが配信されてきたときがこれに該当する。
 このような場合には、下位マスタノードで作成された書込セットが上位マスタノードに送信されたとしても、上位マスタノードでは既に該当行に関するトランザクションログデータが配信されているため、前記書込セットは上位マスタノードで競合が検出されてアボートされることになる。したがって、当該下位マスタノードにおける競合は無視して差し支えない。この方法によれば、上位マスタノードにおいて本来アボートされるのがわかっているような書込セットでも上位マスタノードに送信しなければならず、上位マスタノードおよび下位マスタノードでのそれぞれの負担は増加するものの、上位マスタノードからのトランザクションログデータを下位マスタノードでレプリケーションする段階で一々競合のチェックを行わなくてよいため、処理が高速化できるという利点がある。
 一方、このような下位マスタノードでの競合を解決する別の方法としては、下位マスタノードにおいてヒープタプルマップ(HTM)を生成したときに、これを当該下位マスタノード内のメモリに登録し、このメモリを共有メモリとして、他の下位マスタノードからアクセス可能な状態としておく。このような他の下位ノードマスタ間のアクセスは、それぞれの下位マスタノードのデータベース処理部11bが行う。この方法によれば、ヒープタプルマップ(HTM)の生成時に競合をチェックするため、トランザクションログデータによるレプリケーションが遅延する可能性はあるものの、競合の問題を下位マスタノード間だけで解決できるので、上位マスタノードに負担をかけない。
 以上、本発明を実施形態に基づいて説明したがこれらに限定されるものではない。
 たとえば、書込セットは下位マスタノード(MS301)で生成する場合で説明したがこれに限らず中位マスタノード(MS201)で生成してもよいことは勿論である。
 本発明は、階層構造を備えたマルチマスタノード構造のデータベース管理システムに利用できる。
MS101 上位マスタノード
SL スレーブ
MS201,MS202・・・MS20n 中位マスタノード
MS301,MS302・・・MS30n 下位マスタノード
CL クライアント端末
11a マスタデータベース
11b データベース処理部
11c トランザクションログ処理部
11d 通信モジュール
BEM バックエンドメモリ
HTM ヒープタプルマップ
SC シャドウコピー
Cmin クラスタ最小値
Xmin トランザクション最小値

Claims (7)

  1.  レコード更新が可能な上位と下位のマスタノードを階層的に有する追記型データベースの管理方法であって、
     いずれかの下位マスタノードのセッションにおいて、上位マスタノードに対して、当該下位のマスタノードのデータベースのシャドウコピーと、自身のメモリ上に展開されたヒープタプルマップと、実行中のトランザクションが参照するスナップショットのトランザクション最小値とを書き込みセットとして送信するステップと、
     前記上位マスタノードにおいて、前記下位マスタノードから受信した書き込みセット中のトランザクション最小値と上位マスタノードが保持するクラスタ最小値とを比較して、トランザクション最小値がクラスタ最小値と等しいか大きい場合には、当該書き込みセット中のヒープタプルマップと自身のデータベースとを比較して、ターゲットとして登録されているタプルのデータベースにおける更新の有無を検証し、更新がなされているときには当該書き込みセットをアボートし、更新がなされていないときには前記シャドウコピーを用いて自身のデータベースを更新するとともに、この更新記録をトランザクションログとして生成するステップと、
     前記でトランザクション最小値がクラスタ最小値よりも小さい場合には、当該書き込みセットをアボートするステップと、
     前記トランザクションログを前記送信元の下位マスタノードを含む下位マスタノードに配信するステップと、
     前記下位マスタノードにおいて、前記で受信したトランザクションログに基づいて自身のデータベースを更新するステップと、
     前記上位マスタノードが保持するクラスタ最小値を下位マスタノードに通知して、該最小値よりも小さいトランザクション最小値を有するトランザクションを廃棄させるステップと、
    からなるマスタノードを階層的に有する追記型データベースの管理方法。
  2.  前記下位マスタノードは、実行中のトランザクションを時系列に記録した複数のスナップショット間のトランザクション最小値同士を比較して最も小さい値をノード最小値とし、このノード最小値をツリー最小値として上位マスタノードに通知し、
     前記上位マスタノードは、自身のノード最小値と、前記1または2以上の下位マスタノードから通知されたツリー最小値とから選択的にクラスタ最小値を決定・保持する請求項1記載の追記型データベースの管理方法。
  3.  前記上位マスタノードと前記下位マスタノードとの間の階層に中位マスタノードを有しており、
     前記下位マスタノードは、実行中のトランザクションを時系列に記録した複数のスナップショット間のトランザクション最小値同士を比較して最も小さい値をノード最小値とし、このノード最小値をツリー最小値として中位マスタノードに通知し、
     前記中位マスタノードは、自身のノード最小値と、前記1または2以上の下位マスタノードから通知されたツリー最小値とを比較して最も小さい値を当該中位マスタノードのツリー最小値として上位マスタノードに通知し、
     上位マスタノードは、自身のノード最小値と、前記1または2以上の中位マスタノードから通知されたツリー最小値とから選択的にクラスタ最小値を決定・保持する請求項1記載の追記型データベースの管理方法。
  4.  前記中位マスタノードはさらに2階層以上のツリー構造を有している請求項3記載の追記型データベースの管理方法。
  5.  前記上位マスタノードが保持するクラスタ最小値の下位マスタノードへの通知は、前記トランザクションログの下位マスタノードへの通知とは非同期で行われる請求項1記載の追記型データベースの管理方法。
  6.  前記上位マスタノードが保持するクラスタ最小値の下位マスタノードへの通知は、前記トランザクションログに当該クラスタ最小値を含めて行われる請求項1記載の追記型データベースの管理方法。
  7.  前記書込セットは、下位マスタノードの代わりに中位マスタノードで生成され、少なくとも当該中位マスタノードで実行中のトランザクションが参照するスナップショットのトランザクション最小値が書き込まれている請求項3または4記載の追記型データベースの管理方法。
PCT/JP2011/065353 2011-07-05 2011-07-05 データベースの管理方法 WO2012169080A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
PCT/JP2011/065353 WO2012169080A1 (ja) 2011-07-05 2011-07-05 データベースの管理方法
US13/542,324 US9251195B2 (en) 2011-07-05 2012-07-05 Method of managing database
EP12175043A EP2544107A1 (en) 2011-07-05 2012-07-05 Method of managing a database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2011/065353 WO2012169080A1 (ja) 2011-07-05 2011-07-05 データベースの管理方法

Publications (1)

Publication Number Publication Date
WO2012169080A1 true WO2012169080A1 (ja) 2012-12-13

Family

ID=47295677

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2011/065353 WO2012169080A1 (ja) 2011-07-05 2011-07-05 データベースの管理方法

Country Status (1)

Country Link
WO (1) WO2012169080A1 (ja)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06215032A (ja) * 1992-12-04 1994-08-05 Internatl Business Mach Corp <Ibm> 分散トランザクション処理システムのデータベースの信頼性と応答時間を向上させる方法および装置
JPH0855048A (ja) * 1994-03-30 1996-02-27 Siemens Stromberg Carlson データベース管理システム及び方法
WO2010106991A1 (ja) * 2009-03-19 2010-09-23 株式会社ココリンク データの複製管理方法及びシステム
JP2010218159A (ja) * 2009-03-16 2010-09-30 Nec Corp 管理装置、データベース管理方法、及びプログラム

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06215032A (ja) * 1992-12-04 1994-08-05 Internatl Business Mach Corp <Ibm> 分散トランザクション処理システムのデータベースの信頼性と応答時間を向上させる方法および装置
JPH0855048A (ja) * 1994-03-30 1996-02-27 Siemens Stromberg Carlson データベース管理システム及び方法
JP2010218159A (ja) * 2009-03-16 2010-09-30 Nec Corp 管理装置、データベース管理方法、及びプログラム
WO2010106991A1 (ja) * 2009-03-19 2010-09-23 株式会社ココリンク データの複製管理方法及びシステム

Similar Documents

Publication Publication Date Title
CN104793988B (zh) 跨数据库分布式事务的实现方法和装置
CA2913036C (en) Index update pipeline
TWI468961B (zh) 用於實施多使用者快取的參數化單元之方法及系統
US10754854B2 (en) Consistent query of local indexes
CN108509462B (zh) 一种同步活动事务表的方法及装置
US9576038B1 (en) Consistent query of local indexes
JP4951141B2 (ja) データベースの管理方法
US11151157B2 (en) Database management method
JP5283768B2 (ja) データベースの管理方法、データベース管理システム、およびプログラム
WO2012169080A1 (ja) データベースの管理方法
JP6239697B2 (ja) データベースの管理方法
WO2013076819A1 (ja) データベースの管理方法
JP5832592B1 (ja) データ管理装置
US9128976B2 (en) Offline restructuring of DEDB databases
JP6247791B2 (ja) データベースシステム及びクエリ実行方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11867443

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11867443

Country of ref document: EP

Kind code of ref document: A1