JP5497861B2 - Server, file management system, file management method, and file management program - Google Patents
Server, file management system, file management method, and file management program Download PDFInfo
- Publication number
- JP5497861B2 JP5497861B2 JP2012192477A JP2012192477A JP5497861B2 JP 5497861 B2 JP5497861 B2 JP 5497861B2 JP 2012192477 A JP2012192477 A JP 2012192477A JP 2012192477 A JP2012192477 A JP 2012192477A JP 5497861 B2 JP5497861 B2 JP 5497861B2
- Authority
- JP
- Japan
- Prior art keywords
- session
- file
- server
- master
- lock
- 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.)
- Active
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
本発明は、ファイル管理システム等に関する。 The present invention relates to a file management system and the like.
システムの資源の共有や排他的なアクセス制御を行うこと、障害が発生した場合のシステムの可用性、一貫性を確保することは、重要な課題である。この課題を解消するための各種の従来技術が存在する。 It is important to share system resources and perform exclusive access control, and to ensure system availability and consistency in the event of a failure. There are various conventional techniques for solving this problem.
例えば、安価なハードウェアを用いた信頼性の低いネットワーク・コンピュータ・クラスタ環境において、長時間トランザクションをサポートする従来技術がある(特許文献2等)。この従来技術は、マスタの交代に備えてデータを複製(レプリケーション)することによりサーバ障害への耐障害性、トランザクションによるクライアント端末の故障に対する耐障害性を実現する。
For example, there is a conventional technology that supports long-time transactions in a low-reliability network computer cluster environment using inexpensive hardware (
ネットワーク故障およびサーバ故障に対応した従来技術がある(非特許文献1、2等)。この従来技術は、ファイルにロックをかけるオペレーションを行うことで、ネットワーク故障、サーバ故障、クライアント故障の何れに対しても対応可能である。
There are conventional technologies that deal with network failures and server failures (Non-Patent
一台のコンピュータ内で複数のプロセッサ要素が処理を並列に実行する際に、安全なカウンタを用意し、複数のプロセッサ要素が同時に取得可能な資源の数を一定数以下に制限する技術がある(非特許文献3等)。 When a plurality of processor elements execute processing in parallel in one computer, there is a technique for preparing a safe counter and limiting the number of resources that the plurality of processor elements can acquire simultaneously to a certain number or less ( Non-patent document 3).
また、従来のクライアントサーバシステム等では、クライアントがマスタの資源にアクセスする場合に、資源に対して共有ロックや排他ロックなどを行う場合があり、クライアントと各種ロックとの関係はロック情報として、サーバに管理される。 In addition, in a conventional client server system or the like, when a client accesses a master resource, a shared lock or an exclusive lock may be performed on the resource. Managed.
しかしながら、同期する複数のサーバ間でネットワークが分散した場合に、同一のネットワーク内に含まれる複数のサーバから単一のマスタを選出するようなシステムでは、マスタの故障により資源に対するクライアントのロック情報を他のサーバが引き継ぐことが行われるが、係るロック情報に矛盾が発生するという問題があった。上述した従来技術では、係る問題点を解消することが出来ない。 However, in a system in which a single master is selected from a plurality of servers included in the same network when the network is distributed among a plurality of servers to be synchronized, the lock information of the client with respect to resources due to the failure of the master is displayed. Although another server takes over, there is a problem that inconsistency occurs in the lock information. In the above-described conventional technology, such a problem cannot be solved.
開示の実施形態は、上記に鑑みてなされたものであって、同期する複数のサーバ間でネットワークが分散した場合に、同一のネットワーク内に含まれる複数のサーバから単一のマスタを選出するようなシステムにおいて、マスタの故障により資源に対するクライアントのロック情報を他のサーバが引き継ぐ際に、係るロック情報に矛盾発生することを防止することができるサーバ、ファイル管理システム、ファイル管理方法およびファイル管理プログラムを提供することを目的とする。 The embodiment of the disclosure is made in view of the above, and when a network is distributed among a plurality of servers to be synchronized, a single master is selected from a plurality of servers included in the same network. Server, file management system, file management method, and file management program capable of preventing inconsistency in lock information when another server takes over the lock information of a client for a resource due to a master failure The purpose is to provide.
本発明に係るサーバは、マスタ調整部と、要求処理部と、レプリケーション部と、復元処理部を有する。マスタ調整部は、同一のネットワークに含まれる複数の他のサーバおよび自サーバから、マスタの役割を有する単一のサーバを選出する。要求処理部は、自サーバがマスタの役割を有するサーバである場合に、クライアントからの接続要求に応答して、クライアントにセッションIDを発行し、該セッションIDをセッションテーブルに登録すると共に、クライアントからのファイル処理要求に応じて、ファイルに対するロック情報とセッションIDとを対応付けてファイル管理テーブルに登録する際に、ファイルに対するロックの数が閾値未満の場合に、ファイルに対するロック情報とセッションIDとを対応付けてファイル管理テーブルに登録し、ファイルに対するロックの数が閾値に達している場合には、ファイルに対するロック情報とセッションIDとを対応付けてロック待ちセッションに登録し、ファイルに対するロックの数が閾値未満となった時点で、ロック待ちセッションに登録されたファイルに対するロック情報とセッションIDとを対応付けてファイル管理テーブルに登録する。また、要求処理部は、セッションIDを発行して接続したクライアントに情報を送信して監視し、該クライアントからの応答が届かない場合には、クライアントに発行したセッションIDに対応するロック情報を、ファイル管理テーブルから削除する。レプリケーション部は、自サーバがレプリカの役割を有するサーバである場合に、マスタの役割を有するサーバのセッションテーブルとファイル管理テーブルとを複製する。復元処理部は、自サーバがレプリカの役割を有するサーバから、マスタの役割を有するサーバに切り替わった場合には、セッションテーブルの情報を削除待ちセッションテーブルに登録し、クライアントからの再接続要求に応答して、該再接続要求に含まれるセッションIDと同一のセッションIDを削除待ちセッションテーブルから削除し、該削除待ちセッションテーブルに残されたセッションIDに対応するロック情報を、ファイル管理テーブルから削除する。 The server according to the present invention includes a master adjustment unit, a request processing unit, a replication unit, and a restoration processing unit. The master adjustment unit selects a single server having a master role from a plurality of other servers and its own server included in the same network. The request processing unit issues a session ID to the client in response to a connection request from the client, and registers the session ID in the session table in response to a connection request from the client when the server is a server having a master role. When the lock information for the file and the session ID are registered in the file management table in association with the file processing request, if the number of locks for the file is less than the threshold, the lock information for the file and the session ID are If the number of locks on the file has reached the threshold, the lock information for the file and the session ID are registered in association with the lock waiting session, and the number of locks on the file is When it becomes less than the threshold, In association with the lock information and the session ID for the registered file in Deployment is registered in the file management table. Further, the request processing unit issues a session ID to send information to the connected client for monitoring, and when a response from the client does not arrive, lock information corresponding to the session ID issued to the client, Delete from the file management table. The replication unit replicates the session table and file management table of the server having the master role when the local server is a server having the role of replica. When the local server switches from the server having the role of replica to the server having the role of master, the restoration processing unit registers the information of the session table in the session table waiting for deletion and responds to the reconnection request from the client. Then, the same session ID as the session ID included in the reconnection request is deleted from the deletion waiting session table, and the lock information corresponding to the session ID remaining in the deletion waiting session table is deleted from the file management table. .
本発明に係るサーバによれば、同期する複数のサーバ間でネットワークが分散した場合に、同一のネットワーク内に含まれる複数のサーバから単一のマスタを選出するようなシステムにおいて、マスタの故障により資源に対するクライアントのロック情報を他のサーバが引き継ぐ際に、係るロック情報に矛盾発生することを防止することができるという効果を奏する。 According to the server according to the present invention, in a system in which a single master is selected from a plurality of servers included in the same network when a network is distributed among a plurality of servers to be synchronized, When another server takes over the lock information of the client for the resource, it is possible to prevent the occurrence of contradiction in the lock information.
以下に、本願の開示するサーバ、ファイル管理システム、ファイル管理方法およびファイル管理プログラムの実施形態を図面に基づいて詳細に説明する。なお、この実施形態によりこの発明が限定されるものではない。 Hereinafter, embodiments of a server, a file management system, a file management method, and a file management program disclosed in the present application will be described in detail with reference to the drawings. In addition, this invention is not limited by this embodiment.
(実施形態)
本実施形態に係るファイル管理システムの構成について説明する。図1は、本実施形態に係るファイル管理システムの構成を示す図である。図1に示すように、このファイル管理システムは、サーバ100a,100b,100c,100d,100eと、クライアント200a,200bと、アプリケーション60を有する。サーバ100a〜100e、クライアント200a,200bは、ネットワーク50に接続される。
(Embodiment)
A configuration of the file management system according to the present embodiment will be described. FIG. 1 is a diagram showing a configuration of a file management system according to the present embodiment. As shown in FIG. 1, the file management system includes
図1では一例として、サーバ100a〜100e、クライアント200a,200bを示すが、このシステムは、その他のサーバ、クライアントを有していても良い。以下の説明では、サーバ100a〜100eをまとめて適宜サーバ100と表記する。クライアント200a,200bをまとめて適宜クライアント200と表記する。
In FIG. 1, the
各サーバ100は、Paxos等の多数決プロトコルを用いて、同一のネットワークに含まれるサーバ100から、単一のマスタを選出する。多数決プロトコルを用いて、単一のマスタを選出する技術は、例えば、特許文献1、2の技術を用いれば良い。マスタに選出されたサーバは、マスタの機能を有するサーバとして機能する。一方、マスタに選出されなかったサーバは、レプリカの役割を有するサーバとして機能する。以下の説明において、適宜、マスタの役割を有するサーバをマスタ、レプリカの役割を有するサーバをレプリカと表記する。
Each
例えば、図1において、サーバ100a〜100eが同一のネットワークに含まれ、サーバ100aがマスタとして選出されたとする。この場合には、サーバ100aは、マスタの役割を有するサーバとして機能し、サーバ100b〜100eは、レプリカの役割を有するサーバとして機能する。
For example, in FIG. 1, it is assumed that the
マスタの役割を有するサーバ100は、クライアント200からの接続要求に応答して、接続を確立する。マスタの役割を有するサーバ100は、クライアント200からのファイル処理要求に応じて、ファイルにロックをかける。ファイルにかけるロックは、共有ロックまたは排他ロックである。マスタの役割を有するサーバ100は、ファイルに対するロック情報を記憶すると共に、このロック情報を、レプリカの役割を有するサーバ100に通知し、複製(レプリケーション)させる。
The
また、レプリカの役割を有するサーバ100が、マスタの役割を有するサーバ100に切り替わった場合には、クライアント200から再接続要求を受け付ける。マスタの役割を有するサーバ100は、複製しておいたロック情報について、再接続要求を受け付けクライアントに対応するロック情報を残し、その他のロック情報を削除する。このような処理を実行することで、ロック情報に矛盾が発生することを防止する。
When the
クライアント200は、マスタの役割を有するサーバ100と接続を確立した後に、アプリケーション60からの指示に応じて、ファイルに対する処理を実行する。例えば、クライアント200は、ファイルに共有ロックまたは排他ロックをかけ、ファイルに対する処理を実行する。
After establishing a connection with the
また、クライアント200は、マスタの役割を有するサーバ100が切り替わった場合には、マスタの役割を有するサーバ100に再接続要求を行い、ファイルに対する処理を継続する。なお、クライアント200は、再接続に失敗した場合には、アプリケーション60に対して、再接続に失敗した旨を通知し、ファイルに対する処理を中止する。
In addition, when the
次に、図1に示したサーバ100の構成の一例について説明する。図2は、本実施形態に係るサーバの構成を示す機能ブロック図である。図2に示すように、このサーバ100は、通信部110、記憶部140、制御部150を有する。
Next, an example of the configuration of the
通信部110は、ネットワーク50に接続された他の装置との間でデータ通信を実行する通信装置である。例えば、通信部110は、クライアント200、他のサーバ100とデータ通信を行う。後述する制御部150は、この通信部110を利用して、クライアント200、他のサーバ200とデータをやり取りする。
The
記憶部140は、セッションテーブル140a、削除待ちセッションテーブル140b、ファイル管理テーブル140cを記憶する記憶装置である。
The
セッションテーブル140aは、マスタの役割を有するサーバ100とクライアント200とのセッションに関する情報を有するテーブルである。図3は、本実施形態に係るセッションテーブルのデータ構造の一例を示す図である。図3に示すように、セッションテーブル140aは、セッションIDと、クライアント情報と、ロックファイルのエントリとを対応付ける。このうち、セッションID(Identifier)は、マスタの役割を有するサーバ100と、クライアント200との間で確立されるセッションを識別する情報である。クライアント情報は、クライアント200を一意に識別する情報であり、例えば、クライアント200のIP(Internet Protocol)アドレスに対応する。ロックファイルのエントリは、ロックをかけられたファイルを一意に識別するファイルID(Fid)と、ロックの種別とを示す情報である。ロックの種別には、共有ロック、排他ロックが含まれる。
The session table 140a is a table having information related to a session between the
例えば、図3の2段目を例にして説明すると、セッションID「2」によって、マスタの役割を有するサーバ100とクライアント200とが接続しており、係るクライアント200のクライアント情報は「192.10.10.15」である。また、クライアント200は、ファイルID「1」のファイルに共有ロックをかけている。
For example, referring to the second row in FIG. 3, the
削除待ちセッションテーブル140bは、マスタの役割を有するサーバ100が切り替わった場合に、復元できなかったセッションに関する情報を有するテーブルである。図4は、本実施形態に係る削除待ちセッションテーブルのデータ構造の一例を示す図である。図4に示すように、この削除待ちセッションテーブル140bは、セッションIDと、クライアント情報と、ロックファイルのエントリとを対応付ける。セッションID、クライアント情報、ロックファイルのエントリに関する説明は、図3に示したセッションテーブル140aと同様である。
The deletion-waiting session table 140b is a table having information on a session that could not be restored when the
例えば、図4の2段目を例にして説明すると、セッションID「2」によって識別されるセッションが復元できなかったため、クライアント情報「192.10.10.15」のクライアント200との接続が確立していないのに、このクライアント200によって、ファイルID「1」のファイルに共有ロックがかかった状態になっている。この共有ロックは、後述する復元処理部150dによって解除される。
For example, taking the second row in FIG. 4 as an example, since the session identified by the session ID “2” could not be restored, the connection with the
ファイル管理テーブル140cは、ファイルに対するロック情報を有するテーブルである。図5は、本実施形態に係るファイル管理テーブルのデータ構造の一例を示す図である。図5に示すように、このファイル管理テーブルは、ファイルIDと、ロック上限数と、ロック中セッションと、ロック待ちセッションとを対応付ける。 The file management table 140c is a table having lock information for files. FIG. 5 is a diagram showing an example of the data structure of the file management table according to the present embodiment. As shown in FIG. 5, this file management table associates a file ID, the upper limit number of locks, a locked session, and a lock waiting session.
ファイルID(Fid)は、ファイルを一意に識別する情報である。ロック上限数は、単一のファイルに対して、同時にロックをかけられる共有ロックの最大数である。なお、ロック上限数に関わらず、単一のファイルに対して、同時にロックをかけられる排他ロックの数は1である。 The file ID (Fid) is information for uniquely identifying a file. The upper limit number of locks is the maximum number of shared locks that can be locked simultaneously for a single file. Note that the number of exclusive locks that can be locked simultaneously for a single file is one regardless of the upper limit number of locks.
ロック中セッションは、該当ファイルにロックをかけているセッションIDとロックの種類とを示す。ロック待ちセッションは、該当ファイルに対するロック待ちを行っているセッションIDとロックの種類とを示す。ロック待ちセッションは、ロック中セッションに空きが出来た場合に、登録された順番で、ロック中セッションに移行する。 The in-lock session indicates a session ID that locks the file and the type of lock. The lock waiting session indicates the session ID and lock type for which the corresponding file is waiting to be locked. When there is a vacant session in the locked session, the lock waiting session shifts to the locked session in the registered order.
例えば、図5の1段目を例にして説明すると、ファイルID「1」のファイル上限数は「2」であり、ファイルID「1」のファイルに対して、2つの共有ロックがかけられている。係るロックは、セッションID「2」による共有ロックと、セッションID「3」による共有ロックである。また、ロック待ちセッションでは、セッションID「4」による排他ロック、セッションID「28」による共有ロックの順で、ロック待ちが発生している。 For example, taking the first row in FIG. 5 as an example, the upper limit number of files with file ID “1” is “2”, and two shared locks are applied to the file with file ID “1”. Yes. Such locks are a shared lock with a session ID “2” and a shared lock with a session ID “3”. Further, in the lock waiting session, lock waiting occurs in the order of the exclusive lock by the session ID “4” and the shared lock by the session ID “28”.
図2の説明に戻る。制御部150は、マスタ調整部150a、レプリケーション部150b、要求処理部150c、復元処理部150dを有する。
Returning to the description of FIG. The
マスタ調整部150aは、Paxos等の多数決プロトコルを用いて、同一のネットワークに含まれるサーバ100から、単一のマスタを選出する処理部である。マスタ調整部150aは、自サーバ100が、マスタとして選出されたか否かの情報を、レプリケーション部150b、要求処理部150c、復元処理部150dに出力する。
The
マスタ調整部150aは、マスタを選出したことを契機にして、次回マスタ選出タイマ(図示略)をセットし、この次回マスタ選出タイマがタイムアウトしたら、再度マスタを選出する。すなわち、マスタ調整部150aは、次回マスタ選出タイマを利用して、所定の時間間隔で、マスタを選出する処理を繰り返し実行する。
The
レプリケーション部150bは、記憶部140に格納された情報を複製する処理部である。自サーバ100がマスタである場合には、記憶部140のセッションテーブル140a、ファイル管理テーブル140cを、レプリカの役割を有するサーバ100に通知することで、レプリケーション要求を行う。
The
これに対して、自サーバ100がレプリカの場合には、マスタの役割を有するサーバ100からのレプリケーション要求を受け付ける。そして、自サーバ100は、マスタの役割を有するサーバ100のセッションテーブル140a、ファイル管理テーブル140cを複製して、記憶部140に記憶する。
On the other hand, when the
レプリケーション部150bは、マスタ調整部150aによって、マスタの選定が行われたことを契機にして、マスタリータイマ(図示略)をセットする。レプリケーション部150bは、マスタリータイマがタイムアウトするまでの間、上記処理を繰り返し実行する。
The
また、レプリケーション部150bは、自サーバ100がマスタの役割を有するサーバ100である場合に、セッションテーブル140a、ファイル管理テーブル140cが更新された場合にも、セッションテーブル140a、ファイル管理テーブル140cを、レプリカの役割を有するサーバ100に通知することで、レプリケーション要求を行う。
In addition, when the
要求処理部150cは、自サーバ100がマスタに選出された場合に動作し、クライアント200とのセッションを確立して、ファイル処理要求に応じて処理を行う処理部である。まず、要求処理部150cは、クライアント200からの接続要求に応答して、クライアント200にユニークなセッションIDを発行し、発行したセッションIDとクライアント200のIPアドレスとを対応付けて、セッションテーブル140aに登録する。
The
要求処理部150cは、セッションIDを発行して、クライアント200とのセッションが確立した後に、クライアント200からのファイル処理要求に応答して、セッションテーブル140aおよびファイル管理テーブル140cを更新する。例えば、クライアント200から受け付けるファイル処理要求には、排他ロック取得要求、排他ロック解放要求、共有ロック取得要求、共有ロック解放要求のいずれかが含まれる。以下では、排他ロック取得要求、排他ロック解放要求、共有ロック取得要求、共有ロック解放要求を受け付けた場合の、要求処理部150cの処理について順に説明する。
The
要求処理部150cが「排他ロック取得要求」を取得した場合の処理について説明する。この排他ロック取得要求には、処理対象となるファイルIDが含まれる。要求処理部150cは、セッションIDに対応付けて、ロックファイルのエントリをセッションテーブル140aに登録する。例えば、セッションIDが「4」で、ファイルID「1」に対する排他ロックを要求されている場合には、要求処理部150cは、図3の4段目のロックファイルのエントリ「Fid=1(排他)」を、セッションテーブル140aに登録する。
Processing when the
要求処理部150cは、ファイル管理テーブル140cを参照し、ファイルIDに対応するロック中セッションが存在するか否かを判定する。要求処理部150cは、ロック中セッションが存在しない場合には、該当するロック中セッションに、セッションIDとロック種別(排他ロック)とを対応付けて登録する。これに対して、要求処理部150cは、ロック中セッションが存在する場合には、セッションIDとロック種別(排他ロック)とを対応付けてロック待ちセッションに登録する。
The
続いて、要求処理部150cが「排他ロック解放要求」を取得した場合の処理について説明する。この排他ロック解放要求には、処理対象となるファイルIDが含まれる。要求処理部150cは、セッションIDに対応する、ロックファイルのエントリをセッションテーブル140aから削除する。例えば、セッションIDが「4」で、ファイルID「1」に対する排他ロックの解放を要求されている場合には、要求処理部150cは、図3の4段目のロックファイルのエントリ「Fid=1(排他)」を、セッションテーブル140aから削除する。
Next, processing when the
要求処理部150cは、ファイル管理テーブル140cを参照し、ファイルIDに対応するロック中セッションから値を削除する。例えば、セッションID「4」で、ファイルID「1」に対して排他ロックを行っていた場合には、ファイルID「1」のロック中セッションから値「Sid=4(排他)」を、ファイル管理テーブル140cから削除する。
The
要求処理部150cは、ファイル管理テーブル140cから値を削除した後に、該当するファイルIDのロック待ちセッションの先頭のエントリを取り出し、ロック中セッションの値に追加する。要求処理部150cは、追加する値のロック種別が共有ロックの場合には、ロック上限数を超えない範囲内で、ロック中セッションに値を追加する処理を繰り返し実行する。
After deleting the value from the file management table 140c, the
続いて、要求処理部150cが「共有ロック取得要求」を取得した場合の処理について説明する。この共有ロック取得要求には、処理対象となるファイルIDが含まれる。要求処理部150cは、セッションIDに対応付けて、ロックファイルのエントリをセッションテーブルに登録する。例えば、セッションIDが「2」で、ファイルID「1」に対する共有ロックを要求されている場合には、要求処理部150cは、図3の2段目に示すファイルのエントリ「Fid=1(共有)」を、セッションテーブル140aに登録する。
Next, processing when the
要求処理部150cは、ファイル管理テーブル140cのファイルIDに対応するロック中セッションを参照する。ロック中セッションにおいて、共有ロックの数がロック上限数未満の場合、または、排他ロックがかけられていない場合には、要求処理部150cは、該当するロック中セッションに、セッションIDとロック種別(共有ロック)とを対応付けて登録する。
The
これに対して、要求処理部150cは、ロック中セッションにおいて、共有ロックの数がロック上限数以上の場合、または、排他ロックがかけられている場合には、セッションIDとロック種別(共有ロック)とを対応付けてロック待ちセッションに登録する。
In contrast, in the locked session, the
続いて、要求処理部150cが「共有ロック解放要求」を取得した場合の処理について説明する。この共有ロック解放要求には、処理対象となるファイルIDが含まれる。要求処理部150cは、セッションIDに対応する、ロックファイルのエントリをセッションテーブル140aから削除する。例えば、要求処理部150cは、セッションIDが「2」で、ファイルID「1」に対する共有ロックの解放を要求されている場合には、図3の2段目のロックファイルのエントリ「Fid=1(共有)」を、セッションテーブル140aから削除する。
Next, processing when the
要求処理部150cは、ファイル管理テーブル140cを参照し、ファイルIDに対応するロック中セッションから値を削除する。例えば、セッションID「2」で、ファイルID「1」に対して排他ロックを行っていた場合には、ファイルID「1」のロック中セッションから値「Sid=2(共有)」を、ファイル管理テーブル140cから削除する。
The
要求処理部150cは、ファイル管理テーブル140cから値を削除した後に、該当するファイルIDのロック待ちセッションの先頭のエントリを取り出し、ロック中セッションの値に追加する。要求処理部150cは、追加する値のロック種別が共有ロックの場合には、ロック上限数を超えない範囲内で、ロック中セッションに値を追加する処理を繰り返し実行する。
After deleting the value from the file management table 140c, the
上記のように、要求処理部150cは、クライアント200から接続要求を受け付けてセッションを確立した後に、クライアント200からのファイル処理要求には、排他ロック取得要求、排他ロック解放要求、共有ロック取得要求、共有ロック解放要求に応答して、セッションテーブル140a、ファイル管理テーブル140cを更新する。
As described above, after the
また、要求処理部150cは、セッションを確立したクライアント200に対して、定期的にpingを送信することで、クライアント200を監視する。要求処理部150cは、pingを送信してから、所定の時間以内に、クライアント200からの応答を受け付けない場合には、該クライアント200に対応するセッションIDによって、ロックされているファイルを解放する。例えば、要求処理部150cは、セッションID「2」によってセッションを確立したクライアント200からpingの応答を受け付けない場合には、図5のファイル管理テーブルのロック中セッションの値「Sid=2(共有)」を削除する。なお、ロック中セッションを削除して、ロック待ちセッションの値をロック中セッションに追加する処理は、排他ロック解放要求、共有ロック解放要求を取得した場合の処理と同様である。
Further, the
復元処理部150dは、自サーバ100がレプリカの役割を有するサーバから、マスタの役割を有するサーバに切り替わった場合に動作し、クライアント200とのセッションを復元する処理部である。まず、復元処理部150dは、セッションテーブル140aに登録された全情報を、削除待ちセッションテーブル140bへ書き込み、セッション削除タイマ(図示略)をセットする。また、復元処理部150dは、セッションテーブル140aの全情報を削除する。
The
復元処理部150dは、セッション削除タイマがタイムアウトする前に、クライアント200から再接続要求を受け付ける。この再接続要求には、マスタの役割を有するサーバが切り替わる前に、このサーバから発行されたセッションIDが含まれる。復元処理部150dは、再接続要求に含まれるセッションIDと、削除待ちセッションテーブル140bとを比較し、再接続要求に含まれるセッションIDと同一のセッションIDを有するレコードを、削除待ちセッションテーブル140bから削除する。また、復元処理部150dは、再接続要求に含まれるセッションIDを、セッションテーブル140aに登録する。
The
復元処理部150dは、セッション削除タイマがタイムアウトした場合に、削除待ちセッションテーブル140bに含まれるセッションIDとロックファイルのエントリとを基にして、ファイル管理テーブル140cのロック中セッションから該当する値を削除する。
When the session deletion timer times out, the
復元処理部150dは、ロックファイルのエントリに示されるロックの種別が、排他ロックである場合には、上述した「排他ロック解放要求」を取得した場合の処理と同様の処理を実行する。また、復元処理部150dは、ロックファイルのエントリに示されるロックの種別が、共有ロックである場合には、上述した「共有ロック解放要求」を取得した場合の処理と同様の処理を実行する。
When the lock type indicated in the entry of the lock file is an exclusive lock, the
次に、図1に示したクライアント200の構成について説明する。図6は、本実施形態に係るクライアントの構成を示す機能ブロック図である。図6に示すように、このクライアント200は、通信部210、入力部220、表示部230、記憶部240、制御部250を有する。
Next, the configuration of the
通信部210は、ネットワーク50に接続された他の装置との間でデータ通信を実行する通信装置である。例えば、通信部210は、サーバ100、アプリケーション60とデータ通信を行う。後述する制御部250は、この通信部210を利用して、サーバ200、アプリケーション60とデータをやり取りする。
The
入力部220は、各種のデータをクライアント200に入力する入力装置である。例えば、入力部220は、キーボードやマウス、タッチパネル等に対応する。表示部230は、各種のデータを表示する表示装置である。例えば、表示部230は、ディスプレイ等に対応する。
The
記憶部240は、セッション情報240aを記憶する記憶装置である。セッション情報240aは、例えば、クライアント200がマスタの役割を有するサーバ100とセッションを確立した場合のセッションIDを有する情報である。
The
制御部250は、接続要求部250a、要求部250b、再接続要求部250c、通知部250dを有する。
The
接続要求部250aは、マスタの役割を有するサーバ100とセッションを確立する処理部である。具体的に、接続要求部250aは、ネットワーク50に接続された全てのサーバ100に接続要求を送信する。接続要求部250aは、接続要求を送信した後に、マスタの役割を有するサーバ100から、セッションIDを受信し、受信したセッションIDを、セッション情報240aに登録する。そして、接続要求部250aは、マスタの役割を有するサーバ100に、受信確認を送信する。上記の一連の処理を接続要求部250aが実行することで、クライアント200とサーバ100とのセッションが確立する。
The connection request unit 250a is a processing unit that establishes a session with the
接続要求部250aは、死活監視タイマ(図示略)をセットし、この死活監視タイマがタイムアウトする前に、マスタの役割を有するサーバ100からの通信を受信した場合には、マスタへの受信確認を送信し、死活監視タイマをセットし直す処理を繰り返し実行する。なお、接続要求部250aは、死活監視タイマがタイムアウトする前に、マスタの役割を有するサーバ100から通信を受信しない場合には、再接続要求部250cに再接続を依頼する。
The connection request unit 250a sets a life / death monitoring timer (not shown), and when receiving communication from the
要求部250bは、クライアント200がマスタの役割を有するサーバ100との間でセッションが確立している間に、マスタに対してファイル処理要求を行う処理部である。例えば、要求部250bは、ファイル処理要求として、排他ロック取得要求、排他ロック解放要求、共有ロック取得要求、共有ロック解放要求等を行う。要求部250bは、アプリケーション60からの指示を受け付け、係る指示の内容に応じて、ファイル処理要求を行っても良い。
The request unit 250b is a processing unit that makes a file processing request to the master while the
再接続要求部250cは、サーバ100に対する再接続要求を行う処理部である。具体的に、再接続要求部250cは、接続要求部250aから再接続の依頼を受け付けた場合に、再接続タイマ(図示略)をセットする。そして、再接続要求部250cは、再接続要求にセッション情報240aに登録されたセッションIDを登録し、ネットワークに接続された全てのサーバ100に再接続要求を送信する。
The
再接続要求部250cは、再接続タイマがタイムアウトする前に、マスタの役割を有するサーバ100から返信が得られた場合には、再度セッションが確立したこととなり、その後の処理を、接続要求部250aに依頼する。
When a reply is obtained from the
依頼を受けた接続要求部250aは、死活監視タイマをセットし、この死活監視タイマがタイムアウトする前に、マスタの役割を有するサーバ100からの通信を受信した場合には、マスタへの受信確認を送信し、死活監視タイマをセットし直す処理を繰り返し実行する。なお、接続要求部250aは、死活監視タイマがタイムアウトする前に、マスタの役割を有するサーバ100から通信を受信しない場合には、再接続要求部250cに再接続を依頼する。
Upon receipt of the request, the connection request unit 250a sets a life / death monitoring timer, and when communication from the
これに対して、再接続要求部250cは、再接続タイマがタイムアウトする前に、マスタの役割を有するサーバ100から再接続要求に対する返信が得られない場合には、再接続要求に対する返信が得られない旨を通知部250dに出力する。
On the other hand, when the
通知部250dは、再接続要求部250cが、再接続に失敗した場合に、再接続に失敗した旨の情報をアプリケーション60に通知する処理部である。再接続に失敗した場合には、例えば、アプリケーション60から、要求部250bに対して、マスタに対するファイル処理要求が制限される。
The
次に、本実施形態に係るサーバ100の処理手順について説明する。図7は、本実施形態に係るサーバの処理手順を示すフローチャートである。図7に示すように、サーバ100は、Paxosによるマスタの選定を行い(ステップS101)、自サーバ100がマスタとして選出されたか否かを判定する(ステップS102)。
Next, a processing procedure of the
サーバ100は、自サーバ100がマスタとして選出されなかった場合には(ステップS102,No)、マスタリースタイマをセットする(ステップS103)。サーバ100は、マスタからのレプリケーション要求の受付を開始する(ステップS104)。
If the
サーバ100は、マスタリースタイマがタイムアウトしたか否かを判定する(ステップS105)。サーバ100は、マスタリースタイマがタイムアウトしていない場合には(ステップS105,No)、再度ステップS105に移行する。
The
一方、サーバ100は、マスタリースタイマがタイムアウトした場合には(ステップS105,Yes)、マスタからのレプリケーション要求受付を閉塞し(ステップS106)、ステップS101に移行する。
On the other hand, when the master lease timer times out (step S105, Yes), the
ところで、サーバ100は、自サーバがマスタとして選出された場合には(ステップS102,Yes)、マスタリースタイマをセットする(ステップS107)。サーバ100は、次回マスタ選出タイマをセットする(ステップS108)。
By the way, when the
サーバ100は、自サーバが以前のマスタであり、かつ、以前のマスタリースタイマがタイムアウトしていない場合には(ステップS109,Yes)、ステップS111に移行する。一方、サーバ100は、自サーバが以前のマスタでない場合、または、以前のマスタリースタイマがタイムアウトしている場合には(ステップS109,No)、ステップS110に移行する。
If the
サーバ100は、クライアント200とのセッションを復元し(ステップS110)、ステップS111に移行する。
The
サーバ100は、クライアント200からの要求受け付けを開始し(ステップS111)、次回マスタ選出タイマがタイムアウトしたか否かを判定する(ステップS112)。サーバ100は、次回マスタ算出タイマがタイムアウトしていない場合には(ステップS112,No)、再度ステップS112に移行する。
The
サーバ100は、次回マスタ選出タイマがタイムアウトした場合には(ステップS112,Yes)、ステップS101に移行して処理を継続する。また、その一方で、サーバ100は、マスタリースがタイムアウトしたか否かを判定する(ステップS113)。サーバ100は、マスタリースタイマがタイムアウトしていない場合には(ステップS113)、再度ステップS113に移行する。一方、サーバ100は、マスタリースタイマがタイムアウトした場合には(ステップS113,Yes)、クライアントからの要求受付を閉塞する(ステップS114)。
If the next master selection timer times out (step S112, Yes), the
次に、図7のステップS110に示したクライアントとのセッションを復元する処理について説明する。図8は、セッションを復元する処理の処理手順を示すフローチャートである。図8に示すように、サーバ100は、セッションテーブル140aのマスタ交代前のセッション情報を読み込み、全情報を削除待ちセッションテーブル140bに書き込む(ステップS121)。サーバ100は、セッションテーブル140aの全情報を削除する(ステップS122)。
Next, the process for restoring the session with the client shown in step S110 of FIG. 7 will be described. FIG. 8 is a flowchart illustrating a processing procedure of processing for restoring a session. As shown in FIG. 8, the
サーバ100は、セッション削除タイマをセットし(ステップS123)、セッション削除タイマがタイムアウトしたか否かを判定する(ステップS124)。サーバ100は、セッション削除タイマがタイムアウトしていない場合には(ステップS124,No)、再度ステップS124に移行する。
The
サーバ100は、セッション削除タイマがタイムアウトした場合には(ステップS124,Yes)、削除待ちセッションテーブル140bが空か否かを判定する(ステップS125)。サーバ100は、削除待ちセッションテーブル140bが空の場合には(ステップS125,Yes)、セッションを復元する処理を終了する。
If the session deletion timer times out (step S124, Yes), the
一方、サーバ100は、削除待ちセッションテーブル140bが空ではない場合には(ステップS125,No)、削除待ちセッションテーブル140bの任意の1セッションを選択する(ステップS126)。サーバ100は、セッション削除処理を実行し(ステップS127)、ステップS125に移行する。
On the other hand, when the deletion waiting session table 140b is not empty (step S125, No), the
次に、図8のステップS127に示したセッション削除処理について説明する。図9は、セッション削除処理の処理手順を示すフローチャートである。図9に示すように、サーバ100は、セッションテーブル140aからセッションIDに関連するロックファイルのエントリを全て取得する(ステップS131)。
Next, the session deletion process shown in step S127 of FIG. 8 will be described. FIG. 9 is a flowchart showing a processing procedure of session deletion processing. As shown in FIG. 9, the
サーバ100は、ロックファイルのエントリを基にして、自動アンロック操作を実施する(ステップS132)。ステップS132において、サーバ100は、アンロック対象となるファイルが共有ロックされている場合には、共有ロック解放要求処理に対する処理と同様の処理を行う。これに対して、アンロック対象となるファイルが排他ロックされている場合には、排他ロック解放要求に対する処理と同様の処理を行う。
The
次に、図7のステップS111に示したクライアントからの要求を開始してから、ステップS114のクライアントからの要求受け付けを閉塞するまでの要求受け付け処理の処理手順について説明する。図10は、要求受け付け処理の処理手順を示すフローチャートである。 Next, a description will be given of the processing procedure of request reception processing from the start of the request from the client shown in step S111 in FIG. 7 to the blocking of the request reception from the client in step S114. FIG. 10 is a flowchart showing a processing procedure of request acceptance processing.
図10に示すように、サーバ100は、クライアント200から要求があったか否かを判定する(ステップS141)。サーバ100は、クライアント200から要求が無い場合には(ステップS141,No)、再度ステップS141に移行する。
As shown in FIG. 10, the
サーバ100は、クライアントから要求があった場合には(ステップS141,Yes)、クライアント200から接続要求を受け付けたか否かを判定する(ステップS142)。サーバ100は、接続要求を受け付けた場合には(ステップS142,Yes)、セッションIDを発行し、セッションテーブル140aに登録する(ステップS143)。
If there is a request from the client (step S141, Yes), the
サーバ100は、セッションIDをクライアント200に通知し(ステップS144)、クライアント監視プロセスを起動し(ステップS145)、ステップS141に移行する。
The
ステップS142において、サーバ100は、クライアント200から接続要求を受けていない場合には(ステップS142,No)、再接続要求か否かを判定する(ステップS146)。サーバ100は、再接続要求を受け付けた場合には(ステップS146,Yes)、削除待ちセッションテーブル140bから、該当するセッションIDを削除する(ステップS147)。サーバ100は、セッションIDをセッションテーブル140aに追加し(ステップS148)、ステップS144に移行する。
In step S142, if the
ステップS146において、サーバ100は、クライアント200から再接続要求を受け付けていない場合には(ステップS146,No)、処理内容に応じてファイルに対する処理を実行する(ステップS149)。サーバ100は、処理結果をレプリカに送信する(ステップS150)。
In step S146, if the
サーバ100は、レプリカから返信が得られたか否かを判定する(ステップS151)。サーバ100は、レプリカから返信が得られた場合には(ステップS151,Yes)、ステップS141に移行する。一方、レプリカから返信が得られない場合には(ステップS151,No)、クライアント200からの要求受け付けを閉塞する(ステップS152)。
The
次に、図10のステップS145に示したクライアント監視プロセスを起動した場合のクライアント監視処理について説明する。図11は、クライアント監視処理の処理手順を示すフローチャートである。 Next, the client monitoring process when the client monitoring process shown in step S145 of FIG. 10 is started will be described. FIG. 11 is a flowchart illustrating a processing procedure of client monitoring processing.
図11に示すように、サーバ100は、一定時間待機後クライアント200にpingを送信する(ステップS171)。サーバ100は、タイマをセットし(ステップS172)、タイムアウト前にクライアントから返信があったか否かを判定する(ステップS173)。
As illustrated in FIG. 11, the
サーバ100は、タイムアウト前にクライアントから返信があった場合には(ステップS173,Yes)、ステップS171に移行する。一方、サーバ100は、タイムアウト前にクライアントから返信が無い場合には(ステップS173,No)、セッション削除処理を実行する(ステップS174)。
If there is a reply from the client before the timeout (Yes at Step S173), the
次に、図10のステップS152に示したクライアントからの要求受け付けを閉塞する閉塞処理について説明する。図12は、閉塞処理の処理手順を示すフローチャートである。図12に示すように、サーバ100は、クライアント200からの要求受付プロセスを停止する(ステップS181)。
Next, the blocking process for blocking the request acceptance from the client shown in step S152 in FIG. 10 will be described. FIG. 12 is a flowchart showing the procedure of the blocking process. As shown in FIG. 12, the
サーバ100は、全てのクライアント監視プロセスを停止し(ステップS182)、全てのセッション情報を削除する(ステップS183)。
The
次に、サーバ100が、クライアント200から排他ロック取得要求、排他ロック解放要求、共有ロック取得要求、共有ロック解放要求を受け付けた場合の処理についてそれぞれ説明する。
Next, processing when the
図13は、排他ロック取得要求を受け付けた場合の処理手順を示すフローチャートである。図13に示すように、サーバ100は、ロック対象のファイルIDを取得し(ステップS201)、ファイルIDに対応するロック中セッションの値が空か否かを判定する(ステップS202)。
FIG. 13 is a flowchart showing a processing procedure when an exclusive lock acquisition request is received. As shown in FIG. 13, the
サーバ100は、ファイルIDに対応するロック中セッションの値が空の場合には(ステップS202,Yes)、ロック中セッションに値を追加する(ステップS203)。
If the value of the locked session corresponding to the file ID is empty (step S202, Yes), the
一方、サーバ100は、ファイルIDに対応するロック中セッションの値が空ではない場合には(ステップS202,No)、ロック待ちセッションに値を追加する(ステップS204)。
On the other hand, if the value of the locked session corresponding to the file ID is not empty (No at Step S202), the
図14は、排他ロック解放要求を受け付けた場合の処理手順を示すフローチャートである。図14に示すように、サーバ100は、ファイル管理テーブル140cからロック対象のファイルIDを取得する(ステップS211)。サーバ100は、ロック中セッションからファイルIDに対応する値を削除する(ステップS212)。
FIG. 14 is a flowchart illustrating a processing procedure when an exclusive lock release request is received. As shown in FIG. 14, the
サーバ100は、ファイルIDに対応する、ロック待ちセッションの値は全て空であるか否かを判定する(ステップS213)。サーバ100は、ファイルIDに対応する、ロック待ちセッションの値が全て空の場合には(ステップS213,Yes)、処理を終了する。
The
一方、サーバ100は、ファイルIDに対応する、ロック待ちセッションの値が全て空ではない場合には(ステップS213,No)、ファイルIDのロック待ちセッションの先頭のエントリを取り出し、ロック中セッションの値に追加する(ステップS214)。
On the other hand, if the values of the session waiting for lock corresponding to the file ID are not all empty (step S213, No), the
サーバ100は、ロック中セッションに追加した値が排他ロックか否かを判定する(ステップS215)。サーバ100は、ロック中セッションに追加した値が排他ロックの場合には(ステップS215,Yes)、処理を終了する。
The
一方、サーバ100は、ロック中セッションに追加した値が排他ロックでは無い場合には(ステップS215,No)、ロック待ちセッションが空ではないか否かを判定する(ステップS216)。サーバ100は、ロック待ちセッションが空の場合には(ステップS216,No)、処理を終了する。
On the other hand, if the value added to the locked session is not an exclusive lock (step S215, No), the
一方、サーバ100は、ロック待ちセッションが空ではない場合には(ステップS216,Yes)、ロック待ちセッションの先頭が共有ロックか否かを判定する(ステップS217)。サーバ100は、ロック待ちセッションの先頭が共有ロックではない場合には(ステップS217,No)、処理を終了する。
On the other hand, if the lock waiting session is not empty (step S216, Yes), the
一方、サーバ100は、ロック待ちセッションの先頭が共有ロックの場合には(ステップS217,Yes)、ロック中セッションが上限数に達しているか否かを判定する(ステップS218)。サーバ100は、ロック中のセッションが上限数に達している場合には(ステップS218,Yes)、処理を終了する。
On the other hand, when the head of the session waiting for lock is a shared lock (step S217, Yes), the
一方、サーバ100は、ロック中のセッションが上限数に達していない場合には(ステップS218,No)、ロック待ちセッションの先頭のエントリを取り出し、ロック中セッションに追加し(ステップS219)、ステップS216に移行する。
On the other hand, if the number of locked sessions has not reached the upper limit (step S218, No), the
図15は、共有ロック取得要求を受け付けた場合の処理手順を示すフローチャートである。図15に示すように、サーバ100は、ロック対象のファイルIDを取得し(ステップS221)、ファイルIDに対するロック中セッションの値は空か否かを判定する(ステップS222)。
FIG. 15 is a flowchart illustrating a processing procedure when a shared lock acquisition request is received. As shown in FIG. 15, the
サーバ100は、ファイルIDに対するロック中セッションの値が空の場合には(ステップS222,Yes)、ロック中セッションに値を追加し(ステップS223)、処理を終了する。
If the value of the locked session for the file ID is empty (step S222, Yes), the
一方、サーバ100は、ファイルIDに対するロック中セッションの値が空ではない場合には(ステップS222,No)、ロック中セッションの値が共有ロックであるか否かを判定する(ステップS224)。
On the other hand, if the value of the locked session for the file ID is not empty (step S222, No), the
サーバ100は、ロック中セッションの値が共有ロックではない場合には(ステップS244,No)、ロック待ちセッションに追加する(ステップS225)。
When the value of the locked session is not the shared lock (step S244, No), the
一方、サーバ100は、ロック中セッションの値が上限数に達しているか否かを判定する(ステップS226)。サーバ100は、ロック中セッションが上限数に達していない場合には(ステップS226,Yes)、ステップS223に移行する。サーバ100は、ロック中セッションの値が上限数に達している場合には(ステップS226,No)、ステップS225に移行する。一方、サーバ100は、ロック中セッションの値が上限数に達していない場合には(ステップS226,Yes)、ステップS223に移行する。
On the other hand, the
図16は、共有ロック解放要求を受け付けた場合の処理手順を示すフローチャートである。図16に示すように、サーバ100は、ファイル管理テーブル140cから、ロック対象のファイルIDを取得する(ステップS231)。サーバ100は、ファイルIDの、ロック中セッションからファイルIDに対応する値を削除する(ステップS232)。
FIG. 16 is a flowchart illustrating a processing procedure when a shared lock release request is received. As illustrated in FIG. 16, the
サーバ100は、ファイルIDに対応する、ロック待ちセッションの値が全て空か否かを判定する(ステップS233)。サーバ100は、ロック待ちセッションの値が全て空の場合には(ステップS233,Yes)、処理を終了する。
The
一方、サーバ100は、ロック待ちセッションの値が全て空ではない場合には(ステップS233,No)、ロック待ちセッションの先頭が共有ロックであるか否かを判定する(ステップS234)。サーバ100は、ロック待ちセッションの先頭が共有ロックではない場合には(ステップS234,No)、処理を終了する。
On the other hand, when all the values of the lock waiting session are not empty (step S233, No), the
一方、サーバ100は、ロック待ちセッションの先頭が共有ロックの場合には(ステップS234,Yes)、ロック中セッションが上限数に達しているか否かを判定する(ステップS235)。サーバ100は、ロック中セッションが上限数に達している場合には(ステップS235,Yes)、処理を終了する。
On the other hand, when the head of the session waiting for lock is the shared lock (step S234, Yes), the
一方、サーバ100は、ロック中セッションが上限数に達していない場合には(ステップS235,No)、ロック待ちセッションの先頭のエントリを取り出し、ロック中セッションに追加する(ステップS236)。
On the other hand, if the number of locked sessions has not reached the upper limit (No in step S235), the
サーバ100は、ロック待ちセッションが空ではないか否かを判定する(ステップS237)。サーバ100は、ロック待ちセッションが空の場合には(ステップS237,No)、処理を終了する。一方、サーバ100は、ロック待ちセッションが空ではない場合には(ステップS237,Yes)、ステップS234に移行する。
The
次に、本実施形態に係るクライアント200の処理手順について説明する。図17は、本実施形態に係るクライアントの処理手順を示すフローチャートである。図17に示すように、クライアント200は、同一のネットワークに接続された全てのサーバ100へ接続要求を送信する(ステップS301)。
Next, a processing procedure of the
クライアント200は、マスタからセッションIDを受信し(ステップS302)、マスタへタイマ受信確認を送信する(ステップS303)。クライアント200は、死活監視タイマをセットする(ステップS304)。
The
クライアント200は、死活監視タイマがタイムアウトする前にマスタから通信を受信したか否かを判定する(ステップS305)。クライアント200は、死活監視タイマがタイムアウトする前に、マスタから通信を受信した場合には(ステップS305,Yes)、ステップS303に移行する。
The
一方、クライアント200は、死活監視タイマがタイムアウトする前にマスタから通信を受信していない場合には(ステップS305,No)、再接続タイマをセットする(ステップS306)。
On the other hand, if the
クライアント200は、同一のネットワークに接続された全てのサーバ100へ再接続要求を行う(ステップS307)。この再接続要求には、セッションIDが含まれる。クライアント200は、再接続タイマがタイムアウトする前にマスタから返信が得られたか否かを判定する(ステップS308)。クライアント200は、再接続タイマがタイムアウトする前にマスタから返信が得られた場合には(ステップS308,Yes)、ステップS303に移行する。
The
クライアント200は、再接続タイマがタイムアウトする前にマスタから返信が得られなかった場合には(ステップS308,No)、アプリケーション60に再接続出来なかった旨の情報を送信する(ステップS309)。
If the reply is not obtained from the master before the reconnection timer times out (step S308, No), the
クライアント200は、アプリケーション60からの応答を受信し(ステップS310)、共有ロックおよび排他ロックを用いるファイル処理を中止する(ステップS311)。
The
なお、クライアント200は、図17のステップS303〜S305の区間において、必要に応じて、ファイル操作を実行可能である。ここで、ファイル操作は、排他ロック取得要求、排他ロック解放要求、共有ロック取得要求、共有ロック解放要求に対応する。係るファイル操作を受け付けたマスタの役割を有するサーバ100は、上述した図13〜図16の処理を実行する。
Note that the
次に、本実施形態に係るシステムの効果について説明する。本実施形態に係るシステムでは、サーバ100は、自サーバがマスタの役割を有するサーバである場合に、クライアント200からの接続要求に応答して、クライアント200にセッションIDを発行し、該セッションIDをセッションテーブル140aに登録すると共に、クライアント200からのファイル処理要求に応じて、ファイルに対するロック情報とセッションIDとを対応付けてファイル管理テーブル140cに登録する。また、サーバ100は、レプリカの役割を有するサーバである場合に、マスタの役割を有するサーバのセッションテーブル140aとファイル管理テーブル140cとを複製する。また、サーバ100は、自サーバがレプリカの役割を有するサーバから、マスタの役割を有するサーバに切り替わり、クライアント200から再接続要求を受け付けた場合には、セッションテーブル140aの情報を、削除待ちセッションテーブル140bに登録し、再接続要求に含まれるセッションIDと同一のセッションIDを削除待ちセッションテーブル140bから削除し、該削除待ちセッションテーブル140bに残されたセッションIDに対応するロック情報を、ファイル管理テーブル140cから削除する。
Next, the effect of the system according to the present embodiment will be described. In the system according to the present embodiment, when the
このような処理を実行することで、同期する複数のサーバ間でネットワークが分散した場合に、同一のネットワーク内に含まれる複数のサーバから単一のマスタを選出するようなシステムであっても、マスタの故障により資源に対するクライアントのロック情報を他のサーバが引き継ぐ際に、係るロック情報に矛盾発生することを防止することができる。 By executing such processing, even when the network is distributed among a plurality of synchronized servers, even in a system that selects a single master from a plurality of servers included in the same network, When another server takes over the lock information of the client for the resource due to the failure of the master, it is possible to prevent inconsistency in the lock information.
また、サーバ100は、ファイルに対するロックの数が上限数未満の場合に、ファイルに対するロック情報とセッションIDとを対応付けてファイル管理テーブルに登録する。このような処理を実行することで、資源の利用数を制限することができる。
Further, when the number of locks on the file is less than the upper limit, the
また、サーバ100は、クライアント200からのファイル処理要求が、ファイルに対する共有ロックを要求している場合には、ファイルに対するロックの数が上限数未満の場合に、ファイルに対するロック情報とセッションIDとを対応付けてファイル管理テーブル140cに登録し、クライアント200からのファイル処理要求が、ファイルに対する排他ロックを要求している場合には、ファイルに対するロックがかかっていない場合に、ファイルに対するロック情報とセッションIDとを対応付けてファイル管理テーブル140cに登録する。このような処理を実行することで、資源の利用数を制限しつつ、排他ロックおよび共有ロックを適切にファイルにかけることができる。
Further, when the file processing request from the
また、クライアント200は、マスタの役割を有するサーバ100が切り替わった場合に、マスタの役割を有するサーバ100に再接続要求を行い、該再接続要求の応答をマスタの役割を有するサーバ100から受信しない場合には、再接続に失敗した情報をアプリケーション60に通知する。このような処理を行うことによって、クライアント200が、サーバ100との接続が出来ていない状況で、サーバ100に対して共有ロックや排他ロックを用いたファイル処理を行うことを防止することができる。
Further, when the
次に、実施形態に示したサーバ100と同様の機能を実現する制御プログラムを実行するコンピュータの一例を説明する。図18は、サーバと同様の機能を実現する制御プログラムを実行するコンピュータの一例を示す図である。図18に例示するように、コンピュータ300は、例えば、メモリ301と、CPU(Central Processing Unit)302と、ハードディスクドライブインタフェース303と、ディスクドライブインタフェース304と、シリアルポートインタフェース305と、ビデオアダプタ306と、ネットワークインタフェース307とを有し、これらの各部はバス308によって接続される。
Next, an example of a computer that executes a control program that realizes the same function as the
メモリ301は、図18に例示するように、ROM(Read Only Memory)301a及びRAM(Random Access Memory)301bを含む。ROM301aは、例えば、BIOS(Basic Input Output System)等のブートプログラムを記憶する。ハードディスクドライブインタフェース303は、図18に例示するように、ハードディスクドライブ303aに接続される。ディスクドライブインタフェース304は、図18に例示するように、ディスクドライブ304aに接続される。例えば磁気ディスクや光ディスク等の着脱可能な記憶媒体が、ディスクドライブ304aに挿入される。シリアルポートインタフェース305は、図18に例示するように、例えばマウス305a、キーボード305bに接続される。ビデオアダプタ306は、図18に例示するように、例えばディスプレイ306aに接続される。
As illustrated in FIG. 18, the
ここで、図18に例示するように、ハードディスクドライブ303aは、例えば、OS(Operating System)1、アプリケーションプログラム2、プログラムモジュール3、プログラムデータ4を記憶する。すなわち、サーバ100の処理を実行する制御プログラムは、コンピュータ300によって実行される指令が記述されたプログラムモジュール3として、例えばハードディスクドライブ303aに記憶される。具体的には、上記実施形態で説明したマスタ調整部150a、レプリケーション部150b、要求処理部150c、復元処理部150dに対応する各手順が記述されたプログラムモジュール3が、ハードディスクドライブ303aに記憶される。また、上記実施形態で説明した記憶部140に記憶されるデータのように、制御プログラムによる情報処理に用いられるデータは、プログラムデータ4として、例えばハードディスクドライブ303aあるいはメモリ301に記憶される。そして、CPU302が、ハードディスクドライブ303aに記憶されたプログラムモジュール3やプログラムデータ4を必要に応じてRAM301bに読み出し、各手順を実行する。
Here, as illustrated in FIG. 18, the
なお、制御プログラムに係るプログラムモジュール3やプログラムデータ4は、ハードディスクドライブ303aに記憶される場合に限られず、例えば着脱可能な記憶媒体に記憶され、ディスクドライブ等を介してCPU302によって読み出されてもよい。あるいは、制御プログラムに係るプログラムモジュール3やプログラムデータ4は、ネットワーク(LAN(Local Area Network)、WAN(Wide Area Network)等)を介して接続された他のコンピュータに記憶され、ネットワークインタフェースを介してCPU302によって読み出されてもよい。
The
次に、図18を利用して、クライアント200と同様の機能を実現する制御プログラムを実行するコンピュータの一例を説明する。クライアント200の処理を実行する制御プログラムは、コンピュータ300によって実行される指令が記述されたプログラムモジュール3として、例えばハードディスクドライブ303aに記憶される。具体的には、上記実施形態で説明した接続要求部250a、要求部250b、再接続要求部250c、通知部250dに対応する各手順が記述されたプログラムモジュール3が、ハードディスクドライブ303aに記憶される。また、上記実施形態で説明した記憶部240に記憶されるデータのように、制御プログラムによる情報処理に用いられるデータは、プログラムデータ4として、例えばハードディスクドライブ303aに記憶される。そして、CPU302が、ハードディスクドライブ303aに記憶されたプログラムモジュール3やプログラムデータ4を必要に応じてRAM301bに読み出し、各手順を実行する。その他の説明は、上述したサーバ100と同様の機能を実現する制御プログラムを実行するコンピュータの説明と同様である。
Next, an example of a computer that executes a control program that implements the same function as the
1 OS
2 アプリケーションプログラム
3 プログラムモジュール
4 プログラムデータ
50 ネットワーク
60 アプリケーション
100a,100b,100c,100d,100e サーバ
110,210 通信部
140,240 記憶部
140a セッションテーブル
140b 削除待ちセッションテーブル
140c ファイル管理テーブル
150,250 制御部
150a マスタ調整部
150b レプリケーション部
150c 要求処理部
150d 復元処理部
200a,200b クライアント
220 入力部
230 表示部
240a セッション情報
250a 接続要求部
250b 要求部
250c 再接続要求部
250d 通知部
300 コンピュータ
301 メモリ
301a ROM
301b RAM
302 CPU
303 ハードディスクドライブインタフェース
303a ハードディスクドライブ
304 ディスクドライブインタフェース
304a ディスクドライブ
305 シリアルポートインタフェース
307 ネットワークインタフェース
308 バス
1 OS
2
301b RAM
302 CPU
303 Hard
Claims (6)
前記マスタ調整部により自サーバがマスタの役割を有するサーバとして選出された場合に、クライアントからの接続要求に応答して、前記クライアントからのファイル処理要求に応じて、ファイルに対するロック情報とセッションIDとを対応付けてファイル管理テーブルに登録する際に、ファイルに対するロックの数が前記ファイル管理テーブルに示される閾値未満の場合に、ファイルに対するロック情報とセッションIDとを対応付けてファイル管理テーブルに登録し、
ファイルに対するロックの数が前記ファイル管理テーブルに示される閾値に達している場合には、ファイルに対するロック情報とセッションIDとを対応付けてロック待ちセッションに登録し、ファイルに対するロックの数が前記ファイル管理テーブルに示される閾値未満となった時点で、前記ロック待ちセッションに登録されたファイルに対するロック情報とセッションIDとを対応付けて前記ファイル管理テーブルに登録し、
セッションIDを発行して接続したクライアントに情報を送信して監視し、該クライアントからの応答が届かない場合には、前記クライアントに発行したセッションIDに対応するロック情報を、前記ファイル管理テーブルから削除し、
前記ファイル管理テーブルに登録されるセッションIDおよびロック情報に基づき、前記ファイルのロックを行う要求処理部と、
前記マスタ調整部により自サーバがレプリカの役割を有するサーバとして選出された場合に、マスタの役割を有するサーバのセッションテーブルとファイル管理テーブルとを複製するレプリケーション部と、
自サーバがレプリカの役割を有するサーバから、マスタの役割を有するサーバに切り替わった場合には、前記マスタの役割を有するサーバから複製されたセッションテーブルの情報を削除待ちセッションテーブルに登録し、クライアントからの再接続要求に応答して、該再接続要求に含まれるセッションIDと同一のセッションIDを前記削除待ちセッションテーブルから削除し、該削除待ちセッションテーブルに残されたセッションIDに対応するロック情報を、前記マスタの役割を有するサーバから複製されたファイル管理テーブルから削除する復元処理部と
を有することを特徴とするサーバ。 A master coordinator that selects a single server having a master role from a plurality of other servers and its own server included in the same network;
When the own server is selected as the server having the master role by the master adjustment unit , in response to a connection request from the client, in response to the file processing request from the client, lock information and session ID for the file, When the number of locks for a file is less than the threshold indicated in the file management table, the lock information for the file and the session ID are associated and registered in the file management table. ,
When the number of locks on the file reaches the threshold indicated in the file management table, the lock information on the file and the session ID are associated with each other and registered in the lock waiting session, and the number of locks on the file is the file management When it becomes less than the threshold shown in the table, the lock information for the file registered in the lock waiting session and the session ID are associated with each other and registered in the file management table,
Issue a session ID and send information to the connected client for monitoring. If no response is received from the client, the lock information corresponding to the session ID issued to the client is deleted from the file management table. And
A request processing unit for locking the file based on a session ID and lock information registered in the file management table ;
A replication unit that replicates a session table and a file management table of a server having a master role when the master adjustment unit is selected as a server having a replica role by the master adjustment unit ;
When the local server switches from the server having the role of replica to the server having the role of master, the information of the session table replicated from the server having the role of master is registered in the session table waiting for deletion, and from the client In response to the reconnection request, the same session ID as the session ID included in the reconnection request is deleted from the deletion waiting session table, and lock information corresponding to the session ID remaining in the deletion waiting session table is stored. And a restoration processing unit for deleting from the file management table replicated from the server having the role of the master .
前記クライアントからのファイル処理要求が、ファイルに対する排他ロックを要求している場合には、ファイルに対するロックがかかっていない場合に、ファイルに対するロック情報とセッションIDとを対応付けて前記ファイル管理テーブルに登録し、前記クライアントに対するロックがかかっている場合には、ファイルに対するロック情報とセッションIDとを対応付けて前記ロック待ちセッションに登録し、ファイルに対するロックが解除された時点で、前記ロック待ちセッションに登録されたファイルに対するロック情報とセッションIDとを対応付けて前記ファイル管理テーブルに登録することを特徴とする請求項1に記載のサーバ。 When the file processing request from the client requests a shared lock on the file, the request processing unit locks the file when the number of locks on the file is less than the threshold indicated in the file management table. Information and session ID are associated with each other and registered in the file management table, and when the number of locks on the file reaches the threshold indicated in the file management table, the lock information on the file is associated with the session ID. When the number of locks on the file becomes less than the threshold indicated in the file management table, the lock information and the session ID associated with the file registered in the lock waiting session are associated with each other. Register in the file management table ,
If the file processing request from the client requests an exclusive lock on the file, if the file is not locked, the file lock information and the session ID are associated with each other and registered in the file management table. When the lock is applied to the client, the lock information for the file and the session ID are associated with each other and registered in the lock waiting session. When the lock on the file is released, the lock information is registered in the lock waiting session. The server according to claim 1, wherein lock information and a session ID associated with the registered file are registered in the file management table in association with each other.
前記サーバは、
同一のネットワークからマスタの役割を有する単一のサーバを選出するマスタ調整部と、
前記マスタ調整部により自サーバがマスタの役割を有するサーバとして選択された場合に、前記クライアントからの接続要求に応答して、前記クライアントにセッションIDを発行し、該セッションIDをマスタの役割を有するサーバから複製されたセッションテーブルに登録すると共に、前記クライアントからのファイル処理要求に応じて、ファイルに対するロック情報とセッションIDとを対応付けてファイル管理テーブルに登録する際に、ファイルに対するロックの数が前記ファイル管理テーブルに示される閾値未満の場合に、ファイルに対するロック情報とセッションIDとを対応付けてファイル管理テーブルに登録し、
ファイルに対するロックの数が前記ファイル管理テーブルに示される閾値に達している場合には、ファイルに対するロック情報とセッションIDとを対応付けてロック待ちセッションに登録し、ファイルに対するロックの数が前記ファイル管理テーブルに示される閾値未満となった時点で、前記ロック待ちセッションに登録されたファイルに対するロック情報とセッションIDとを対応付けて前記ファイル管理テーブルに登録し、
セッションIDを発行して接続したクライアントに情報を送信して監視し、該クライアントからの応答が届かない場合には、前記クライアントに発行したセッションIDに対応するロック情報を、前記マスタの役割を有するサーバから複製されたファイル管理テーブルから削除し、
前記ファイル管理テーブルに登録されるセッションIDおよびロック情報に基づき、前記ファイルのロックを行う要求処理部と、
前記マスタ調整部により自サーバがレプリカの役割を有するサーバとして選択された場合に、マスタの役割を有するサーバのセッションテーブルとファイル管理テーブルとを複製するレプリケーション部と、
自サーバがレプリカの役割を有するサーバから、マスタの役割を有するサーバに切り替わった場合には、前記マスタの役割を有するサーバから複製されたセッションテーブルの情報を削除待ちセッションテーブルに登録し、クライアントからの再接続要求に応答して、該再接続要求に含まれるセッションIDと同一のセッションIDを前記削除待ちセッションテーブルから削除し、該削除待ちセッションテーブルに残されたセッションIDに対応するロック情報を、前記マスタの役割を有するサーバから複製されたファイル管理テーブルから削除する復元処理部と
を有することを特徴とするファイル管理システム。 A file management system comprising a plurality of servers having a master or replica role and a plurality of clients connected to the server having a master role,
The server
A master coordinator that selects a single server having a master role from the same network;
When the master adjustment unit selects the server as a server having the master role, in response to a connection request from the client, a session ID is issued to the client, and the session ID has the master role When registering in the session table copied from the server and registering in the file management table in association with the lock information and session ID for the file in response to the file processing request from the client, the number of locks for the file is If it is less than the threshold shown in the file management table, the lock information for the file and the session ID are associated with each other and registered in the file management table,
When the number of locks on the file reaches the threshold indicated in the file management table, the lock information on the file and the session ID are associated with each other and registered in the lock waiting session, and the number of locks on the file is the file management When it becomes less than the threshold shown in the table, the lock information for the file registered in the lock waiting session and the session ID are associated with each other and registered in the file management table,
Sending and monitoring information to the connected client by issuing a session ID, and if the response from the client does not arrive, lock information corresponding to the session ID issued to the client has the role of the master Delete from the file management table replicated from the server ,
A request processing unit for locking the file based on a session ID and lock information registered in the file management table ;
A replication unit that replicates a session table and a file management table of a server having a master role when the master adjustment unit is selected as a server having a replica role by the master adjustment unit ;
When the local server switches from the server having the role of replica to the server having the role of master, the information of the session table replicated from the server having the role of master is registered in the session table waiting for deletion, and from the client In response to the reconnection request, the same session ID as the session ID included in the reconnection request is deleted from the deletion waiting session table, and lock information corresponding to the session ID remaining in the deletion waiting session table is stored. And a restoration processing unit for deleting from the file management table replicated from the server having the role of the master .
前記クライアントは、マスタの役割を有するサーバが切り替わった場合に、マスタの役割を有するサーバに前記再接続要求を行い、該再接続要求の応答を前記マスタの役割を有するサーバから受信しない場合には、再接続に失敗した情報を前記アプリケーションに通知する通知部を有することを特徴とする請求項3に記載のファイル管理システム。 In response to an instruction from the application, the client performs the file processing request to a server having a master role,
When the server having the master role is switched, the client makes the reconnection request to the server having the master role, and does not receive a response to the reconnection request from the server having the master role. The file management system according to claim 3, further comprising a notification unit that notifies the application of information that failed to reconnect.
同一のネットワークに含まれる複数の他のサーバおよび自サーバから、マスタの役割を有する単一のサーバを選出するマスタ調整工程と、
前記マスタ調整工程により自サーバがマスタの役割を有するサーバとして選出された場合に、クライアントからの接続要求に応答して、前記クライアントにセッションIDを発行し、該セッションIDをセッションテーブルに登録すると共に、前記クライアントからのファイル処理要求に応じて、ファイルに対するロック情報とセッションIDとを対応付けてファイル管理テーブルに登録する際に、ファイルに対するロックの数が前記ファイル管理テーブルに示される閾値未満の場合に、ファイルに対するロック情報とセッションIDとを対応付けてファイル管理テーブルに登録し、
ファイルに対するロックの数が前記ファイル管理テーブルに示される閾値に達している場合には、ファイルに対するロック情報とセッションIDとを対応付けてロック待ちセッションに登録し、ファイルに対するロックの数が前記ファイル管理テーブルに示される閾値未満となった時点で、前記ロック待ちセッションに登録されたファイルに対するロック情報とセッションIDとを対応付けて前記ファイル管理テーブルに登録し、
セッションIDを発行して接続したクライアントに情報を送信して監視し、該クライアントからの応答が届かない場合には、前記クライアントに発行したセッションIDに対応するロック情報を、前記ファイル管理テーブルから削除する要求処理工程と、
前記マスタ調整工程により自サーバがレプリカの役割を有するサーバとして選出された場合に、マスタの役割を有するサーバのセッションテーブルとファイル管理テーブルとを複製するレプリケーション工程と、
自サーバがレプリカの役割を有するサーバから、マスタの役割を有するサーバに切り替わった場合には、前記マスタの役割を有するサーバから複製されたセッションテーブルの情報を削除待ちセッションテーブルに登録し、クライアントからの再接続要求に応答して、該再接続要求に含まれるセッションIDと同一のセッションIDを前記削除待ちセッションテーブルから削除し、該削除待ちセッションテーブルに残されたセッションIDに対応するロック情報を、前記マスタの役割を有するサーバから複製されたファイル管理テーブルから削除し、前記ファイル管理テーブルに登録されるセッションIDおよびロック情報に基づき、前記ファイルのロックを行う復元工程と
を含んだことを特徴とするファイル管理方法。 A file management method executed on a server,
A master adjustment step of selecting a single server having a master role from a plurality of other servers and its own server included in the same network;
When the server is elected as a server having the master role by the master adjustment step , in response to a connection request from the client, a session ID is issued to the client, and the session ID is registered in the session table. When the lock information for a file and the session ID are registered in the file management table in association with the file processing request from the client, the number of locks for the file is less than the threshold indicated in the file management table In addition, the file lock table and the session ID are associated with each other and registered in the file management table,
When the number of locks on the file reaches the threshold indicated in the file management table, the lock information on the file and the session ID are associated with each other and registered in the lock waiting session, and the number of locks on the file is the file management When it becomes less than the threshold shown in the table, the lock information for the file registered in the lock waiting session and the session ID are associated with each other and registered in the file management table,
Issue a session ID and send information to the connected client for monitoring. If no response is received from the client, the lock information corresponding to the session ID issued to the client is deleted from the file management table. Request processing step to
A replication step of replicating the session table and file management table of the server having the role of the master when the server is elected as a server having the role of the replica by the master adjustment step ;
When the local server switches from the server having the role of replica to the server having the role of master, the information of the session table replicated from the server having the role of master is registered in the session table waiting for deletion, and from the client In response to the reconnection request, the same session ID as the session ID included in the reconnection request is deleted from the deletion waiting session table, and lock information corresponding to the session ID remaining in the deletion waiting session table is stored. A restoration step of deleting the file from the file management table replicated from the server having the role of the master and locking the file based on the session ID and lock information registered in the file management table. File management method.
前記マスタ調整ステップにより自サーバがマスタの役割を有するサーバとして選出された場合に、クライアントからの接続要求に応答して、前記クライアントにセッションIDを発行し、該セッションIDをセッションテーブルに登録すると共に、前記クライアントからのファイル処理要求に応じて、ファイルに対するロック情報とセッションIDとを対応付けてファイル管理テーブルに登録する際に、ファイルに対するロックの数が前記ファイル管理テーブルに示される閾値未満の場合に、ファイルに対するロック情報とセッションIDとを対応付けてファイル管理テーブルに登録し、
ファイルに対するロックの数が前記ファイル管理テーブルに示される閾値に達している場合には、ファイルに対するロック情報とセッションIDとを対応付けてロック待ちセッションに登録し、ファイルに対するロックの数が前記ファイル管理テーブルに示される閾値未満となった時点で、前記ロック待ちセッションに登録されたファイルに対するロック情報とセッションIDとを対応付けて前記ファイル管理テーブルに登録し、
セッションIDを発行して接続したクライアントに情報を送信して監視し、該クライアントからの応答が届かない場合には、前記クライアントに発行したセッションIDに対応するロック情報を、前記ファイル管理テーブルから削除する要求処理ステップと、
前記マスタ調整ステップにより自サーバがレプリカの役割を有するサーバとして選出された場合に、マスタの役割を有するサーバのセッションテーブルとファイル管理テーブルとを複製するレプリケーションステップと、
自サーバがレプリカの役割を有するサーバから、マスタの役割を有するサーバに切り替わった場合には、前記マスタの役割を有するサーバから複製されたセッションテーブルの情報を削除待ちセッションテーブルに登録し、クライアントからの再接続要求に応答して、該再接続要求に含まれるセッションIDと同一のセッションIDを前記削除待ちセッションテーブルから削除し、該削除待ちセッションテーブルに残されたセッションIDに対応するロック情報を、前記マスタの役割を有するサーバから複製されたファイル管理テーブルから削除し、前記ファイル管理テーブルに登録されるセッションIDおよびロック情報に基づき、前記ファイルのロックを行う復元処理ステップと、
をコンピュータに実行させるためのファイル管理プログラム。 A master adjustment step of selecting a single server having a master role from a plurality of other servers and its own server included in the same network;
When the server is selected as a server having the master role by the master adjustment step , in response to a connection request from the client, a session ID is issued to the client, and the session ID is registered in the session table. When the lock information for a file and the session ID are registered in the file management table in association with the file processing request from the client, the number of locks for the file is less than the threshold indicated in the file management table In addition, the file lock table and the session ID are associated with each other and registered in the file management table,
When the number of locks on the file reaches the threshold indicated in the file management table, the lock information on the file and the session ID are associated with each other and registered in the lock waiting session, and the number of locks on the file is the file management When it becomes less than the threshold shown in the table, the lock information for the file registered in the lock waiting session and the session ID are associated with each other and registered in the file management table,
Issue a session ID and send information to the connected client for monitoring. If no response is received from the client, the lock information corresponding to the session ID issued to the client is deleted from the file management table. Request processing steps to
A replication step for replicating a session table and a file management table of a server having a master role when the server is elected as a server having a replica role by the master adjustment step ;
When the local server switches from the server having the role of replica to the server having the role of master, the information of the session table replicated from the server having the role of master is registered in the session table waiting for deletion, and from the client In response to the reconnection request, the same session ID as the session ID included in the reconnection request is deleted from the deletion waiting session table, and lock information corresponding to the session ID remaining in the deletion waiting session table is stored. A restoration processing step for deleting the file from the file management table replicated from the server having the role of the master and locking the file based on the session ID and lock information registered in the file management table ;
File management program that causes a computer to execute.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012192477A JP5497861B2 (en) | 2012-08-31 | 2012-08-31 | Server, file management system, file management method, and file management program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012192477A JP5497861B2 (en) | 2012-08-31 | 2012-08-31 | Server, file management system, file management method, and file management program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2014048969A JP2014048969A (en) | 2014-03-17 |
JP5497861B2 true JP5497861B2 (en) | 2014-05-21 |
Family
ID=50608553
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012192477A Active JP5497861B2 (en) | 2012-08-31 | 2012-08-31 | Server, file management system, file management method, and file management program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5497861B2 (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6676352B2 (en) * | 2015-11-27 | 2020-04-08 | 株式会社三菱Ufj銀行 | Data processing device |
SG11201703159XA (en) | 2015-12-14 | 2017-07-28 | Huawei Tech Co Ltd | Lock management method in cluster, lock server, and client |
BR112017011541B1 (en) | 2015-12-30 | 2023-09-26 | Huawei Technologies Co., Ltd | METHOD FOR PROCESSING A BLOCK REQUEST, BLOCK REQUEST MANAGEMENT APPARATUS AND SERVER |
JP6683049B2 (en) | 2016-07-20 | 2020-04-15 | 富士通株式会社 | Information processing apparatus, information processing method, information processing system, and program |
JP2018142129A (en) * | 2017-02-27 | 2018-09-13 | 富士通株式会社 | Information processing system, information processing method, and information processing apparatus |
JP6561162B2 (en) * | 2018-03-07 | 2019-08-14 | 華為技術有限公司Huawei Technologies Co.,Ltd. | Lock management method, lock server and client in cluster |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08235043A (en) * | 1995-02-28 | 1996-09-13 | N T T Data Tsushin Kk | Cooperative distributed system |
JP2001067257A (en) * | 1999-08-30 | 2001-03-16 | Toshiba Corp | Inter-distributed node exclusive updating device |
JP2008033778A (en) * | 2006-07-31 | 2008-02-14 | Nec Corp | Computer system, database restoration method, and database restoration program |
-
2012
- 2012-08-31 JP JP2012192477A patent/JP5497861B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2014048969A (en) | 2014-03-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5497861B2 (en) | Server, file management system, file management method, and file management program | |
US20190146884A1 (en) | Systems and methods for service replication, validation, and recovery in cloud-based systems | |
US8655851B2 (en) | Method and system for performing a clean file lock recovery during a network filesystem server migration or failover | |
US10127124B1 (en) | Performing fencing operations in multi-node distributed storage systems | |
US8930309B2 (en) | Interval-controlled replication | |
WO2018036148A1 (en) | Server cluster system | |
US9785691B2 (en) | Method and apparatus for sequencing transactions globally in a distributed database cluster | |
JP2018534665A (en) | Input / output fencing optimization | |
US20120259820A1 (en) | Method and system for restarting file lock services at an adoptive node during a network filesystem server migration or failover | |
US7620721B2 (en) | Pre-existing content replication | |
TW497071B (en) | Method and apparatus for managing clustered computer systems | |
US11409622B1 (en) | Methods and systems for a non-disruptive planned failover from a primary copy of data at a primary storage system to a mirror copy of the data at a cross-site secondary storage system without using an external mediator | |
US11144405B2 (en) | Optimizing database migration in high availability and disaster recovery computing environments | |
Jian-Hua et al. | Cloud computing-based data storage and disaster recovery | |
US11550679B2 (en) | Methods and systems for a non-disruptive planned failover from a primary copy of data at a primary storage system to a mirror copy of the data at a cross-site secondary storage system | |
US20080077635A1 (en) | Highly Available Clustered Storage Network | |
US20180052902A1 (en) | Network partition handling in fault-tolerant key management system | |
US20220318104A1 (en) | Methods and systems for a non-disruptive automatic unplanned failover from a primary copy of data at a primary storage system to a mirror copy of the data at a cross-site secondary storage system | |
KR20130131362A (en) | Providing transparent failover in a file system | |
EP3928208A1 (en) | System and method for self-healing in decentralized model building for machine learning using blockchain | |
JP2009508191A (en) | Enterprise server version migration via ID storage | |
US11537314B1 (en) | Resynchronization of individual volumes of a consistency group (CG) within a cross-site storage solution while maintaining synchronization of other volumes of the CG | |
Hine et al. | An architecture for distributed OASIS services | |
US20150186485A1 (en) | Robust communication system for guaranteed message sequencing with the detection of duplicate senders | |
CN112783694B (en) | Long-distance disaster recovery method for high-availability Redis |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20140115 |
|
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: 20140304 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20140306 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5497861 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |