JP5432596B2 - Log file management device, log file management system, log file management method and program thereof - Google Patents

Log file management device, log file management system, log file management method and program thereof Download PDF

Info

Publication number
JP5432596B2
JP5432596B2 JP2009131387A JP2009131387A JP5432596B2 JP 5432596 B2 JP5432596 B2 JP 5432596B2 JP 2009131387 A JP2009131387 A JP 2009131387A JP 2009131387 A JP2009131387 A JP 2009131387A JP 5432596 B2 JP5432596 B2 JP 5432596B2
Authority
JP
Japan
Prior art keywords
log
file management
commit
record data
log file
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
Application number
JP2009131387A
Other languages
Japanese (ja)
Other versions
JP2010277473A (en
Inventor
美樹 境
大子郎 横関
正圭 韓
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 JP2009131387A priority Critical patent/JP5432596B2/en
Publication of JP2010277473A publication Critical patent/JP2010277473A/en
Application granted granted Critical
Publication of JP5432596B2 publication Critical patent/JP5432596B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は、レコードデータの更新作業に基づいて、レコードデータそれぞれの更新内容を示すコミットログを生成して蓄積した共有ファイルを作成し、不要となったコミットログを削除する契機を同期する技術に関する。   The present invention relates to a technique for creating a shared file that generates and accumulates a commit log indicating the update contents of each record data based on a record data update operation, and synchronizes a trigger for deleting a commit log that is no longer needed. .

従来、分散システムにおけるデータベースの管理では、同一スキーマのレコードデータが集まったレコード集合毎に、更新するレコードデータの前回の更新からの差分情報である、更新差分情報に識別情報を付与したもの(以下、「コミットログ」という)をファイルしたコミットログファイルが準備されていた。しかし、この方式では、クライアント装置から複数のレコード集合への更新が発生すると、レコード集合毎にコミットログファイルを備えるため、コミットログファイルへのアクセスに伴うI/O(Input/Output)の回数が増加してネットワークの負荷が増大し、データベース更新のレスポンス等が悪化するという問題点があった。   Conventionally, in database management in a distributed system, for each record set in which record data of the same schema is collected, identification information is added to update difference information, which is difference information from the previous update of record data to be updated (hereinafter referred to as “difference information”). , "Commit log" file) was prepared. However, in this method, when an update from a client apparatus to a plurality of record sets occurs, a commit log file is provided for each record set, so the number of I / O (Input / Output) times associated with access to the commit log file is reduced. There is a problem that the network load increases to increase the response of the database update.

上記問題点に対して、同一スキーマのレコードデータが集まったレコード集合毎に、コミットログファイルを準備するのではなく、複数のレコード集合で、1つのコミットログファイルを共有して書き込みを実施する方式が提案されている。この方式では、1度に複数のレコード集合への更新が発生した場合、それらの更新すべき情報をまとめて一括して更新することが可能となり、データベース更新のレスポンス等の向上が望める。ところが、コミットログは更新ごとに生成されるため、これを放置しておくと膨大になる。   To solve the above problem, a commit log file is not prepared for each record set in which record data of the same schema is collected, but a single commit log file is shared and written by a plurality of record sets. Has been proposed. In this method, when updates to a plurality of record sets occur at a time, it is possible to collectively update the information to be updated, and it is possible to improve the response of the database update. However, since the commit log is generated for each update, if it is left unattended, it becomes enormous.

そこで、ある所定時間が経過したコミットログを削除する方式がある。この方式では、所定期間毎にレコード集合のスナップショットを取得し、その取得した期間より過去の期間を所定期間として、コミットログを削除する。これにより、取得したスナップショットと残ったコミットログファイルでレコード集合の復元が可能になる。   Therefore, there is a method for deleting a commit log after a predetermined time has elapsed. In this method, a snapshot of a record set is acquired every predetermined period, and the commit log is deleted with a period before the acquired period as a predetermined period. As a result, the record set can be restored with the acquired snapshot and the remaining commit log file.

また、ある所定量のコミットログが蓄積した時点で、その所定量を超えた古いコミットログを削除する方式もある。所定量のコミットログが蓄積した時点でスナップショットを取得し、その取得した時点より過去のコミットログを削除することにより、このスナップショットと残ったコミットログファイルでレコード集合の復元が可能になる(例えば、非特許文献1参照)。   There is also a method of deleting old commit logs exceeding a predetermined amount when a predetermined amount of commit logs are accumulated. A snapshot is acquired when a predetermined amount of commit logs are accumulated, and the previous commit log is deleted from the acquired point, so that a record set can be restored with this snapshot and the remaining commit log file ( For example, refer nonpatent literature 1).

また、複製元のデータベースを有するマスタ記憶装置のレコードデータと全く同じ内容をレプリケーションにより複製したデータベースを有する複製先のレプリカ記憶装置を複数配置した構成においても、上記のようにある所定期間が経過した時点又はある所定量が蓄積した時点をマスタ記憶装置とレプリカ記憶装置との間で通知することにより、コミットログの削除が可能になる。   In addition, even in a configuration in which a plurality of replication destination replica storage devices having a database in which the same contents as the record data of the master storage device having the replication source database are replicated are arranged, a certain period of time has elapsed as described above. By notifying the time point or the time point when a predetermined amount is accumulated between the master storage device and the replica storage device, the commit log can be deleted.

「連載 ORACLE MASTER Silver DBA ポイント解説 第3回 制御ファイルとREDOログ・ファイルの管理」,小野寺智子,IT自分戦略研究所,[online], 2004年8月27日,[2009年4月16日検索],インターネット, <URL:http://jibun.atmarkit.co.jp/Iskill01/rensai/omsdb03/omsdb01.html>"Series ORACLE MASTER Silver DBA point explanation 3rd control file and redo log file management", Tomoko Onodera, IT Self Strategic Research Institute, [online], 2004 August 27, [April 16, 2009 search ], Internet, <URL: http://jibun.atmarkit.co.jp/Iskill01/rensai/omsdb03/omsdb01.html>

しかしながら、上記のように複数のレコード集合体のコミットログを1ファイルにまとめた場合には、各レコード集合からスナップショットを取得するタイミングが必ずしも同一ではないので、所定時間経過後又はコミットログが所定量に蓄積したことを契機としてまうと、本来必要なコミットログまで削除してしまうおそれがある。よって、どのコミットログから過去のものを削除していいかを判定する必要がある。   However, when the commit logs of a plurality of record aggregates are combined into one file as described above, the timing for acquiring a snapshot from each record aggregate is not necessarily the same. There is a risk that even the commit log that is originally necessary will be deleted if triggered by the accumulation of fixed amounts. Therefore, it is necessary to determine which commit log can delete the past one.

また、上記のようなコミットログの構成において、複製元のマスタ記憶装置1台に対して複製先のレプリカ記憶装置が複数あるような構成をとる場合、レプリカ記憶装置はマスタ記憶装置の有するレコードデータの更新と同期をとるように動作するが、通信状況や負荷状況によっては、レプリカ記憶装置におけるレコードデータの更新の同期が遅れる場合がある。レプリカ記憶装置の同期に遅れが発生した場合は、マスタ記憶装置はコミットログを削除する過程でレプリカ記憶装置の更新状況を勘案する必要がある。同様に、レプリカ記憶装置でも不要なコミットログの削除を実施したいが、レプリカ記憶装置はマスタ記憶装置が故障し、動作できなくなった場合にマスタ記憶装置に成り代わるものであるので、マスタ記憶装置や自身以外のレプリカ記憶装置の更新状況を勘案したコミットログ削除を実施する必要がある。   Further, in the configuration of the commit log as described above, when the configuration is such that there are a plurality of replication destination replica storage devices for one replication source master storage device, the replica storage device has record data that the master storage device has. The update of the record data in the replica storage device may be delayed depending on the communication status and load status. When a delay occurs in the synchronization of the replica storage device, the master storage device needs to consider the update status of the replica storage device in the process of deleting the commit log. Similarly, even if the replica storage device wants to delete unnecessary commit logs, the replica storage device replaces the master storage device when the master storage device fails and cannot operate. It is necessary to execute commit log deletion considering the update status of replica storage devices other than itself.

上記問題点に鑑み、本発明は、レコードデータの更新で生成されるコミットログをファイルして一元管理し、不要になったコミットログを削除する契機を判定して削除するログファイル管理装置、システム、方法及びプログラムを提供することを目的とする。   In view of the above-described problems, the present invention provides a log file management apparatus and system for determining and triggering a trigger for deleting a commit log that is no longer needed by centralizing and managing a commit log generated by updating record data It is an object to provide a method and a program.

前記課題を解決するために、本発明は、レコードデータの集合であるレコード集合に対して、前記レコードデータの更新作業に基づいて、前記レコードデータそれぞれの更新内容を示すコミットログを生成して蓄積した共有ファイルを作成し、管理するログファイル管理装置であって、前記共有ファイルを記憶するコミットログ記憶部と、クライアント装置から前記レコードデータの更新要求を受け付ける要求受付部と、前記更新要求に基づいて前記コミットログを生成し、このコミットログを前記共有ファイルへ永続化するコミットログ生成部と、レコードデータ記憶部に記憶されるレコードデータを、任意のタイミングでチェックポイントとして取得して永続化し、各レコード集合毎に、チェックポイントが取得された時点を比較し、最も古いチェックポイントが取得された以前の前記コミットログを不要なコミットログとして削除する更新実行部と、前記所定のタイミングのレコードデータを前記レコードデータ記憶部からチェックポイントとして取得して永続化してチェックポイント記憶部に記憶するチェックポイント取得部と、前記更新実行部からの指示に基づき、前記共有ファイルに蓄積されたコミットログから、前記チェックポイント取得時以前のコミットログを削除するコミットログ制御部とを備えることを特徴とする。   In order to solve the above-described problem, the present invention generates and accumulates a commit log indicating the update contents of each record data based on the update operation of the record data for a record set that is a set of record data A log file management device that creates and manages the shared file, a commit log storage unit that stores the shared file, a request reception unit that receives an update request for the record data from a client device, and a basis of the update request The commit log is generated, and the commit log generation unit that persists the commit log to the shared file and the record data stored in the record data storage unit are acquired as a checkpoint at an arbitrary timing, and are persisted. For each record set, compare the point in time when the checkpoint was acquired and An update execution unit that deletes the previous commit log from which the old checkpoint was acquired as an unnecessary commit log, and the record data at the predetermined timing is acquired from the record data storage unit as a checkpoint and is made permanent. A checkpoint acquisition unit stored in a storage unit, and a commit log control unit that deletes a commit log before the checkpoint acquisition from the commit log accumulated in the shared file based on an instruction from the update execution unit. It is characterized by providing.

本発明によれば、レコードデータの更新要求で生成されるコミットログを共有のコミットログファイルに永続化し、任意のタイミングでチェックポイントを取得したときは、各レコード集合に対して、チェックポイントが取得された時点を比較し、最も古いチェックポイントが取得された時点以前のコミットログを不要なコミットログとして削除しているので、迅速に適切な削除ポイントを特定して削除することができる。   According to the present invention, when a commit log generated by a record data update request is made permanent in a shared commit log file and a checkpoint is acquired at an arbitrary timing, a checkpoint is acquired for each record set. Since the commit logs before the time when the oldest checkpoint is acquired are deleted as unnecessary commit logs, it is possible to quickly identify and delete an appropriate delete point.

また、本発明は、ノード間で共有するレコードデータの集合であるレコード集合に対して、前記レコードデータの更新作業に基づいて、前記レコードデータそれぞれの更新内容を示すコミットログを生成して蓄積した共有ファイルを作成し、管理するログファイル管理システムであって、クライアント装置から前記レコードデータの更新要求を受け付けて当該レコードデータの更新処理を行うマスタのログファイル管理装置と、当該マスタのログファイル管理装置の当該レコードデータの更新に対応して、当該同一のレコードデータを複製し更新するレプリカのログファイル管理装置とを備え、前記ログファイル管理装置はそれぞれ、前記共有ファイルを記憶するコミットログ記憶部と、クライアント装置から前記レコードデータの更新要求を受け付ける要求受付部と、前記更新要求に基づいて前記コミットログを生成し、このコミットログを前記共有ファイルへ永続化するコミットログ生成部と、前記各レコード集合に対する前記共有ファイルに蓄積されたコミットログが所定の範囲にあるか否かを判定し、当該コミットログが所定の範囲を超えたときは、当該所定の範囲を超えたコミットログを不要なコミットログとして削除を指示する更新実行部と、レコードデータ記憶部に記憶される前記レコードデータをチェックポイントとして取得してチェックポイント記憶部に記憶するチェックポイント取得部と、前記更新実行部からの指示に基づき、前記共有ファイルに蓄積されたコミットログから不要なコミットログを削除するコミットログ制御部と、他のログファイル管理装置との間で通信を行う通信制御部とを備え、自身のログファイル管理装置が前記マスタのログファイル管理装置であるとき、前記ログファイル管理装置は、さらに、前記レプリカのログファイル管理装置それぞれへ、当該マスタのログファイル管理装置におけるレコードデータの更新に対応して、当該同一のレコードデータを複製し、更新するよう要求するレプリケーション要求を送信し、当該レプリカのログファイル管理装置それぞれから、前記レプリケーション要求に基づくレコードデータ更新に関するコミットログの永続化が完了した旨の応答を受信するレプリケーション制御部を備え、前記所定の範囲を示す値として、前記マスタ及び前記レプリカのログファイル管理装置は同一の値を用いることを特徴とする。 Further, the present invention generates and accumulates a commit log indicating the update contents of each record data, based on the update operation of the record data, for a record set that is a set of record data shared between nodes. A log file management system for creating and managing a shared file, a master log file management device that receives an update request for the record data from a client device and updates the record data, and a log file management for the master A replica log file management device that replicates and updates the same record data in response to the update of the record data of the device, and each of the log file management devices stores a commit log storage unit that stores the shared file And an update request for the record data from the client device A request receiving unit that receives the commit log, generates a commit log based on the update request, and makes the commit log permanent to the shared file; and a commit log accumulated in the shared file for each record set Update execution unit for instructing to delete the commit log exceeding the predetermined range as an unnecessary commit log when the commit log exceeds the predetermined range; and checkpoint acquisition unit that stores the checkpoint storage unit obtains the record data stored in the record data storage unit as a checkpoint, the basis of an instruction from the update execution unit, stored committed to the shared file Commit log controller that deletes unnecessary commit logs from the log and other log file management devices And when the log file management device is the master log file management device, the log file management device is further connected to each of the replica log file management devices. In response to the record data update in the master log file management device, the replication request is sent to request that the same record data be replicated and updated, and the replication request is sent from each replica log file management device. A replication control unit that receives a response indicating that the persistence of the commit log relating to the record data update based on is completed, and the log file management device of the master and the replica has the same value as the value indicating the predetermined range It is characterized by using.

本発明によれば、マスタのログファイル管理装置(以下、「マスタ」という)は、最新のコミットログからどこまでを削除可能か、レプリカのログファイル管理装置(以下、「レプリカ」という)と同じ範囲を用いることにより、マスタとレプリカが事前に設定した範囲外のコミットログは各自で独立に削除してよい構成を備えているため、レプリカに問い合わせることなくそれ以前のコミットログを削除することが可能となる。よって、マスタと各レプリカとの間で削除に関する問い合わせのための通信がなくなるため、ネットワークの負荷を下げることが可能になる。   According to the present invention, the master log file management device (hereinafter referred to as “master”) can delete from the latest commit log in the same range as the replica log file management device (hereinafter referred to as “replica”). By using, it is possible to delete commit logs outside the range set in advance by the master and replica independently, so it is possible to delete previous commit logs without querying the replica It becomes. Therefore, there is no communication for inquiries regarding deletion between the master and each replica, so that the load on the network can be reduced.

また、本発明は、ノード間で共有するレコードデータの集合であるレコード集合に対して、前記レコードデータの更新作業に基づいて、前記レコードデータそれぞれの更新内容を示すコミットログを生成して蓄積した共有ファイルを作成し、管理するログファイル管理システムであって、クライアント装置から前記レコードデータの更新要求を受け付けて当該レコードデータの更新処理を行うマスタのログファイル管理装置と、当該マスタのログファイル管理装置の当該レコードデータの更新に対応して、当該同一のレコードデータを複製し更新するレプリカのログファイル管理装置とを備え、前記ログファイル管理装置は、前記共有ファイルを記憶するコミットログ記憶部と、前記クライアント装置から前記レコードデータの更新要求を受け付ける要求受付部と、前記更新要求に基づいて前記コミットログを生成し、このコミットログを前記共有ファイルへ永続化するコミットログ生成部と、前記各レコード集合に対する前記共有ファイルに蓄積されたコミットログのうち不要なコミットログの削除を指示する更新実行部と、レコードデータ記憶部に記憶される前記レコードデータをチェックポイントとして取得してチェックポイント記憶部に記憶するチェックポイント取得部と、前記更新実行部からの指示に基づき、前記共有ファイルに蓄積されたコミットログから、前記最も古いチェックポイント取得時以前のコミットログを削除するコミットログ制御部と、他のログファイル管理装置との間で通信を行う通信制御部とを備え、自身のログファイル管理装置が前記マスタのログファイル管理装置であるとき、前記ログファイル管理装置は、さらに、前記レプリカのログファイル管理装置それぞれへ、当該マスタのログファイル管理装置におけるレコードデータの更新に対応して、当該同一のレコードデータを複製し、更新するよう要求するレプリケーション要求を送信し、当該レプリカのログファイル管理装置それぞれから、前記レプリケーション要求に基づくレコードデータ更新に関するコミットログの永続化が完了した旨の応答を受信するレプリケーション制御部を備え、前記マスタのログファイル管理装置の更新実行部は、前記レプリカのログファイル管理装置が有するコミットログのうち、最も古いコミットログを選定し、当該コミットログ以前に生成されたコミットログを不要なコミットログとして削除する旨を前記レプリカのログファイル管理装置ヘ通知すると共に自身のログファイル管理装置が有する当該コミットログを削除し、前記レプリカのログファイル管理装置の更新実行部は、前記通知に基づいて前記コミットログを削除することを特徴とする。 Further, the present invention generates and accumulates a commit log indicating the update contents of each record data, based on the update operation of the record data, for a record set that is a set of record data shared between nodes. A log file management system for creating and managing a shared file, a master log file management device that receives an update request for the record data from a client device and updates the record data, and a log file management for the master A replica log file management device that replicates and updates the same record data in response to the update of the record data of the device, and the log file management device includes a commit log storage unit that stores the shared file; Receiving an update request for the record data from the client device. A request accepting unit, a commit log generating unit that generates the commit log based on the update request and makes the commit log permanent to the shared file, and a commit log accumulated in the shared file for each record set and updating execution unit for instructing deletion of unnecessary commit log out of a checkpoint acquisition unit that stores the checkpoint storage unit obtains the record data stored in the record data storage unit as a checkpoint, the update Communication between a commit log control unit that deletes a commit log before the oldest checkpoint acquisition time from the commit log accumulated in the shared file based on an instruction from the execution unit, and another log file management device A communication control unit that performs the log management of its own log file management device. When it is a file management device, the log file management device further replicates the same record data to each of the replica log file management devices in response to the update of the record data in the master log file management device. A replication control unit that sends a replication request for updating, and receives a response from the respective replica log file management devices indicating that the commit log persistence related to the record data update based on the replication request has been completed. The update execution unit of the master log file management device selects the oldest commit log among the commit logs of the replica log file management device, and does not need a commit log generated before the commit log. Delete as commit log Remove the commit log to its own log file management apparatus has with log file management apparatus F notification of the replica to the effect that, update execution part of the log file management apparatus of the replica on the basis of the said notification The commit log is deleted.

本発明によれば、マスタが自身及びレプリカが有するコミットログの適用状況を管理し、マスタからレプリカヘ適用状況を通知するので、マスタと各レプリカとの間で適用状況に関する問い合わせをする必要がなくなり、ネットワークの負荷を下げることが可能になる。 According to the present invention, since the master manages the application status of the commit log that the master and the replica have, and notifies the application status from the master to the replica, there is no need to make an inquiry about the application status between the master and each replica, It is possible to reduce the load on the network.

本発明によれば、ログファイル管理装置は、コミットログを削除する削除ポイントを適切に特定して迅速に削除することが可能になる。
また、ログファイル管理システムは、他のノードに依存することなく、コミットログを削除して、ネットワークの負荷を低減することが可能になる。
According to the present invention, the log file management apparatus can appropriately specify a deletion point for deleting a commit log and quickly delete it.
Further, the log file management system can reduce the load on the network by deleting the commit log without depending on other nodes.

第1の実施の形態に係るログファイル管理装置の構成図である。It is a block diagram of the log file management apparatus which concerns on 1st Embodiment. レコード集合とチェックポイントの関係を示す図である。It is a figure which shows the relationship between a record set and a checkpoint. 第1の実施の形態に係るログファイル管理装置の処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a process of the log file management apparatus which concerns on 1st Embodiment. 削除してよいコミットログの判定方法を説明する図である。It is a figure explaining the determination method of the commit log which may be deleted. コミットログIDを基準にコミットログを削除する方法を説明する図である。It is a figure explaining the method of deleting a commit log on the basis of commit log ID. 時刻を基準にコミットログを削除する方法を示す図である。It is a figure which shows the method of deleting a commit log on the basis of time. コミットログファイルをスワップさせる方法を説明する図である。It is a figure explaining the method of swapping a commit log file. 第2の実施の形態におけるコミットログファイルの削除判定のリストを示す図である。It is a figure which shows the list | wrist of deletion determination of the commit log file in 2nd Embodiment. 第3の実施の形態におけるクライアント装置とログファイル管理装置との関係を示す図である。It is a figure which shows the relationship between the client apparatus and log file management apparatus in 3rd Embodiment. 第4の実施の形態に係るログファイル管理システムの構成図である。It is a block diagram of the log file management system which concerns on 4th Embodiment. 第4の実施の形態に係るログファイル管理システムにおける処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a process in the log file management system which concerns on 4th Embodiment. レプリカからマスタへの再送要求を説明する図である。It is a figure explaining the resending request | requirement from a replica to a master. 第4の実施の形態に係るログファイル管理システムの構成図である。It is a block diagram of the log file management system which concerns on 4th Embodiment. 第5の実施の形態におけるコミットログの適用を示す図である、It is a figure which shows application of the commit log in 5th Embodiment. 第5の実施の形態に係るログファイル管理システムにおける処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a process in the log file management system which concerns on 5th Embodiment.

以下に、本発明の実施の形態について図面を参照しながら詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

(第1の実施の形態)
図1は、第1の実施の形態に係るログファイル管理装置の構成図である。ログファイル管理装置100は、図1に示すように、クライアント装置1からレコードデータの更新要求を受け付ける要求受付部2と、更新要求に応じてコミットログを生成するコミットログ生成部3と、不要となったコミットログの削除するタイミング判定して削除を指示する更新実行部4と、不要になったコミットログの削除を実施するコミットログ制御部5と、所定のタイミングにおけるレコードデータをチェックポイントとして取得する(以下、「チェックポイント取得」という)チェックポイント取得部6と、レコード集合毎にレコードデータを記憶するレコードデータ記憶部7と、コミットログを記憶するコミットログ記憶部8と、チェックポイントをファイルとして(以下、「チェックポイントファイル」という)記憶するチェックポイント記憶部9とから構成される。以下、各構成部について詳細に説明する。
(First embodiment)
FIG. 1 is a configuration diagram of a log file management apparatus according to the first embodiment. As shown in FIG. 1, the log file management device 100 includes a request receiving unit 2 that receives a record data update request from the client device 1, a commit log generating unit 3 that generates a commit log in response to the update request, and unnecessary. An update execution unit 4 that determines the timing of deleting a commit log that has been deleted and instructs the deletion, a commit log control unit 5 that deletes a commit log that is no longer needed, and obtains record data at a predetermined timing as a checkpoint A checkpoint acquisition unit 6 (hereinafter referred to as “checkpoint acquisition”), a record data storage unit 7 that stores record data for each record set, a commit log storage unit 8 that stores a commit log, and a checkpoint file (Hereinafter referred to as “checkpoint file”) It consists Kkupointo storage unit 9. Hereinafter, each component will be described in detail.

要求受付部2は、クライアント装置1からレコードデータの更新要求を受け付ける。ここで、クライアント装置1から受け付ける要求にはレコードデータの更新及び参照があるが、本発明の実施の形態ではレコードデータの更新を処理として扱うことにする。更新の対象レコードデータはレコード集合毎に記憶される。レコード集合とは、データベースを例にとった場合、テーブルを示す。   The request receiving unit 2 receives a record data update request from the client device 1. Here, the request received from the client apparatus 1 includes update and reference of record data. In the embodiment of the present invention, update of record data is treated as a process. Update target record data is stored for each record set. A record set indicates a table when a database is taken as an example.

コミットログ生成部3は、更新要求に基づいて、更新すべきレコードデータの前回の更新からの差分情報である更新差分情報に一意のID(Identification)を付与したコミットログを生成する。   Based on the update request, the commit log generation unit 3 generates a commit log in which a unique ID (Identification) is added to update difference information that is difference information from the previous update of record data to be updated.

更新実行部4は、コミットログ制御部5にコミットログをコミットログ記憶部7に永続化(記憶)するよう指示する。さらに、任意のタイミングでチェックポイント取得をチェックポイント取得部6へ指示し、各レコード集合毎に、チェックポイントが取得された時点を比較し、最も古くチェックポイントが取得された時点以前のコミットログを不要となったコミットログと判定して、このコミットログの削除をコミットログ制御部5へ指示する。さらに、削除したコミットログに対応するレコードデータの更新をレコードデータ記憶部7のレコードデータに対し実行する。   The update execution unit 4 instructs the commit log control unit 5 to make the commit log permanent (store) in the commit log storage unit 7. Furthermore, the checkpoint acquisition unit 6 is instructed to acquire the checkpoint at an arbitrary timing, and the time when the checkpoint is acquired is compared for each record set, and the commit log before the oldest checkpoint is acquired. The commit log is determined to be unnecessary, and the commit log control unit 5 is instructed to delete this commit log. Furthermore, the record data corresponding to the deleted commit log is updated with respect to the record data in the record data storage unit 7.

コミットログ制御部5は、更新実行部4の指示に基づいて、コミットログをコミットログ記憶部8に永続化し、不要になったコミットログを削除する。
チェックポイント取得部6は、更新実行部4からの指示でチェックポイントの取得を実施し、チェックポイント記憶部9に記憶する。
Based on the instruction from the update execution unit 4, the commit log control unit 5 makes the commit log permanent in the commit log storage unit 8 and deletes the commit log that is no longer needed.
The checkpoint acquisition unit 6 acquires a checkpoint according to an instruction from the update execution unit 4 and stores it in the checkpoint storage unit 9.

更新実行部4、コミットログ制御部5及びチェックポイント取得部6は、ログファイル管理装置100に備えるCPU(Central Processing Unit)によるプログラム処理や専用回路により実現される。さらに、上記レコードデータ記憶部7、コミットログ記憶部8、チェックポイント記憶部9、及び、ログファイル管理装置100の機能を実現するためのプログラムを格納する記憶部(不図示)は、RAM(Random Access Memory)、ROM(Read Only Memory)、HDD(Hard Disk Drive)、フラッシュメモリ等の記憶媒体から構成される。   The update execution unit 4, the commit log control unit 5, and the checkpoint acquisition unit 6 are realized by program processing by a CPU (Central Processing Unit) included in the log file management apparatus 100 and a dedicated circuit. Furthermore, the record data storage unit 7, the commit log storage unit 8, the checkpoint storage unit 9, and a storage unit (not shown) for storing the program for realizing the functions of the log file management device 100 include a RAM (Random It is composed of a storage medium such as an access memory (ROM), a read only memory (ROM), a hard disk drive (HDD), and a flash memory.

ここで、チェックポイント取得のタイミングを任意のタイミングとしているが、この任意のタイミングとは、コミットログが生成された回数を量として所定の閾値を超えたとき、永続化されたコミットログの量が上記コミットログ記憶部8において所定の容量を超えたとき、前回チェックポイント取得から所定時間を経過したとき、レコードデータ記憶部7に記憶されているレコードデータの量が所定の容量を超えたとき、又は、任意に設定したタイミングをいう。   Here, the timing of checkpoint acquisition is an arbitrary timing. This arbitrary timing is the amount of the commit log that is made permanent when the number of times the commit log is generated exceeds a predetermined threshold. When a predetermined capacity is exceeded in the commit log storage unit 8, when a predetermined time has elapsed since the previous checkpoint acquisition, when the amount of record data stored in the record data storage unit 7 exceeds a predetermined capacity, Or the timing set arbitrarily.

図2は、レコードデータ記憶部7のレコード集合とチェックポイント記憶部9のチェックポイントの関係を示す図である。図2では、1つのレコード集合に対して1チェックポイントファイルを対応付けているが、複数のチェックポイントファイルを有する構造でもよい。複数有する場合は、スキーマ情報に応じてレコード集合の部分ごとに複数ファイルを有する場合と、異なるタイミングで取得したチェックポイントファイルを複数個保持(複数世代保持)する場合との両方が考えられる。   FIG. 2 is a diagram illustrating the relationship between the record set in the record data storage unit 7 and the checkpoints in the checkpoint storage unit 9. In FIG. 2, one checkpoint file is associated with one record set, but a structure having a plurality of checkpoint files may be used. When there are a plurality of files, there are both a case of having a plurality of files for each part of the record set according to the schema information and a case of holding a plurality of checkpoint files acquired at different timings (holding a plurality of generations).

次に、ログファイル管理装置100における処理の流れを図3に示すフローチャートで説明する(適宜図1参照)。まず、更新要求部2はクライアント装置1からレコードデータの更新要求を受け付る(S1)。次に、この更新要求に基づいて、コミットログ生成部3はコミットログを生成し、更新実行部4はこのコミットログの永続化をコミットログ制御部5へ指示してコミットログ記憶部7に永続化する(S2)。次に、更新実行部4は、所定のタイミングでチェックポイント取得をチェックポイン取得部6に指示して、各レコード集合に対して、チェックポイントを取得する(S3)。   Next, the flow of processing in the log file management apparatus 100 will be described with reference to the flowchart shown in FIG. 3 (see FIG. 1 as appropriate). First, the update request unit 2 receives a record data update request from the client device 1 (S1). Next, on the basis of this update request, the commit log generation unit 3 generates a commit log, and the update execution unit 4 instructs the commit log control unit 5 to make the commit log permanent, and the commit log storage unit 7 makes it permanent. (S2). Next, the update execution unit 4 instructs the checkpoint acquisition unit 6 to acquire a checkpoint at a predetermined timing, and acquires a checkpoint for each record set (S3).

次に、更新実行部4は、各レコード集合毎に、チェックポイント取得時を比較し、最も古いチェックポイント取得時を決定する(S4)。次に、更新実行部4は、最も古いチェクポイント取得時以前のコミットログの削除をコミットログ制御部5へ指示して削除する(S5)。次に、更新実行部4は、削除したコミットログに対応するレコードデータの更新をレコードデータ記憶部7のレコードデータに対して実行する(S6)。ここで、S6の処理については、削除するタイミングと同期して実行してもよいし、非同期に実行してもよい。以上により、不要となったコミットログの削除が終了する。   Next, the update execution unit 4 compares the checkpoint acquisition time for each record set, and determines the oldest checkpoint acquisition time (S4). Next, the update execution unit 4 instructs the commit log control unit 5 to delete the commit log before the oldest checkpoint acquisition time and deletes it (S5). Next, the update execution unit 4 updates the record data corresponding to the deleted commit log on the record data in the record data storage unit 7 (S6). Here, the process of S6 may be executed in synchronization with the deletion timing or may be executed asynchronously. This completes the deletion of the commit log that is no longer needed.

ここで、コミットログは、データベースを復旧させるリカバリ時には、永続化された順序に応じて、順次レコードデータ記憶部7へ適用していく。このため、コミットログは、永続化された順序を示すシーケンシャルな番号、及び/又は、生成された時刻を永続化情報として、更新情報(レコードデータ及びレコード集合のアドレス)と共に有している。ここでは、シーケンシャルな番号のことをコミットログIDという。   Here, the commit log is sequentially applied to the record data storage unit 7 in the recovery order for recovering the database according to the permanent order. For this reason, the commit log has a sequential number indicating the order of persistence and / or the generated time as the persistence information together with update information (record data and the address of the record set). Here, the sequential number is called a commit log ID.

次に、削除してよいコミットログの判定方法について具体的に説明する。図4は、削除してよいコミットログの判定方法を説明する図である。図4に示すように、更新実行部4が、t1、t2、t3、t4のタイミングで各レコード集合のチェックポイントファイルを取得したとする。レコード集合Aは、t1のタイミングでチェックポイントファイル(CPA)を取得し、その時点でのコミットログIDは、「25」である。レコード集合Bは、t4のタイミングでチェックポイントファイル(CPB)を取得し、その時点でのコミットログIDは、「69」である。レコード集合Cは、t3のタイミングでチェックポイントファイル(CPC)を取得し、その時点でのコミットログIDは、「52」である。レコード集合Dは、t4のタイミングでチェックポイントファイル(CPD)を取得し、その時点でのコミットログIDは、「33」である。ここで、時刻については、t0<t1<t2<t3<t4<現在の順序であり、コミットログIDは大きいほど新しいものとする。   Next, a method for determining a commit log that may be deleted will be described in detail. FIG. 4 is a diagram illustrating a method for determining a commit log that may be deleted. As illustrated in FIG. 4, it is assumed that the update execution unit 4 acquires a checkpoint file for each record set at timings t1, t2, t3, and t4. The record set A acquires a checkpoint file (CPA) at the timing t1, and the commit log ID at that time is “25”. The record set B obtains the checkpoint file (CPB) at the timing t4, and the commit log ID at that time is “69”. The record set C acquires a checkpoint file (CPC) at the timing t3, and the commit log ID at that time is “52”. The record set D obtains a checkpoint file (CPD) at the timing t4, and the commit log ID at that time is “33”. Here, the time is t0 <t1 <t2 <t3 <t4 <current order, and the larger the commit log ID, the newer the log.

例えば、現時点でコミットログを削除すると考えた場合、各レコード集合で削除できるのは、レコード集合Aは コミットログID =25(もしくは時刻t1)以前であり、レコード集合BはコミットログID=69(もしくは時刻t4)以前であり、レコード集合Cは、コミットログID =52(もしくは時刻t3)以前であり、レコード集合Dは、コミットログID=33(もしくは時刻t2)以前となり、最も古いレコード集合は、レコード集合Aであるため、コミットログID=25(もしくは時刻t1)以前のコミットログは削除してよいという判定になる。もし、コミットログID=33以前を削除してしまうと、レコード集合Aについては、現在状態に復元できなくなる。   For example, if it is considered that the commit log is to be deleted at this time, the record set A can be deleted before the commit log ID = 25 (or time t1), and the record set B can be deleted with the commit log ID = 69 ( Or before time t4), the record set C is before commit log ID = 52 (or time t3), the record set D is before commit log ID = 33 (or time t2), and the oldest record set is Since it is the record set A, it is determined that the commit log before commit log ID = 25 (or time t1) may be deleted. If the commit log ID = 33 or earlier is deleted, the record set A cannot be restored to the current state.

上記判定をより簡易に行う方法について説明する。図5は、コミットログIDを基準にコミットログの削除を説明する図である。図5では、コミットログIDをキーとした単方向リスト構造でレコード集合の情報を管理しており、リストの先頭が、最も古いデータを表している。   A method for performing the determination more simply will be described. FIG. 5 is a diagram for explaining commit log deletion based on the commit log ID. In FIG. 5, record set information is managed in a unidirectional list structure with a commit log ID as a key, and the top of the list represents the oldest data.

まず、初期起動時は、コミットログが全く永続化されていない状態なので、各レコード集合のコミットログID=0として、任意の順番でリストを作る(この場合、リストへ作られた順番は問題とならないので、何でもよい)。次に、レコード集合Aでチェックポイント取得が行われると、任意の順番で作っていたレコード集合Aの要素をリストから削除し、リストの末尾(時系列的に最新の方)にコミットログID=25でレコード集合Aを追加する。時系列順に、レコード集合D、レコード集合C、レコード集合Bと任意の順番のレコードを削除し、末尾から追加を繰り返していく。このリスト構造を作っていれば、任意のタイミングでコミットログ削除を実施したい場合は、このリストの先頭を参照し、そのレコード集合が示すコミットログID以前のコミットログを削除すればよい。   First, since the commit log is not made permanent at the initial startup, the list is created in an arbitrary order with the commit log ID = 0 for each record set (in this case, the order created in the list is a problem) Anything is fine. Next, when a checkpoint is acquired in the record set A, the elements of the record set A that were created in an arbitrary order are deleted from the list, and the commit log ID = at the end of the list (the latest in time series) At 25, record set A is added. Record set D, record set C, record set B and records in any order are deleted in chronological order, and addition is repeated from the end. If this list structure is created, if you want to delete commit logs at any time, you can refer to the top of this list and delete the commit logs before the commit log ID indicated by the record set.

上記では、初期起動時に全レコード集合の要素を追加していたが、各レコード集合が初めてチェックポイントを取得するタイミングで要素を追加する方法も考えられる。この場合、コミットログ削除の判定を実施するときは、リストの要素数を確認し、レコード集合の数と一致していた場合にのみコミットログ削除を実施するようにする。図5に示した例の場合レコード集合Cを基点にそれ以前のデータを削除してしまと、レコード集合Aを復元するのに必要なデータのうちコミットログID=26〜51が、レコード集合Cを復元するのに必要なデータのうちコミットログID=34〜51がそれぞれ失われてしまいレコード集合Aとレコード集合Cの復元が行えなくなる。   In the above, the elements of all record sets are added at the time of initial activation, but a method of adding elements at the timing when each record set acquires a checkpoint for the first time is also conceivable. In this case, when determining whether to delete the commit log, the number of elements in the list is checked, and the commit log is deleted only when the number matches the number of record sets. In the case of the example shown in FIG. 5, if the previous data is deleted based on the record set C, the commit log ID = 26 to 51 among the data necessary to restore the record set A is the record set C. Commit log IDs = 34 to 51 are lost among the data necessary for restoring the records, and the record set A and the record set C cannot be restored.

また、削除の判定には、時刻を利用することもできる。この場合も、基本的にはコミットログIDを利用する場合と同じだが、判定要素が時刻に変わる。図6は、時刻を基準にコミットログを削除する方法を示す図である。図6に示す例では、削除できる基点となる時刻が決まったら、その基点の時刻よりも前のコミットログをすべて削除する。コミットログファイルはファイルの先頭から順に時系列に追記されていく前提として、コミットログが1ファイルに書かれている場合は、先頭からその基点の時刻までを削除する。   The time can also be used for determination of deletion. This case is basically the same as the case of using the commit log ID, but the determination element changes to the time. FIG. 6 is a diagram illustrating a method of deleting a commit log based on time. In the example shown in FIG. 6, when the base time that can be deleted is determined, all the commit logs before the base time are deleted. Assuming that the commit log file is added in chronological order from the beginning of the file, if the commit log is written in one file, the time from the beginning to the base time is deleted.

第1の実施の形態によれば、レコードデータの更新要求で生成されるコミットログに対して、時系列的にシーケンシャルな識別情報を対応付けて共有のコミットログファイルに永続化し、任意のタイミングでチェックポイントを取得したときは、各レコード集合に対して、チェックポイントが永続化された時点を比較し、最も古くチェックポイントが永続化された時点以前のコミットログを不要なコミットログとして削除しているので、迅速に適切な削除ポイントを特定して削除することができる。   According to the first embodiment, the commit log generated by the record data update request is associated with time-sequential sequential identification information and made permanent in the shared commit log file. When a checkpoint is acquired, the point in time when the checkpoint was made permanent is compared for each record set, and the oldest commit log before the point when the checkpoint was made permanent is deleted as an unnecessary commit log. Therefore, it is possible to quickly identify and delete an appropriate deletion point.

(第2の実施の形態)
第2の実施の形態では、コミットログ記憶部7において、論理的にコミットログファイルが複数ファイルから構成される例について説明する。コミットログファイルが複数ファイルにまたがっている場合は、コミットログを複数のコミットログファイルに順次書き込むスワップ処理を実施しており、削除するタイミングを示す基点以前のコミットログしか含まれていないファイルは削除し、基点が含まれているファイルは、先頭からその基点の位置までを削除する。基本的な考え方は、第1の実施の形態と同様であるが、コミットログ削除をファイル単位で削除するような場合を想定している。
(Second Embodiment)
In the second embodiment, an example in which the commit log file is logically composed of a plurality of files in the commit log storage unit 7 will be described. If the commit log file spans multiple files, swap processing is performed to sequentially write the commit log to multiple commit log files, and files containing only the commit log before the base point indicating the timing to delete are deleted. In the file containing the base point, the part from the head to the position of the base point is deleted. The basic idea is the same as in the first embodiment, but it is assumed that commit log deletion is deleted in units of files.

図7は、コミットログファイルをスワップさせる方法を説明する図である。図7では、コミットログファイルが3つ用意されており、コミットログIDが0〜20まではコミットログファイル1に、コミットログIDが21〜78まではコミットログファイル2に、コミットログIDが78以降のものはコミットログファイル3にそれぞれファイルされている。   FIG. 7 is a diagram for explaining a method of swapping commit log files. In FIG. 7, three commit log files are prepared. When the commit log ID is 0 to 20, the commit log file 1 is used. When the commit log ID is 21 to 78, the commit log file 2 is used. The subsequent files are respectively stored in the commit log file 3.

初期起動時にコミットログファイル1が生成され、t1のタイミングでコミットログをファイルするファイルがコミットログファイル2へスワップし、t6のタイミングでコミットログファイル3へスワップしているものとする。   It is assumed that a commit log file 1 is generated at the time of initial activation, a file that files a commit log is swapped to the commit log file 2 at the timing t1, and is swapped to the commit log file 3 at the timing t6.

図8は、第2の実施の形態におけるコミットログファイルの削除判定のリストを示す図である。図8(a)は、時刻を基準にコミットログを削除する場合を示し、図8(b)は、コミットログIDを基準にコミットログを削除する場合を示している。   FIG. 8 is a diagram illustrating a list of commit log file deletion determinations according to the second embodiment. FIG. 8A shows a case where the commit log is deleted based on the time, and FIG. 8B shows a case where the commit log is deleted based on the commit log ID.

例えば、図7に示す現在時刻にコミットログ削除を実施した場合、第1実施の形態と同様に判定を実施すると、コミットログID=25以前、即ち、時刻t2以前のコミットログを削除できるという判定ができる。第1の実施の形態と異なる点は、各コミットログファイルをファイル単位でサーチし、そのファイルに含まれるコミットログの範囲を確認する点である。コミットログ記憶部7にコミットログファイル管理情報を作成しておき、この管理情報を参照してコミットログファイルに含まれるコミットログの範囲を確認してもよい。コミットログ管理情報は、コミットログファイルとこのファイルに含まれるコミットログ(ID)の範囲の対応付けている情報である。   For example, when commit log deletion is performed at the current time shown in FIG. 7, if determination is performed as in the first embodiment, it is determined that commit log ID = 25 or earlier, that is, commit logs before time t2 can be deleted. Can do. The difference from the first embodiment is that each commit log file is searched in units of files, and the range of commit logs included in the file is confirmed. Commit log file management information may be created in the commit log storage unit 7 and the range of commit logs included in the commit log file may be confirmed with reference to this management information. The commit log management information is information that associates a commit log file with a range of commit logs (ID) included in the file.

コミットログファイル1は、コミットログID0〜20(時刻t0〜t1)のコミットログIDを含んでおり、今回削除してもよいと判定される。よって、ここでは、コミットログファイル1のみを削除するという処理になる。そして、コミットログファイル2について検討すると、コミットログID25以降のコミットログが含まれているため、コミットログファイル2はそのまま残すことも可能である。   The commit log file 1 includes commit log IDs with commit log IDs 0 to 20 (time t0 to t1), and it is determined that the commit log file 1 may be deleted this time. Accordingly, here, only the commit log file 1 is deleted. When the commit log file 2 is examined, since the commit logs after the commit log ID 25 are included, the commit log file 2 can be left as it is.

第2の実施の形態によれば、コミットログファイル単位でのコミットログの削除が可能になり、コミットログファイルが1つで構成される場合におけるファイルの一部を削除するよりも高速にコミットログの削除が実施できる。   According to the second embodiment, the commit log can be deleted in units of the commit log file, and the commit log is faster than deleting a part of the file when the commit log file is composed of one. Can be deleted.

(第3の実施の形態)
図9は、第3の実施の形態におけるクライアント装置1とログファイル管理装置100との関係を示す図である。第3の実施の形態では、1つのレコード集合のデータが複数のログファイル管理装置100に分散している例について説明する。例えば、一つのテーブル(レコード集合)を、物理的には都道府県別に分割して配置保存している様な場合を想定している。クライアント装置1からは、テーブルが個々に分割保存されていることは意識されず、一つのテーブルとして見えている。即ち、それぞれのログファイル管理装置100で異なるデータを保持していることになる。また、それぞれ異なるログファイル管理装置100に物理的に分散していると考えられるため、コミットログ記憶部7はそれぞれのログファイル管理装置100に一つずつ配置されている。
(Third embodiment)
FIG. 9 is a diagram illustrating a relationship between the client device 1 and the log file management device 100 according to the third embodiment. In the third embodiment, an example in which data of one record set is distributed to a plurality of log file management apparatuses 100 will be described. For example, it is assumed that one table (record set) is physically divided and stored by prefecture. From the client device 1, it is not conscious that the tables are individually stored separately, and is seen as one table. In other words, each log file management apparatus 100 holds different data. Further, since it is considered that the log files are physically distributed in different log file management apparatuses 100, one commit log storage unit 7 is arranged in each log file management apparatus 100.

上記の場合でも、コミットログの削除条件は、各々のログファイル管理装置100が互いに依存しあうことなく、各々のログファイル管理装置100毎にリカバリが可能であれば良いので、上述した第1及び第2実施の形態と同様の判定を各ログファイル管理装置100で実施すればよい。   Even in the above-described case, the deletion condition of the commit log is not limited depending on each log file management device 100 as long as recovery is possible for each log file management device 100. The same determination as in the second embodiment may be performed by each log file management apparatus 100.

第3の実施の形態によれば、分散してログファイル管理装置100を設置でき、他のログファイル管理装置100に依存することなく、高速にコミットログの削除が可能になる。   According to the third embodiment, log file management apparatuses 100 can be installed in a distributed manner, and commit logs can be deleted at high speed without depending on other log file management apparatuses 100.

(第4の実施の形態)
図10は、第4の実施の形態に係るログファイル管理システムの構成図である。
図10に示すように、ログファイル管理システム200は、クライアント装置1からレコードデータの更新要求を受け付けてレコードデータの更新処理を行うマスタのログファイル管理装置(以下、「マスタ40」という)と、マスタのログファイル管理装置のレコードデータの更新に対応して、同一のレコードデータを複製し更新するレプリカのログファイル管理装置(以下、「レプリカ50」という)とを備える。
(Fourth embodiment)
FIG. 10 is a configuration diagram of a log file management system according to the fourth embodiment.
As shown in FIG. 10, a log file management system 200 receives a record data update request from the client device 1 and performs a record data update process (hereinafter referred to as “master 40”), Corresponding to the update of the record data of the master log file management device, a replica log file management device (hereinafter referred to as “replica 50”) that replicates and updates the same record data is provided.

マスタ40,レプリカ50はそれぞれ、クライアント装置1からレコードデータの更新要求を受け付ける要求受付部2と、更新要求に応じてコミットログを生成するコミットログ生成部3と、不要となったコミットログの削除するタイミング判定して削除を指示する更新実行部14と、不要になったコミットログの削除を実施するコミットログ制御部15と、コミットログの量が所定の範囲(以下、「ウインドウ幅」という)に達した時点のチェックポイント取得を実施するチェックポイント取得部6と、レコード集合毎にレコードデータを記憶するレコードデータ記憶部7と、コミットログを記憶するコミットログ記憶部8と、チェックポイントファイルを記憶するチェックポイント記憶部9と、レプリケーション要求の制御をするレプリケーション制御部16と、他のログファイル管理装置との間で通信を行う通信制御部17とを備える。   Each of the master 40 and the replica 50 includes a request reception unit 2 that receives a record data update request from the client device 1, a commit log generation unit 3 that generates a commit log in response to the update request, and deletes a commit log that is no longer needed. The update execution unit 14 that determines the timing to perform deletion and instructs the deletion, the commit log control unit 15 that deletes the unnecessary commit log, and the amount of the commit log within a predetermined range (hereinafter referred to as “window width”) A checkpoint acquisition unit 6 that performs a checkpoint acquisition at the time of reaching, a record data storage unit 7 that stores record data for each record set, a commit log storage unit 8 that stores a commit log, and a checkpoint file Checkpoint storage unit 9 to store and replication to control replication request It provided with Shon control unit 16, a communication control unit 17 that communicates with the other log file management apparatus.

以下、第1の実施の形態と同様の機能を有する構成を示す部位については、同様の符号を付し、その説明の重複を省略する。   In the following, parts having the same functions as those in the first embodiment are denoted by the same reference numerals, and duplicate descriptions thereof are omitted.

マスタ40は、さらに、各レプリカ50へ、マスタ40におけるレコードデータの更新に対応して、同一のレコードデータを複製し、更新するよう要求するレプリケーション要求を送信し、各レプリカ50から、レプリケーション要求に基づくレコードデータ更新に関するコミットログの永続化が完了した旨の応答を受信するレプリケーション制御部16を備える。   Further, the master 40 transmits a replication request for replicating and updating the same record data to each replica 50 in response to the update of the record data in the master 40, and from each replica 50 to the replication request. The replication control unit 16 receives a response to the effect that the commit log persistence related to the record data update based on the completion is completed.

ここで、チェックポイント取得のタイミングをコミットログの量が所定のウインドウ幅に達したときとしているが、これは、コミットログが生成された回数を量として所定のウインドウ幅を超えたとき、永続化されたコミットログの量が上記コミットログ記憶部8において所定の容量を超えたとき、前回チェックポイント取得から所定時間を経過したとき、又は、レコードデータ記憶部7に記憶されているレコードデータの量が所定の容量を超えたときをいう。また、チェックポイントの取得を任意のタイミングで実施することも可能である。   Here, the timing of checkpoint acquisition is when the amount of commit logs reaches the predetermined window width. This is made permanent when the predetermined window width is exceeded by the number of times the commit log is generated. When the amount of committed logs exceeds a predetermined capacity in the commit log storage unit 8, when a predetermined time has elapsed since the previous checkpoint acquisition, or the amount of record data stored in the record data storage unit 7 Is when the specified capacity is exceeded. It is also possible to acquire a checkpoint at an arbitrary timing.

マスタ40の更新実行部14は、コミットログの量が所定のウインドウ幅にあるか否かの判定を行うとき、コミットログの量のウインドウ幅として、各レプリカ50で用いられるコミットログの量のウインドウ幅と同じ値を用いる。さらに、マスタ40の更新実行部14は、レプリケーション要求に対して、各レプリカ50から、レコードデータに関するコミットログの永続化が完了した旨の通知を、レプリカ50の合計台数のうち、過半数のレプリカから受信した場合に、レコードデータに関するコミットログを永続化されたコミットログとみなし、永続化されたとみなされたコミットログの量が所定のウインドウ幅にあるか否かを判定する。   When the update execution unit 14 of the master 40 determines whether the amount of commit logs is within a predetermined window width, the window of the amount of commit logs used in each replica 50 is used as the window width of the amount of commit logs. Use the same value as the width. Further, the update execution unit 14 of the master 40 notifies each replica 50 that the persistence of the commit log related to the record data has been completed from a majority of replicas 50 out of the total number of replicas 50 in response to the replication request. When received, the commit log relating to the record data is regarded as a permanent commit log, and it is determined whether or not the amount of the commit log deemed permanent is within a predetermined window width.

第4の実施の形態におけるレコード集合とチェックポイントの関係は第1の実施の形態におけるものと同様であるのでここでは説明を省略する。   Since the relationship between the record set and the check points in the fourth embodiment is the same as that in the first embodiment, description thereof is omitted here.

次に、ログファイル管理システム200における処理の流れを図11に示すフローチャートで説明する(適宜図10参照)。まず、マスタ40の更新要求部2はクライアント装置1からレコードデータの更新要求を受け付ける(S11)。次に、この更新要求に基づいて、コミットログ生成部3はコミットログを生成し、更新実行部14はコミットログの永続化をコミットログ制御部15へ指示してコミットログ記憶部7に永続化する(S12)。   Next, the flow of processing in the log file management system 200 will be described with reference to the flowchart shown in FIG. 11 (see FIG. 10 as appropriate). First, the update request unit 2 of the master 40 receives a record data update request from the client device 1 (S11). Next, on the basis of this update request, the commit log generation unit 3 generates a commit log, and the update execution unit 14 instructs the commit log control unit 15 to make the commit log permanent and makes the commit log storage unit 7 permanent. (S12).

次に、マスタ40のレプリケーション制御部16は、各レプリカ50ヘレプリケーション要求を送信する(S13)。各レプリカ50から、レコードデータに関するコミットログの永続化が完了した旨の通知を、レプリカ50の合計台数のうち、過半数のレプリカから受信した場合(S14のYes)、マスタ40の更新実行部13は、レコードデータのコミットログが永続化したものとみなして、このコミットログをカウントする(S16)。一方、過半数のレプリカから上記通知を受信できなかった場合は(S14のNo)、マスタ40の更新実行部13エラーと判断する(S15)。   Next, the replication control unit 16 of the master 40 transmits a replication request to each replica 50 (S13). When the notification that the persistence of the commit log related to the record data is completed is received from each replica 50 from the majority of replicas out of the total number of replicas 50 (Yes in S14), the update execution unit 13 of the master 40 Assuming that the commit log of record data is made permanent, this commit log is counted (S16). On the other hand, when the notification cannot be received from the majority of replicas (No in S14), it is determined that the update execution unit 13 error of the master 40 is present (S15).

次に、マスタ40の更新実行部14は、自身のコミットログ記憶部8のコミットログの量が所定のウインドウ幅に達しているか否かを判定する(S17)。所定のウインドウ幅に達した場合は(S17のYes)、チェックポイント取得部6はチェックポイント取得を実施する(S17のYes)。一方、所定のウインドウ幅に達していない場合は(S17のNo)、レコードデータをレコードデータ記憶部へ更新する(S20)。次に、マスタの更新実行部14は、所定のウインドウ幅の範囲外にあるコミットログの削除をコミットログ制御部15に指示して削除する(S19)。次に、更新実行部14は、削除したコミットログに対応するレコードデータをレコードデータ記憶部7へ更新する(S20)。S20の処理については、削除と同期して実行してもよいし、非同期に実行してもよい。以上により、不要となったコミットログの削除が終了する。   Next, the update execution unit 14 of the master 40 determines whether or not the amount of commit logs in its own commit log storage unit 8 has reached a predetermined window width (S17). When the predetermined window width is reached (Yes in S17), the checkpoint acquisition unit 6 performs checkpoint acquisition (Yes in S17). On the other hand, when the predetermined window width is not reached (No in S17), the record data is updated to the record data storage unit (S20). Next, the master update execution unit 14 instructs the commit log control unit 15 to delete the commit log that is outside the predetermined window width (S19). Next, the update execution unit 14 updates the record data corresponding to the deleted commit log to the record data storage unit 7 (S20). The process of S20 may be executed in synchronization with the deletion or may be executed asynchronously. This completes the deletion of the commit log that is no longer needed.

第4の実施の形態のマスタ40及びレプリカ50からなる構成では、マスタ40はクライアント装置1から更新要求を受けて、レプリカ50へレプリケーション要求(以下、「複製依頼」という)を送信する(上記S13)。レプリカ50側では、複製依頼を受けてレプリカ50で生成したコミットログをコミットログ記憶部8へ永続化する。ここで、レプリカ50もマスタ40と同様の装置構成であったとして、レコードデータ記憶部7へレコードデータの更新を反映するか否かは問わない。この理由は、リアルタイムでレコードデータ記憶部7へ更新を反映してもよいし、マスタ40が故障等によりダウンし、レプリカ50が新たなマスタ40なったタイミングで新マスタ40のコミットログからレコードデータ記憶部7への更新を行ってもよいからである。即ち、レプリカ50側でマスタ40側と同一のコミットログがコミットログ記憶部8へ永続化されていればよい。   In the configuration including the master 40 and the replica 50 according to the fourth embodiment, the master 40 receives an update request from the client device 1 and transmits a replication request (hereinafter referred to as “replication request”) to the replica 50 (S13 described above). ). On the replica 50 side, the commit log generated by the replica 50 in response to the replication request is made permanent in the commit log storage unit 8. Here, assuming that the replica 50 has the same device configuration as that of the master 40, it does not matter whether or not the record data storage unit 7 reflects the update of the record data. The reason is that the update may be reflected in the record data storage unit 7 in real time, or the record data from the commit log of the new master 40 at the timing when the master 40 goes down due to failure or the like and the replica 50 becomes the new master 40. This is because the storage unit 7 may be updated. That is, it is only necessary that the same commit log on the replica 50 side as that on the master 40 side is made permanent in the commit log storage unit 8.

但し、レプリカ50でのレコードデータ記憶部7への更新順序、即ち、コミットログの永続化の順序は、マスタ40と同一である必要がある。これは、更新データの適用順序が入れ替わると不整合が起こる場合があるからである。例えば、コミットログIDが1のときにレコード集合Aを新規挿入し、コミットログIDが2のときにレコード集合Aのレコードデータを変更したとする。レプリカ50でこの順序が入れ替わると、レコード集合Aのレコードデータ変更から適用するが、まだレコード集合Aが存在していないため、エラーとなってしまうのである。   However, the update order to the record data storage unit 7 in the replica 50, that is, the order of permanent commit log needs to be the same as that of the master 40. This is because an inconsistency may occur when the application order of the update data is changed. For example, it is assumed that the record set A is newly inserted when the commit log ID is 1, and the record data of the record set A is changed when the commit log ID is 2. If this order is changed in the replica 50, it is applied from the record data change of the record set A. However, since the record set A does not exist yet, an error occurs.

そこで、マスタ40が複製依頼をする度にコミットログに単調増加する連番を付し、レプリカ50ではこの連番を元に、上記の様に順序の入れ替えが起きていないか否かの判定を行う。ここで、この連番をそのままコミットログIDとして利用してもよいし、連番とコミットログIDは別体系でも構わない。   Therefore, each time the master 40 makes a replication request, a monotonically increasing serial number is assigned to the commit log, and the replica 50 determines whether or not the order has changed as described above based on this serial number. Do. Here, the serial number may be used as the commit log ID as it is, or the serial number and the commit log ID may be different systems.

レプリカ50では、最後に永続化したコミットログの連番を連番記憶部(不図示)に記憶しておき、どこまでコミットログ記憶部8に永続化したかを保持しておく。複製依頼を受けると、その連番と連番記憶部にある連番とを比較し、歯抜けが無いかを判定する。例えば、連番記憶部に連番の「3」が記憶されている場合、次には4番の複製依頼がマスタ40からくると期待するが、実際に来た番号が5番以降であった場合は、歯抜けであると判定される。この場合は、通信障害などにより、4番が到着できなかった可能性があるため、レプリカ50は複製依頼の再送を要求し、4番の到着を待ってから4番及び5番の複製処理(コミットログ記憶部8への更新)を実施する。ここで、複数の連番が歯抜けだと分かった時は、その分の再送要求を出す。再送要求は一ずつ出してもよいし、まとめて出してもよい。一方、マスタ40は、レプリカ50からの再送要求がいつ来るか分からないため、コミットログを削除するタイミングを決めることができない。   In the replica 50, the serial number of the last committed commit log is stored in a serial number storage unit (not shown) and the extent to which the commit log storage unit 8 has been made permanent is stored. When a copy request is received, the serial number and the serial number in the serial number storage unit are compared to determine whether there is a missing tooth. For example, when the serial number “3” is stored in the serial number storage unit, it is expected that the replication request No. 4 will come from the master 40 next, but the actual number came from the fifth or later. In the case, it is determined that the tooth is missing. In this case, there is a possibility that No. 4 could not arrive due to a communication failure or the like. Therefore, the replica 50 requests retransmission of the copy request, waits for the arrival of No. 4, and then the No. 4 and No. 5 replication processes ( Update to the commit log storage unit 8). Here, when it is determined that a plurality of serial numbers are missing, a re-transmission request is issued accordingly. Re-transmission requests may be issued one by one or may be issued together. On the other hand, since the master 40 does not know when the retransmission request from the replica 50 comes, the master 40 cannot determine the timing for deleting the commit log.

そこで、マスタ40は、保持しておくコミットログの量のウインドウ幅として、各レプリカ50で用いられるコミットログの量のウインドウ幅と同じ値を用い、レプリカ50側からそのウインドウ幅の範囲外のコミットログの再送を要求された場合は、既に無いので、初期状態から立ち上がる様にレプリカ50側へ応答する。このような応答を受けたレプリカ50は、初期状態からの立ち上げ要求を受けて、マスタ40の有するチェックポイントとコミットログをマスタ40から再送してもらい、これを用いてマスタ40と同一の状態へのリカバリを実施する。   Therefore, the master 40 uses the same value as the window width of the amount of commit logs used in each replica 50 as the window width of the amount of commit logs to be held, and commits outside the window width range from the replica 50 side. If a log re-transmission is requested, it is not already present, so a response is made to the replica 50 side so as to rise from the initial state. Upon receiving such a response, the replica 50 receives the start-up request from the initial state, re-transmits the checkpoint and commit log of the master 40 from the master 40, and uses this to use the same state as the master 40. Perform recovery to.

以上のような状態では、最新のコミットログからマスタ40が定めたウインドウ幅(Windowサイズ)は、例えば、所定期間分(例えば、過去1時間分)、又は所定個数(例えば、最新から100個分)を残して、それ以前のコミットログは削除してよいと判定する。また、複製依頼の再送要求と併せて削除判定を実施することも可能である。   In the state as described above, the window width (Window size) determined by the master 40 from the latest commit log is, for example, for a predetermined period (for example, the past one hour) or a predetermined number (for example, 100 for the latest). ), And it is determined that previous commit logs can be deleted. It is also possible to perform deletion determination together with a retransmission request for a copy request.

図12は、レプリカ50からマスタ40への再送要求を説明する図である。図12(a)に示すように、マスタでは保持するコミットログの量をWindowサイズとして決めている。この場合は、マスタはコミットログ1〜10を保持しているが、Windowサイズは「5」であるので、コミットログ1〜5は削除してよいコミットログとなる。図12(b)では、レプリカ1は、コミットログ1〜7を保持しているが、最新化するためにコミットログ8〜10をマスタ40から再送してもらう。図12(c)では、コミットログ4〜9の再送を要求したいが、Windowサイズを上回るため再送できない。よって、リカバリするため初期状態から立ち上げるリカバリールートに入ることになる。即ち、レプリカ50は、マスタ40からチェックポイントファイルとコミットログ5〜9とを再送してもらう。   FIG. 12 is a diagram for explaining a retransmission request from the replica 50 to the master 40. As shown in FIG. 12A, the master determines the amount of commit log to be held as the window size. In this case, the master holds the commit logs 1 to 10, but since the window size is “5”, the commit logs 1 to 5 are commit logs that may be deleted. In FIG. 12B, the replica 1 holds the commit logs 1 to 7, but the commit logs 8 to 10 are retransmitted from the master 40 to be updated. In FIG. 12C, it is desired to request retransmission of the commit logs 4 to 9, but cannot be retransmitted because it exceeds the window size. Therefore, a recovery route started from the initial state is entered for recovery. That is, the replica 50 has the master 40 retransmit the checkpoint file and the commit logs 5 to 9.

第4の実施の形態によれば、マスタ40は、最新のコミットログからどこまでを削除可能か、レプリカ50と同じウインドウ幅を用いることにより、マスタ40とレプリカ50が事前に設定したウインドウ幅の範囲外のコミットログは各自で独立に削除してよい構成を備えているため、レプリカ50に問い合わせることなくそれ以前のコミットログを削除することが可能となる。よって、マスタ40と各レプリカ50との間で削除に関する問い合わせのための通信がなくなるため、ネットワークの負荷を下げることが可能になる。   According to the fourth embodiment, the master 40 uses the same window width as the replica 50 to determine how far the latest commit log can be deleted. Since the other commit logs can be deleted independently, it is possible to delete previous commit logs without inquiring the replica 50. Therefore, since there is no communication for inquiry about deletion between the master 40 and each replica 50, it is possible to reduce the load on the network.

(第5の実施の形態)
第5の実施の形態では、第4の実施の形態に記載したように、マスタ及びレプリカが自立的に削除実施する方式ではなく、マスタ側で削除可能範囲を判断し、各レプリカに通知する方式である。
(Fifth embodiment)
In the fifth embodiment, as described in the fourth embodiment, the master and replica do not perform the deletion autonomously, but the master determines the deletion possible range and notifies each replica. It is.

図13は、第5の実施の形態に係るログファイル管理システムの構成図である。第4の実施の形態と同様の機能を有する構成を示す部位については、同様の符号を付し、その説明の重複を省略する。
マスタ60の更新実行部24が各レプリカ70にレプリケーション要求を送信した後、各レプリカ70はマスタ60に対してレプリカ完了という応答(ACK)を送信する。マスタ60の更新実行部24は、この応答に基づいて、マスタ60自身及び各レプリカ70がどのコミットログIDまで永続化が完了したかを示すコミットログ適用状況表を作成して保持しておき、各レプリカ70からACKを受信したときは、このコミットログ適用状況表を更新する。
FIG. 13 is a configuration diagram of a log file management system according to the fifth embodiment. The parts having the same functions as those in the fourth embodiment are denoted by the same reference numerals, and the description thereof is not repeated.
After the update execution unit 24 of the master 60 transmits a replication request to each replica 70, each replica 70 transmits a response (ACK) indicating that the replica is complete to the master 60. Based on this response, the update execution unit 24 of the master 60 creates and holds a commit log application status table indicating to which commit log ID the master 60 itself and each replica 70 have been persisted, When an ACK is received from each replica 70, this commit log application status table is updated.

図14は、第5の実施の形態におけるコミットログの適用を示す図である。図14は、レプリカ4とマスタとの間で、コミットログID=9以降のレプリケーション要求発生時に通信途絶が発生しており、レプリカ4ではコミットログID=8の適用までしか完了しておらず、その後、図14に示すコミットログID=10のレプリケーション終了後、レプリカ4とマスタとの間での通信途絶が解消している場合を示している。図14に示すように、コミットログID=10のレプリケーション要求の送信に対し、レプリカ70(ここでは、レプリカ1〜3とする)は、マスタに対してACKを送信するが、レプリカ4は、コミットログID=8までしか永続化が完了していないためACKを送信することができない。マスタの更新実行部24は、レプリカ1〜3からACKを受信することにより、ACKに基づいてコミットログ適用状況表を更新し、レプリカ毎の最新のコミットログIDの適用状況を把握しておくことができ、各レプリカに対して削除可能なコミットログIDを通知することができる。また、マスタがコミットログID=11の複製依頼をしてきたときは、レプリカ4はマスタに対して、コミットログID=9、10の再送要求を送信する。   FIG. 14 is a diagram illustrating application of the commit log according to the fifth embodiment. In FIG. 14, communication interruption occurs between the replica 4 and the master when a replication request after the commit log ID = 9 occurs, and the replica 4 has only completed the application of the commit log ID = 8. After that, after the replication with the commit log ID = 10 shown in FIG. 14, the communication interruption between the replica 4 and the master is resolved. As shown in FIG. 14, in response to the transmission of the replication request with the commit log ID = 10, the replica 70 (here, replicas 1 to 3) transmits ACK to the master, but the replica 4 is committed. Since the perpetuation is completed only up to log ID = 8, ACK cannot be transmitted. The master update execution unit 24 receives the ACKs from the replicas 1 to 3 to update the commit log application status table based on the ACKs so as to grasp the application status of the latest commit log ID for each replica. The commit log ID that can be deleted can be notified to each replica. Further, when the master makes a replication request with the commit log ID = 11, the replica 4 transmits a retransmission request with the commit log ID = 9, 10 to the master.

コミットログの削除は、マスタ60側の任意のタイミングで実行できる。例えば、マスタ60内でチェックポイント取得がなされたタイミング、所定時間、コミットログの更新量が所定、又は、ユーザの決めた任意のタイミングで、コミットログの削除を実施する。この場合、マスタ60の更新実行部24は、保持するコミットログ適用状況表を参照し、各レプリカ70が有するコミットログIDの中で一番古い(小さい)コミットログID(もしくは時刻)を選定し、それ以前のコミットログを削除してよいと判定する。判定後、マスタ60は各レプリカ70にそのコミットログIDを通知し、レプリカ70はその通知を基にコミットログIDの削除を実施する。   The commit log can be deleted at any timing on the master 60 side. For example, the commit log is deleted at a timing at which a checkpoint is acquired in the master 60, a predetermined time, an update amount of the commit log is predetermined, or an arbitrary timing determined by the user. In this case, the update execution unit 24 of the master 60 selects the oldest (smallest) commit log ID (or time) among the commit log IDs of each replica 70 with reference to the stored commit log application status table. It is determined that the previous commit log can be deleted. After the determination, the master 60 notifies each replica 70 of the commit log ID, and the replica 70 deletes the commit log ID based on the notification.

次に、ログファイル管理システム300における処理の流れを図15に示すフローチャートで説明する。まず、更新要求部2はクライアント装置1からレコードデータの更新要求を受け付ける(S31)。次に、この更新要求に基づいて、コミットログ生成部3はコミットログを生成し、更新実行部24はコミットログ記憶部7にコミットログの永続化をコミットログ制御部15へ指示して永続化させる(S32)。   Next, the flow of processing in the log file management system 300 will be described with reference to the flowchart shown in FIG. First, the update request unit 2 receives a record data update request from the client device 1 (S31). Next, based on this update request, the commit log generation unit 3 generates a commit log, and the update execution unit 24 instructs the commit log storage unit 7 to make the commit log persistent to the commit log control unit 15 and makes it permanent. (S32).

次に、レプリケーション制御部16は、各レプリカ70ヘレプリケーション要求を送信する。マスタ60の更新実行部24は、各レプリカ70から、レコードデータに関するコミットログの永続化が完了した旨の通知を受信する(S33)。この通知には、マスタ60がどのコミットログに対する通知かわかるように、コミットログID、コミットログそのもの、又は、マスタ60がコミットログを出力した時刻が含まれているものとする。マスタ60の更新実行部24は、この通知に基づいて、コミットログ適用状況表を作成又は更新する(S34)。マスタ60の更新処理実行部24は、各レプリカ70が有するコミットログのうち最も古く生成されたコミットログを選定する(S35)。チェックポイント取得部6は、この最も古く生成されたコミットログに対応するチェックポイントを取得する(S36)。マスタ60の更新実行部24は、最も古く生成されたコミットログ以前のコミットログを削除すると共にレプリカ70ヘ通知し、レプリカ70は該当するコミットログを削除する(S37)。以上により、不要となったコミットログの削除が終了する。   Next, the replication control unit 16 transmits a replication request to each replica 70. The update execution unit 24 of the master 60 receives notification from the replicas 70 that the commit log related to record data has been made permanent (S33). It is assumed that this notification includes the commit log ID, the commit log itself, or the time when the master 60 outputs the commit log so that the master 60 can know which commit log the notification is sent to. The update execution unit 24 of the master 60 creates or updates a commit log application status table based on this notification (S34). The update process execution unit 24 of the master 60 selects the oldest commit log generated from the commit logs of each replica 70 (S35). The checkpoint acquisition unit 6 acquires a checkpoint corresponding to the oldest generated commit log (S36). The update execution unit 24 of the master 60 deletes the commit log before the oldest generated commit log and notifies the replica 70, and the replica 70 deletes the corresponding commit log (S37). This completes the deletion of the commit log that is no longer needed.

第5の実施の形態によれば、マスタ60が自身及びレプリカ70が有するコミットログの適用状況を管理し、マスタ60からレプリカ70ヘ適用状況を通知するので、マスタ60と各レプリカ70との間で適用状況に関する問い合わせをする必要がなくなり、ネットワークの負荷を下げることが可能になる。   According to the fifth embodiment, the master 60 manages the application status of the commit log that the master 60 and the replica 70 have, and the master 60 notifies the replica 70 of the application status. This eliminates the need for inquiries about the application status, and makes it possible to reduce the load on the network.

1 クライアント装置
2 要求受付部
3 コミットログ生成部
4 更新実行部
5 コミットログ制御部
6 チェックポイント取得部
7 レコードデータ記憶部
8 コミットログ記憶部
9 チェックポイント記憶部
14 更新実行部
15 コミットログ制御部
16 レプリケーション制御部
17 通信制御部
24 更新実行部
40 マスタ
50 レプリカ
60 マスタ
70 レプリカ
100 ログファイル管理装置
200 ログファイル管理システム
300 ログファイル管理システム
DESCRIPTION OF SYMBOLS 1 Client apparatus 2 Request reception part 3 Commit log production | generation part 4 Update execution part 5 Commit log control part 6 Checkpoint acquisition part 7 Record data storage part 8 Commit log storage part 9 Checkpoint storage part 14 Update execution part 15 Commit log control part DESCRIPTION OF SYMBOLS 16 Replication control part 17 Communication control part 24 Update execution part 40 Master 50 Replica 60 Master 70 Replica 100 Log file management apparatus 200 Log file management system 300 Log file management system

Claims (10)

レコードデータの集合であるレコード集合に対して、前記レコードデータの更新作業に基づいて、前記レコードデータそれぞれの更新内容を示すコミットログを生成して蓄積した共有ファイルを作成し、管理するログファイル管理装置であって、
前記共有ファイルを記憶するコミットログ記憶部と、
クライアント装置から前記レコードデータの更新要求を受け付ける要求受付部と、
前記更新要求に基づいて前記コミットログを生成し、このコミットログを前記共有ファイルへ永続化するコミットログ生成部と、
レコードデータ記憶部に記憶されるレコードデータを、任意のタイミングでチェックポイントとして取得して永続化し、各レコード集合毎に、チェックポイントが取得された時点を比較し、最も古いチェックポイントが取得された以前の前記コミットログを不要なコミットログとして削除を指示する更新実行部と、
前記任意のタイミングのレコードデータを前記レコードデータ記憶部からチェックポイントとして取得して永続化してチェックポイント記憶部に記憶するチェックポイント取得部と、
前記更新実行部からの指示に基づき、前記共有ファイルに蓄積されたコミットログから、前記チェックポイント取得時以前のコミットログを削除するコミットログ制御部とを備える
ことを特徴とするログファイル管理装置。
Log file management for creating and managing a shared file in which a commit log indicating the update contents of each record data is generated and stored for a record set that is a set of record data based on the update operation of the record data A device,
A commit log storage unit for storing the shared file;
A request receiving unit that receives an update request for the record data from a client device;
A commit log generating unit that generates the commit log based on the update request and makes the commit log permanent to the shared file;
Record data stored in the record data storage unit is acquired as a checkpoint at an arbitrary timing and made permanent, and for each record set, the time when the checkpoint is acquired is compared, and the oldest checkpoint is acquired. An update execution unit that instructs the previous commit log to be deleted as an unnecessary commit log;
A checkpoint acquisition unit that acquires the record data of the arbitrary timing as a checkpoint from the record data storage unit and stores the checkpoint in a checkpoint storage unit;
A log file management apparatus comprising: a commit log control unit that deletes a commit log before the checkpoint acquisition time from a commit log accumulated in the shared file based on an instruction from the update execution unit.
前記コミットログ生成部は、前記コミットログを生成した順に、前記共有ファイルに蓄積し、その共有ファイルが複数からなる場合、
前記コミットログ制御部は、前記コミットログを削除するとき、前記共有ファイルのうち、当該共有ファイルの最新のコミットログが前記最も古いチェックポイントの取得時点よりも古い共有ファイルを、ファイル単位で削除する
ことを特徴とする請求項1に記載のログファイル管理装置。
The commit log generation unit accumulates the shared logs in the order in which the commit logs are generated, and when the shared file includes a plurality of files,
When deleting the commit log, the commit log control unit deletes, in file units, a shared file in which the latest commit log of the shared file is older than the acquisition point of the oldest checkpoint. The log file management apparatus according to claim 1.
ノード間で共有するレコードデータの集合であるレコード集合に対して、前記レコードデータの更新作業に基づいて、前記レコードデータそれぞれの更新内容を示すコミットログを生成して蓄積した共有ファイルを作成し、管理するログファイル管理システムであって、
クライアント装置から前記レコードデータの更新要求を受け付けて当該レコードデータの更新処理を行うマスタのログファイル管理装置と、当該マスタのログファイル管理装置の当該レコードデータの更新に対応して、当該同一のレコードデータを複製し更新するレプリカのログファイル管理装置とを備え、
前記ログファイル管理装置はそれぞれ、
前記共有ファイルを記憶するコミットログ記憶部と、
クライアント装置から前記レコードデータの更新要求を受け付ける要求受付部と、
前記更新要求に基づいて前記コミットログを生成し、このコミットログを前記共有ファイルへ永続化するコミットログ生成部と、
前記各レコード集合に対する前記共有ファイルに蓄積されたコミットログが所定の範囲にあるか否かを判定し、当該コミットログが所定の範囲を超えたときは、当該所定の範囲を超えたコミットログを不要なコミットログとして削除を指示する更新実行部と、
レコードデータ記憶部に記憶される前記レコードデータをチェックポイントとして取得してチェックポイント記憶部に記憶するチェックポイント取得部と、
前記更新実行部からの指示に基づき、前記共有ファイルに蓄積されたコミットログから不要なコミットログを削除するコミットログ制御部と、
他のログファイル管理装置との間で通信を行う通信制御部とを備え、
自身のログファイル管理装置が前記マスタのログファイル管理装置であるとき、前記ログファイル管理装置は、さらに、
前記レプリカのログファイル管理装置それぞれへ、当該マスタのログファイル管理装置におけるレコードデータの更新に対応して、当該同一のレコードデータを複製し、更新するよう要求するレプリケーション要求を送信し、当該レプリカのログファイル管理装置それぞれから、前記レプリケーション要求に基づくレコードデータ更新に関するコミットログの永続化が完了した旨の応答を受信するレプリケーション制御部を備え、
前記所定の範囲を示す値として、前記マスタ及び前記レプリカのログファイル管理装置は同一の値を用いる
ことを特徴とするログファイル管理システム。
For a record set that is a set of record data shared between nodes, based on the update operation of the record data, create a shared file that generates and accumulates a commit log indicating the update contents of each record data, A log file management system to manage,
The master log file management device that receives the record data update request from the client device and performs the update processing of the record data, and the same record corresponding to the update of the record data of the master log file management device A replica log file management device that replicates and updates data,
Each of the log file management devices is
A commit log storage unit for storing the shared file;
A request receiving unit that receives an update request for the record data from a client device;
A commit log generating unit that generates the commit log based on the update request and makes the commit log permanent to the shared file;
It is determined whether or not the commit log accumulated in the shared file for each record set is within a predetermined range. When the commit log exceeds the predetermined range, the commit log exceeding the predetermined range is An update execution unit that instructs deletion as an unnecessary commit log,
And checkpoint acquisition unit that stores the checkpoint storage unit obtains the record data stored in the record data storage unit as a checkpoint,
A commit log control unit that deletes unnecessary commit logs from the commit log accumulated in the shared file based on an instruction from the update execution unit;
A communication control unit for communicating with other log file management devices,
When its own log file management device is the master log file management device, the log file management device further includes:
In response to the update of record data in the master log file management device, a replication request is issued to each replica log file management device to request that the same record data be copied and updated. From each log file management device, comprising a replication control unit for receiving a response to the effect that persistence of commit log related to record data update based on the replication request is completed,
The log file management system, wherein the master and the replica log file management devices use the same value as the value indicating the predetermined range.
ノード間で共有するレコードデータの集合であるレコード集合に対して、前記レコードデータの更新作業に基づいて、前記レコードデータそれぞれの更新内容を示すコミットログを生成して蓄積した共有ファイルを作成し、管理するログファイル管理システムであって、
クライアント装置から前記レコードデータの更新要求を受け付けて当該レコードデータの更新処理を行うマスタのログファイル管理装置と、当該マスタのログファイル管理装置の当該レコードデータの更新に対応して、当該同一のレコードデータを複製し更新するレプリカのログファイル管理装置とを備え、
前記ログファイル管理装置は、
前記共有ファイルを記憶するコミットログ記憶部と、
前記クライアント装置から前記レコードデータの更新要求を受け付ける要求受付部と、
前記更新要求に基づいて前記コミットログを生成し、このコミットログを前記共有ファイルへ永続化するコミットログ生成部と、
前記各レコード集合に対する前記共有ファイルに蓄積されたコミットログのうち不要なコミットログの削除を指示する更新実行部と、
レコードデータ記憶部に記憶される前記レコードデータをチェックポイントとして取得してチェックポイント記憶部に記憶するチェックポイント取得部と、
前記更新実行部からの指示に基づき、前記共有ファイルに蓄積されたコミットログから、前記最も古いチェックポイント取得時以前のコミットログを削除するコミットログ制御部と、
他のログファイル管理装置との間で通信を行う通信制御部とを備え、
自身のログファイル管理装置が前記マスタのログファイル管理装置であるとき、前記ログファイル管理装置は、さらに、
前記レプリカのログファイル管理装置それぞれへ、当該マスタのログファイル管理装置におけるレコードデータの更新に対応して、当該同一のレコードデータを複製し、更新するよう要求するレプリケーション要求を送信し、当該レプリカのログファイル管理装置それぞれから、前記レプリケーション要求に基づくレコードデータ更新に関するコミットログの永続化が完了した旨の応答を受信するレプリケーション制御部を備え、
前記マスタのログファイル管理装置の更新実行部は、
前記レプリカのログファイル管理装置が有するコミットログのうち、最も古いコミットログを選定し、当該コミットログ以前に生成されたコミットログを不要なコミットログとして削除する旨を前記レプリカのログファイル管理装置ヘ通知すると共に自身のログファイル管理装置が有する当該コミットログを削除し、
前記レプリカのログファイル管理装置の更新実行部は、前記通知に基づいて前記コミットログを削除する
ことを特徴とするログファイル管理システム。
For a record set that is a set of record data shared between nodes, based on the update operation of the record data, create a shared file that generates and accumulates a commit log indicating the update contents of each record data, A log file management system to manage,
The master log file management device that receives the record data update request from the client device and performs the update processing of the record data, and the same record corresponding to the update of the record data of the master log file management device A replica log file management device that replicates and updates data,
The log file management device
A commit log storage unit for storing the shared file;
A request receiving unit that receives an update request for the record data from the client device;
A commit log generating unit that generates the commit log based on the update request and makes the commit log permanent to the shared file;
An update execution unit for instructing to delete unnecessary commit logs among the commit logs accumulated in the shared file for each record set;
And checkpoint acquisition unit that stores the checkpoint storage unit obtains the record data stored in the record data storage unit as a checkpoint,
Based on an instruction from the update execution unit, a commit log control unit that deletes a commit log before the oldest checkpoint acquisition time from the commit log accumulated in the shared file;
A communication control unit for communicating with other log file management devices,
When its own log file management device is the master log file management device, the log file management device further includes:
In response to the update of record data in the master log file management device, a replication request is issued to each replica log file management device to request that the same record data be copied and updated. From each log file management device, comprising a replication control unit for receiving a response to the effect that persistence of commit log related to record data update based on the replication request is completed,
The update execution unit of the master log file management device,
Among the commit logs of the replica log file management apparatus, the oldest commit log is selected, and the replica log file management apparatus is notified that the commit log generated before the commit log is deleted as an unnecessary commit log. remove the commit log has its own log file management apparatus with the notification to,
The log file management system, wherein the update execution unit of the replica log file management device deletes the commit log based on the notification.
請求項3に記載のログファイル管理システムに用いられる前記ログファイル管理装置。   The log file management device used in the log file management system according to claim 3. 請求項4に記載のログファイル管理システムに用いられる前記ログファイル管理装置。   The log file management device used in the log file management system according to claim 4. レコードデータの集合であるレコード集合に対して、前記レコードデータの更新作業に基づいて、前記レコードデータそれぞれの更新内容を示すコミットログを生成して蓄積した共有ファイルを作成し、管理するログファイル管理装置に用いるログファイル管理方法であって、
前記ログファイル管理装置は、
クライアント装置から前記レコードデータの更新要求を要求受付部により受け付けるステップと、
前記更新要求に基づいて前記コミットログを生成し、当該コミットログを前記共有ファイルを有するコミットログ記憶部へ永続化するステップと、
レコードデータ記憶部に記憶されるレコードデータを、任意のタイミングでチェックポイントとして取得して永続化し、チェックポイント記憶部に記憶するステップと、
各レコード集合毎に、前記チェックポイントが取得された時点を比較し、最も古いチェックポイントが取得された時点以前の前記コミットログを不要なコミットログとして削除するステップとを備える
ことを特徴とするログファイル管理方法。
Log file management for creating and managing a shared file in which a commit log indicating the update contents of each record data is generated and stored for a record set that is a set of record data based on the update operation of the record data A log file management method used for a device,
The log file management device
Receiving a request for updating the record data from a client device by a request receiving unit;
Generating the commit log based on the update request and perpetuating the commit log in a commit log storage unit having the shared file;
The record data stored in the record data storage unit is acquired as a checkpoint at an arbitrary timing and made permanent, and stored in the checkpoint storage unit;
A log comparing the time when the checkpoint was acquired for each record set, and deleting the commit log before the time when the oldest checkpoint was acquired as an unnecessary commit log. File management method.
ノード間で共有するレコードデータの集合であるレコード集合に対して、前記レコードデータの更新作業に基づいて、前記レコードデータそれぞれの更新内容を示すコミットログを生成して蓄積した共有ファイルを作成して管理し、クライアント装置から前記レコードデータの更新要求を受け付けて当該レコードデータの更新処理を行うマスタのログファイル管理装置と、当該マスタのログファイル管理装置の当該レコードデータの更新に対応して、当該同一のレコードデータを複製し更新するレプリカのログファイル管理装置とを備えるログファイル管理システムのログファイル管理装置に用いるログファイル管理方法であって、
前記ログファイル管理装置は、
前記クライアント装置から前記レコードデータの更新要求を受け付けるステップと、
前記更新要求に基づいて前記コミットログを生成し、このコミットログを前記共有ファイルへ永続化するステップと、
前記各レコード集合に対する前記共有ファイルに蓄積されたコミットログが所定の範囲にあるか否かを判定するステップと、
前記コミットログが所定の範囲を超えたときは、当該所定の範囲を超えたコミットログを不要なコミットログとして削除するステップと、
レコードデータ記憶部に記憶される前記レコードデータをチェックポイントとして取得してチェックポイント記憶部に記憶するステップと、
自身のログファイル管理装置が前記マスタのログファイル管理装置であるとき、前記ログファイル管理装置は、さらに、
前記レプリカのログファイル管理装置それぞれへ、当該マスタのログファイル管理装置におけるレコードデータの更新に対応して、当該同一のレコードデータを複製し、更新するよう要求するレプリケーション要求を送信し、当該レプリカのログファイル管理装置それぞれから、前記レプリケーション要求に基づくレコードデータ更新に関するコミットログの永続化が完了した旨の応答を受信するステップとを備え、
前記所定の範囲を示す値として、前記マスタ及び前記レプリカのログファイル管理装置は同一の値を用いる
ことを特徴とするログファイル管理方法。
For a record set that is a set of record data shared between nodes, based on the update operation of the record data, create a shared file that generates and accumulates a commit log indicating the update contents of each record data The master log file management device that receives the update request of the record data from the client device and performs the update processing of the record data, and corresponding to the update of the record data of the log file management device of the master, A log file management method for use in a log file management device of a log file management system comprising a replica log file management device that replicates and updates the same record data,
The log file management device
Receiving an update request for the record data from the client device;
Generating the commit log based on the update request and persisting the commit log to the shared file;
Determining whether the commit log accumulated in the shared file for each record set is within a predetermined range;
Deleting the commit log exceeding the predetermined range as an unnecessary commit log when the commit log exceeds the predetermined range;
And storing the checkpoint storage unit obtains the record data stored in the record data storage unit as a checkpoint,
When its own log file management device is the master log file management device, the log file management device further includes:
In response to the update of record data in the master log file management device, a replication request is issued to each replica log file management device to request that the same record data be copied and updated. Receiving from the log file management device a response that the persistence of the commit log related to the record data update based on the replication request is completed,
The log file management method, wherein the master and replica log file management devices use the same value as the value indicating the predetermined range.
ノード間で共有するレコードデータの集合であるレコード集合に対して、前記レコードデータの更新作業に基づいて、前記レコードデータそれぞれの更新内容を示すコミットログを生成して蓄積した共有ファイルを作成して管理し、クライアント装置から前記レコードデータの更新要求を受け付けて当該レコードデータの更新処理を行うマスタのログファイル管理装置と、当該マスタのログファイル管理装置の当該レコードデータの更新に対応して、当該同一のレコードデータを複製し更新するレプリカのログファイル管理装置とを備えるログファイル管理システムのログファイル管理装置に用いるログファイル管理方法であって、
前記ログファイル管理装置は、
クライアント装置から前記レコードデータの更新要求を受け付けるステップと、
前記更新要求に基づいて前記コミットログを生成し、このコミットログを前記共有ファイルへ永続化するステップと、
前記各レコード集合に対する前記共有ファイルに蓄積されたコミットログのうち不要なコミットログを削除するステップと、
レコードデータ記憶部に記憶される前記レコードデータをチェックポイントとして取得してチェックポイント記憶部に記憶するステップと、
前記レプリカのログファイル管理装置それぞれへ、当該マスタのログファイル管理装置におけるレコードデータの更新に対応して、当該同一のレコードデータを複製し、更新するよう要求するレプリケーション要求を送信し、当該レプリカのログファイル管理装置それぞれから、前記レプリケーション要求に基づくレコードデータ更新に関するコミットログの永続化が完了した旨の応答を受信するステップと、
自身のログファイル管理装置が前記マスタのログファイル管理装置であるとき、前記ログファイル管理装置は、さらに、
前記レプリカのログファイル管理装置が有するコミットログのうち、最も古いコミットログを選定し、当該コミットログ以前に生成されたコミットログを不要なコミットログとして削除する旨を前記レプリカのログファイル管理装置ヘ通知すると共に自身のログファイル管理装置が有する当該コミットログを削除するステップと、
前記レプリカのログファイル管理装置のコミットログ制御部は、前記通知に基づいて前記コミットログを削除するステップとを備える
ことを特徴とするログファイル管理方法。
For a record set that is a set of record data shared between nodes, based on the update operation of the record data, create a shared file that generates and accumulates a commit log indicating the update contents of each record data The master log file management device that receives the update request of the record data from the client device and performs the update processing of the record data, and corresponding to the update of the record data of the log file management device of the master, A log file management method for use in a log file management device of a log file management system comprising a replica log file management device that replicates and updates the same record data,
The log file management device
Receiving an update request for the record data from a client device;
Generating the commit log based on the update request and persisting the commit log to the shared file;
Deleting unnecessary commit logs from among the commit logs accumulated in the shared file for each record set;
And storing the checkpoint storage unit obtains the record data stored in the record data storage unit as a checkpoint,
In response to the update of record data in the master log file management device, a replication request is issued to each replica log file management device to request that the same record data be copied and updated. Receiving from the log file management device a response that the persistence of the commit log related to the record data update based on the replication request is completed;
When its own log file management device is the master log file management device, the log file management device further includes:
Among the commit logs of the replica log file management apparatus, the oldest commit log is selected, and the replica log file management apparatus is notified that the commit log generated before the commit log is deleted as an unnecessary commit log. a step of deleting the commit log has its own log file management apparatus with the notification to,
The commit log control unit of the replica log file management apparatus includes a step of deleting the commit log based on the notification.
請求項7乃至9のいずれか1項に記載のログファイル管理方法をコンピュータに実行させるためのプログラム。   A program for causing a computer to execute the log file management method according to any one of claims 7 to 9.
JP2009131387A 2009-05-29 2009-05-29 Log file management device, log file management system, log file management method and program thereof Expired - Fee Related JP5432596B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009131387A JP5432596B2 (en) 2009-05-29 2009-05-29 Log file management device, log file management system, log file management method and program thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009131387A JP5432596B2 (en) 2009-05-29 2009-05-29 Log file management device, log file management system, log file management method and program thereof

Publications (2)

Publication Number Publication Date
JP2010277473A JP2010277473A (en) 2010-12-09
JP5432596B2 true JP5432596B2 (en) 2014-03-05

Family

ID=43424351

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009131387A Expired - Fee Related JP5432596B2 (en) 2009-05-29 2009-05-29 Log file management device, log file management system, log file management method and program thereof

Country Status (1)

Country Link
JP (1) JP5432596B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102472878B1 (en) * 2020-11-27 2022-12-01 이화여자대학교 산학협력단 Block commit method of virtual machine environment and, virtual system for performing the method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2708610B2 (en) * 1990-06-08 1998-02-04 富士通株式会社 Database log management processing method
JPH09330237A (en) * 1996-06-07 1997-12-22 Toshiba Corp Device and method for switching process
JP5021929B2 (en) * 2005-11-15 2012-09-12 株式会社日立製作所 Computer system, storage system, management computer, and backup management method
JP4859605B2 (en) * 2006-09-20 2012-01-25 株式会社日立製作所 Information processing system

Also Published As

Publication number Publication date
JP2010277473A (en) 2010-12-09

Similar Documents

Publication Publication Date Title
US8868504B2 (en) Database system with active standby and nodes
US11157370B2 (en) Consistent backup of a distributed database system
US7363444B2 (en) Method for taking snapshots of data
CN107870829B (en) Distributed data recovery method, server, related equipment and system
US7653668B1 (en) Fault tolerant multi-stage data replication with relaxed coherency guarantees
JP2021002369A (en) Index update pipeline
US7509468B1 (en) Policy-based data protection
US8086661B2 (en) Method for resolving collisions in a database replication system by relaxing a constraint that contributes to collisions, or removing the cause of the constraint that contributes to the collisions
JP2019532401A (en) Block chain block data archiving method, apparatus, inquiry method, and apparatus
US7613740B2 (en) Control of a data replication engine using attributes associated with a transaction
WO2017128764A1 (en) Cache cluster-based caching method and system
JP2016524750A5 (en)
JPWO2018154698A1 (en) File storage, object storage, and storage system
JP5292351B2 (en) Message queue management system, lock server, message queue management method, and message queue management program
EP1969471A2 (en) Generating backup sets to a specific point in time
JP5686034B2 (en) Cluster system, synchronization control method, server device, and synchronization control program
US20110282843A1 (en) Method and system for data backup and replication
JP2007220103A (en) Method, system, and program for consolidating session information for a cluster of sessions in coupled session environment
Alagappan et al. Protocol-aware recovery for consensus-based distributed storage
JP6196389B2 (en) Distributed disaster recovery file synchronization server system
JP5292350B2 (en) Message queue management system, lock server, message queue management method, and message queue management program
US20090254582A1 (en) Method and system for storage replication
JP4998010B2 (en) Database system management, database system, program and processing apparatus
JP5432596B2 (en) Log file management device, log file management system, log file management method and program thereof
JP2001344139A (en) Database management device

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20110819

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110920

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20130201

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130918

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20131001

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20131113

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20131206

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 5432596

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees