JPH08235044A - Journal retrieval systm - Google Patents

Journal retrieval systm

Info

Publication number
JPH08235044A
JPH08235044A JP7064833A JP6483395A JPH08235044A JP H08235044 A JPH08235044 A JP H08235044A JP 7064833 A JP7064833 A JP 7064833A JP 6483395 A JP6483395 A JP 6483395A JP H08235044 A JPH08235044 A JP H08235044A
Authority
JP
Japan
Prior art keywords
journal
information
time information
time
search
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP7064833A
Other languages
Japanese (ja)
Inventor
Toshiyuki Inoue
利行 井上
Tadao Odanaka
忠雄 小田中
Yukiharu Imafuku
幸春 今福
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.)
N T T DATA TSUSHIN KK
NTT Data Corp
Original Assignee
N T T DATA TSUSHIN KK
NTT Data Communications Systems 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 N T T DATA TSUSHIN KK, NTT Data Communications Systems Corp filed Critical N T T DATA TSUSHIN KK
Priority to JP7064833A priority Critical patent/JPH08235044A/en
Priority to EP96903243A priority patent/EP0758114A4/en
Priority to PCT/JP1996/000440 priority patent/WO1996027157A1/en
Priority to US08/737,040 priority patent/US6052695A/en
Publication of JPH08235044A publication Critical patent/JPH08235044A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE: To confirm the presence or absence of the relevant journal information without retrieving an entire journal file. CONSTITUTION: The journal information includes a time stamp showing the writing time point of the journal information and a transaction identifier. This identifier includes a time stamp that shows the starting time point of a transaction. When the journal information is retrieved, the corresponding transaction identifier is used as a retrieval key and the journal information is successively read out at and after its final end. Then the time stamp of the journal information is compared with that of the retrieval key. If the former stamp is later than the latter one and no coincidence is confirmed between both transaction identifiers, the next journal information is read out to undergo the same check. Then the retrieval of journal information ends when the time stamp of the read journal information is earlier than that of the retrieval key.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、システムの処理履歴
(ジャーナル)の検索方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a system processing history (journal) search method.

【0002】[0002]

【従来の技術】トランザクション処理システムなどで
は、障害のリカバリ処理等で利用するために、処理した
トランザクションのジャーナル情報を不揮発記憶媒体上
のジャーナルファイルに蓄積している。リカバリ処理な
どで、特定のトランザクションのジャーナル情報を検索
する場合、膨大なジャーナルファイル中から如何に高速
に目的のジャーナルを検索するかが重要となる。
2. Description of the Related Art In a transaction processing system or the like, journal information of processed transactions is accumulated in a journal file on a non-volatile storage medium for use in failure recovery processing and the like. When retrieving journal information of a specific transaction in recovery processing or the like, it is important how to retrieve the target journal from a huge amount of journal files at high speed.

【0003】検索の高速化を目的としたジャーナル検索
方式として、例えば特開平3−202956号のものが
知られている。この従来方式は、ジャーナルファイルの
本体とは別に、個々のジャーナル情報の日付と時刻とを
小サイズのインデックスファイルにまとめておき、この
インデックスファイルを利用して高速に対象のジャーナ
ル情報を検索しようとするものである。
As a journal search method for the purpose of speeding up the search, for example, the one disclosed in Japanese Patent Laid-Open No. 3-202956 is known. In this conventional method, the date and time of each journal information is collected in a small size index file separately from the main body of the journal file, and the target journal information is searched at high speed by using this index file. To do.

【0004】また、特開平4−190454号にも類似
の技術が開示されている。この方式は、ジャーナルファ
イル内に、時刻情報と、この時刻情報に対応するジャー
ナル情報群の先頭ポインタとを格納したファイルを設
け、この時刻情報ファイルを利用して高速に対象のジャ
ーナル情報を検索しようとするものである。
A similar technique is disclosed in Japanese Patent Laid-Open No. 4-190454. In this method, a file that stores time information and the start pointer of the journal information group corresponding to this time information is provided in the journal file, and the target journal information is searched at high speed by using this time information file. It is what

【0005】[0005]

【発明が解決しようとする課題】トランザクション処理
方式の中には、完遂(コミット)したトランザクション
のジャーナル情報のみを保存し、後退回復(ロールバッ
ク)したトランザクションのジャーナル情報は保存しな
い方式がある。この種のトランザクション処理方式で
は、特定のトランザクションのジャーナル情報を検索し
た結果、それがジャーナルファイル中の何処からも発見
されなかった場合、当該トランザクションはロールバッ
クされたものと判断され、そのトランザクションは例え
ばリカバリの対象から外される。
Among transaction processing methods, there is a method of saving only journal information of completed (commit) transactions and not saving journal information of backward recovery (rollback) transactions. In this type of transaction processing method, when the journal information of a specific transaction is searched and it is not found anywhere in the journal file, the transaction is determined to have been rolled back, and the transaction is Removed from recovery targets.

【0006】このようにファイル中に存在しないジャー
ナル情報が検索対象であった場合、そのジャーナル情報
が存在しないという事実は、ファイル全体をサーチして
みて初めてわかることである。従って、たとえ上記の従
来技術を利用したとしても、対象の時刻がインデックス
ファイルや時刻情報ファイル内に存在しない場合には、
ファイルの全体範囲をサーチしなければならない。その
結果、検索時間が長くなるという問題が生じる。
When the journal information which does not exist in the file is to be searched as described above, the fact that the journal information does not exist can be found only by searching the entire file. Therefore, even if the above conventional technique is used, if the target time does not exist in the index file or the time information file,
You have to search the entire range of files. As a result, there is a problem that the search time becomes long.

【0007】更には、ファイルの全範囲を検索するた
め、そのファイルが格納されているディスク装置に対す
る負荷も高くなる。また、このような検索方式でファイ
ルを検索している状況下で、同時にトランザクションを
実行した場合には、ファイルが格納されているディスク
に対するアクセスが大幅に制限されてしまうため、トラ
ンザクションのレスポンスタイム及びスループットもか
なり低下してしまう。
Further, since the entire range of the file is searched, the load on the disk device in which the file is stored becomes high. In addition, when a transaction is executed at the same time while searching for a file using such a search method, access to the disk in which the file is stored is significantly restricted, so the transaction response time and The throughput will also drop considerably.

【0008】従って、本発明の目的は、ジャーナルファ
イル内に存在しないジャーナル情報が検索対象である場
合に、ジャーナルファイル全体を検索しなくても、その
ジャーナル情報が存在しないことが短時間で確認できる
ジャーナル検索方式を提供することにある。
Therefore, an object of the present invention is to quickly confirm that the journal information does not exist without searching the entire journal file when the journal information that does not exist in the journal file is to be searched. To provide a journal search method.

【0009】[0009]

【課題を解決するための手段】本発明のジャーナル検索
方式は、時刻情報をもつジャーナル情報を時刻情報の順
序で格納したジャーナルファイルと、指定された時刻情
報をもつジャーナル検索要求を受けて、ジャーナルファ
イル内の検索可能範囲から、個々のジャーナル情報の時
刻情報を読出す時刻情報読出し手段と、読み出された時
刻情報と指定された時刻情報とを比較して、前者の時刻
情報が後者の時刻情報より遅くない場合に、ジャーナル
ファイル内の検索可能範囲を、前者の時刻情報より遅い
時刻情報をもつ範囲だけに制限する検索範囲制限手段と
を備えたことを特徴とする。
According to the journal search method of the present invention, a journal file storing journal information having time information in the order of time information and a journal search request having designated time information are received, The former time information is compared with the latter time information by comparing the time information read means for reading the time information of each journal information from the searchable range in the file with the specified time information. The search range limiting means limits the searchable range in the journal file only to a range having time information later than the former time information when it is not later than the information.

【0010】また、本発明は、上記方式により行われる
新規なジャーナル検索方法も提供する。
The present invention also provides a novel journal search method performed by the above method.

【0011】[0011]

【作用】本発明の方式によれば、ジャーナルファイルに
は、個々のジャーナル情報が時刻情報と共に時系列的に
格納されている。このジャーナルファイル内の時刻情報
は、例えば、個々のジャーナル情報がジャーナルファイ
ルに書込まれた時の時刻を示している。また、ジャーナ
ル情報の検索(=読込)要求にも、検索対象となるジャ
ーナル情報に関連した時刻情報が含まれている。検索要
求の時刻情報は、例えば、その検索対象のジャーナル情
報を生んだトランザクションの処理時刻を示している。
According to the method of the present invention, each journal information is stored in time series in the journal file together with the time information. The time information in this journal file indicates, for example, the time when each journal information was written in the journal file. Further, the journal information search (= read) request also includes time information related to the journal information to be searched. The time information of the search request indicates, for example, the processing time of the transaction that generated the journal information to be searched.

【0012】以上のような条件の下で、ジャーナル情報
検索要求が到来すると、まず、ジャーナルファイル内の
検索可能範囲から一つのジャーナル情報の時刻情報が読
み出される。次に、その時刻情報と、検索要求の時刻情
報とが比較される。この比較の結果、もし、ジャーナル
情報の時刻情報が検索要求の時刻情報より遅い場合は、
そのジャーナル情報は検索対象に該当する可能性がある
ため、適当な方法で検索対象か否かのチェックが行われ
る。その結果、その読み出したジャーナル情報が検索対
象でないと判明すれば、次に、別のジャーナル情報の時
刻情報がジャーナルファイルの検索可能範囲から読み出
され、同様に時刻チェックが行われる。
When a journal information search request arrives under the above conditions, first, the time information of one journal information is read from the searchable range in the journal file. Next, the time information is compared with the time information of the search request. As a result of this comparison, if the time information of the journal information is later than the time information of the search request,
Since the journal information may correspond to the search target, it is checked whether or not it is the search target by an appropriate method. As a result, if it is found that the read journal information is not the search target, then the time information of another journal information is read from the searchable range of the journal file, and the time check is similarly performed.

【0013】このように、ジャーナルファイルの検索可
能範囲の中で検索が進められていく。この過程で、も
し、読み出した時刻情報が検索要求の時刻情報より遅く
なかった場合には、その読み出した時刻情報よりも早い
時刻情報をもつファイル範囲には検索対象が存在しない
ことが明らかであるから、検索可能範囲がその読み出し
た時刻情報よりも遅い時刻情報の範囲に制限され、以後
はその制限された狭い検索範囲に対して上記の検索処理
が進められる。
In this way, the search is advanced within the searchable range of the journal file. In this process, if the read time information is not later than the search request time information, it is clear that the search target does not exist in the file range having the time information earlier than the read time information. Therefore, the searchable range is limited to the range of the time information that is later than the read time information, and the above-described search processing is performed on the limited narrow search range thereafter.

【0014】ジャーナルファイル内に検索対象が存在す
る場合には、上記の検索処理が繰り返されていくと何れ
かの段階で、その検索対象が発見されることになる。一
方、検索対象がファイル内の存在しない場合には、いつ
までもたっても検索対象は発見されない。しかし、検索
処理過程で検索可能範囲が狭く制限されていくため、そ
の制限された検索可能範囲外での検索は省略されること
になる。従って、検索対象が存在しない場合でも、検索
対象が存在する可能性の全くないファイル範囲の検索が
省略され、ファイル全体を検索することがなくなるた
め、検索終了時間が短縮する。
If a search target exists in the journal file, the search target will be discovered at some stage when the above-described search processing is repeated. On the other hand, if the search target does not exist in the file, the search target will not be found forever. However, since the searchable range is narrowly restricted in the search process, the search outside the restricted searchable range is omitted. Therefore, even if the search target does not exist, the search of the file range in which the search target may not exist is omitted, and the entire file is not searched, so that the search end time is shortened.

【0015】好適な実施例では、ジャーナルファイルに
対するサーチ(探索)法として単純なシーケンシャル探
索法が採用されて、ジャーナルファイルの最後尾から先
頭に向かって、時刻の最も遅いジャーナル情報から順番
に読出されて行き、それが検索対象に該当するか否かが
チェックされる。検索対象が発見できないままこの処理
が繰り返されて行って遂に、読み出されたジャーナル情
報の時刻情報が検索要求の時刻情報より遅くなくなって
しまうと、その時点で検索対象は存在しないと判断され
て、検索処理は打ち切られる。そのため、検索要求の時
刻情報より早い時刻情報をもつファイル範囲に対する検
索は、一切行われないことになる。従って、検索時間が
短縮する。
In the preferred embodiment, a simple sequential search method is adopted as a search method for a journal file, and the journal information having the latest time is read in order from the end to the beginning of the journal file. Then, it is checked whether or not it corresponds to the search target. When this process is repeated without finding the search target and the time information of the read journal information is no later than the time information of the search request, it is determined that there is no search target at that time. , The search process is terminated. Therefore, no search is performed on the file range having the time information earlier than the time information of the search request. Therefore, the search time is shortened.

【0016】この好適な実施例では、個々のトランザク
ションのトランザクション識別子に、そのトランザクシ
ョンの開始時刻を示すタイムスタンプが含められる。ま
た、ジャーナルファイル内のジャーナル情報には、その
ジャーナル情報を生んだトランザクションのトランザク
ション識別子と、そのジャーナル情報の書込時刻を示す
タイムスタンプとが含められる。
In the preferred embodiment, the transaction identifier for each transaction includes a time stamp indicating the start time of that transaction. Further, the journal information in the journal file includes the transaction identifier of the transaction that generated the journal information and the time stamp indicating the writing time of the journal information.

【0017】そして、あるジャーナル情報を検索する場
合には、そのジャーナル情報を生んだトランザクション
のトランザクション識別子が検索キーとして用いられ
る。まず、ジャーナルファイルの最後尾から順にジャー
ナル情報が読み出され、そのタイムスタンプ(書込時
刻)と、検索キーのタイムスタンプ(トランザクション
開始時刻)とが比較される。その結果、前者が後者より
遅ければ、次に、読み出したジャーナル情報のトランザ
クション識別子と、検索キーのトランザクション識別子
とが比較され、両トランザクション識別子が一致すれ
ば、そのジャーナル情報が検索結果として出力される。
トランザクション識別子が一致しなければ、次のジャー
ナル情報が読出され同様にチェックされる。
When retrieving certain journal information, the transaction identifier of the transaction that produced the journal information is used as a retrieval key. First, the journal information is read in order from the end of the journal file, and the time stamp (write time) is compared with the time stamp (transaction start time) of the search key. As a result, if the former is later than the latter, then the transaction identifier of the read journal information is compared with the transaction identifier of the search key, and if both transaction identifiers match, the journal information is output as the search result. .
If the transaction identifiers do not match, the next journal information is read and checked in the same way.

【0018】以上の処理を繰り返して行ったところ、ト
ランザクション識別子の一致が得られないないまま、読
み出したジャーナル情報のタイムスタンプが検索キーの
それより早くなってしまった場合は、その段階で検索対
象は存在しないと結論して、検索処理が打ち切られる。
If the time stamp of the read journal information is earlier than that of the search key without the transaction identifiers being matched, the search target is retried at that stage when the above processing is repeated. And the search process is terminated.

【0019】この実施例では、探索法として単純なシー
ケンシャル探索法が採用されているが、他の探索法を採
用して本発明を実施することも可能である。例えば、2
分探索法や、それを発展させた各種の平衡木の探索法を
採用した場合でも、本発明によれば、検索処理の進行に
伴って検索可能範囲が狭められていくため、検索時間が
短縮する。また、実施例の検索はジャーナルファイル内
のジャーナル情報自体に直接アクセスしていくものであ
るが、既述の特許公報の検索のように、ジャーナル情報
の本体とは別にインデックスファイルや時刻情報ファイ
ルを設けて、それらインデックスファイルや時刻情報フ
ァイルにアクセスしていく場合にも、本発明を適用する
ことが可能である。
In this embodiment, a simple sequential search method is adopted as the search method, but it is also possible to implement the present invention by adopting another search method. For example, 2
According to the present invention, the searchable range is narrowed as the search processing progresses even when the minute search method or various balanced tree search methods developed from the minute search method are adopted, so that the search time is shortened. . Further, although the search of the embodiment directly accesses the journal information itself in the journal file, an index file and a time information file are provided separately from the main body of the journal information as in the search of the above-mentioned patent publication. The present invention can also be applied to the case of accessing these index files and time information files.

【0020】[0020]

【実施例】図1は、本発明のジャーナル検索方式を適用
したジャーナル処理装置の一実施例の構成を示す。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 shows the configuration of an embodiment of a journal processing apparatus to which the journal search method of the present invention is applied.

【0021】このジャーナル処理装置1は、図示しない
ディスク装置に格納されたジャーナルファイルを管理す
るものである。ジャーナルファイルには、過去に処理さ
れたトランザクションのジャーナル情報が時系列的に蓄
積されている。尚、このジャーナル処理装置1は、説明
の都合上、一つの独立したハードウェア装置のごとくに
示してあり、勿論そのように構成されてもよいが、実際
はむしろ、トランザクション処理システムの一部をなす
プログラムにより実現される纏まった機能要素であっ
て、単一のハード装置内に搭載されても複数のハード装
置に分散されていても構わない。
The journal processor 1 manages a journal file stored in a disk device (not shown). The journal information of the transactions processed in the past is accumulated in the journal file in time series. It should be noted that the journal processing device 1 is shown as one independent hardware device for the sake of convenience of description, and of course it may be configured as such, but in reality, it is actually a part of the transaction processing system. It is a group of functional elements realized by a program, and may be installed in a single hardware device or distributed to a plurality of hardware devices.

【0022】さて、このジャーナル処理装置1は、ジャ
ーナル処理要求入力部3において、図示しない外部のト
ランザクション処理装置からのジャーナル書込要求やジ
ャーナル読込要求を受付ける。ここで、ジャーナル書込
要求とは、新たに処理されたトランザクションのジャー
ナル情報をジャーナルファイルに書込む要求であり、こ
の要求には少なくとも、そのトランザクションの識別子
とそのジャーナル情報の内容(トランザクション処理で
行ったデータベース等の更新内容)とが含まれている。
また、ジャーナル読込要求とは、特定のトランザクショ
ンのジャーナル情報をジャーナルファイルから検索して
外部へ読出す要求であり、この要求には少なくとも、そ
のトランザクションの識別子が含まれている。
In the journal processing device 1, the journal processing request input unit 3 accepts a journal writing request and a journal reading request from an external transaction processing device (not shown). Here, the journal write request is a request to write the journal information of a newly processed transaction in a journal file, and at least this request has the identifier of the transaction and the content of the journal information (performed in the transaction processing). The updated contents of the database etc.) are included.
The journal read request is a request for retrieving the journal information of a specific transaction from the journal file and reading the journal information to the outside, and this request includes at least the identifier of the transaction.

【0023】受付けられたジャーナル書込要求やジャー
ナル読込要求は、ジャーナル処理要求振り分け部5にお
いて種別に振り分けられ、ジャーナル書込要求はジャー
ナル書込要求処理部7に、ジャーナル読込要求はジャー
ナル読込要求処理部9に送られる。
The received journal writing request and journal reading request are sorted into types by the journal processing request sorting unit 5, the journal writing request is sent to the journal writing request processing unit 7, and the journal reading request is sent to the journal reading request processing. Sent to department 9.

【0024】ジャーナル書込要求処理部7は、ジャーナ
ル書込要求に基づき、所定フォーマットのジャーナル情
報を整え、これをジャーナルファイルに書込む処理を行
う。ジャーナル読込要求処理部9は、ジャーナル読込要
求に基づき、指定されたジャーナル情報をジャーナルフ
ァイルから検索し読み出す処理を行う。
The journal write request processing unit 7 prepares journal information in a predetermined format based on the journal write request and writes the journal information in a journal file. The journal read request processing unit 9 performs a process of searching and reading the specified journal information from the journal file based on the journal read request.

【0025】ジャーナル処理結果出力部11は、ジャー
ナル書込要求処理部7及びジャーナル読込要求処理部9
からそれぞれの処理結果を受取り、要求依頼元のトラン
ザクション処理装置に返送するものである。
The journal processing result output unit 11 includes a journal writing request processing unit 7 and a journal reading request processing unit 9.
It receives the respective processing results from and sends them back to the transaction processing device that made the request request.

【0026】図2は、ジャーナル書込要求処理部7の構
成を示す。
FIG. 2 shows the configuration of the journal write request processing unit 7.

【0027】ジャーナル書込指示受信部13は、ジャー
ナル書込要求を受信し、これにジャーナル情報に固有の
ジャーナル番号を付与して、それをタイムスタンプ付与
部15に渡す。タイムスタンプ付与部15は、ジャーナ
ル書込要求に基づき所定フォーマットのジャーナル情報
を整えるもので、その際、現時点の時刻を示すタイムス
タンプをジャーナル情報中に加入する。
The journal writing instruction receiving unit 13 receives the journal writing request, adds a unique journal number to the journal information, and passes it to the time stamp adding unit 15. The time stamp adding unit 15 prepares journal information in a predetermined format based on the journal writing request, and at that time, adds a time stamp indicating the current time to the journal information.

【0028】ジャーナル書込処理部17は、タイムスタ
ンプ付与部15によって整えられたジャーナル情報をジ
ャーナルファイルに書込む。この時、ジャーナルファイ
ル内には、過去のジャーナル情報が時系列的に配列され
ているので、新たなジャーナル情報はその配列の最後尾
に追記されることになる。ジャーナル書込処理終了部1
9は、ジャーナル情報の書込が終了したことを確認し
て、終了結果を出力すると共に、このジャーナル書込要
求処理部7の動作を終了させるものである。
The journal writing processing unit 17 writes the journal information prepared by the time stamp adding unit 15 in the journal file. At this time, since the past journal information is arranged in time series in the journal file, the new journal information is added to the end of the arrangement. Journal writing process end part 1
Reference numeral 9 confirms that the writing of the journal information is completed, outputs the completion result, and terminates the operation of the journal writing request processing unit 7.

【0029】図3は、タイムスタンプ付与部15の処理
を具体的に説明したものである。
FIG. 3 concretely explains the processing of the time stamp giving section 15.

【0030】図3(A)は、ジャーナル書込要求に含ま
れているトランザクション識別子100を示している。
このトランザクション識別子は、外部のトランザクショ
ン処理装置において作成されたもので、そのトランザク
ションに固有のトランザクション番号と、そのトランザ
クションの開始時刻を示すタイムスタンプとが含まれて
いる。
FIG. 3A shows the transaction identifier 100 included in the journal write request.
This transaction identifier is created by an external transaction processing device, and includes a transaction number unique to the transaction and a time stamp indicating the start time of the transaction.

【0031】図3(B)は、タイムスタンプ付与部15
がジャーナル書込要求に基づき整えたジャーナル情報2
00を示している。このジャーナル情報200には、ジ
ャーナル書込要求から取得したジャーナル情報の内容
(データベース等の更新情報、図示せず)とトランザク
ション識別子100(図3(A))の複製203の他
に、タイムスタンプ部15によって加入されたジャーナ
ル情報識別子201が含まれている。
FIG. 3B shows the time stamp adding section 15.
Information prepared by the journal write request 2
00 is shown. The journal information 200 includes the contents of the journal information acquired from the journal write request (update information of the database and the like, not shown) and the copy 203 of the transaction identifier 100 (FIG. 3A), as well as the time stamp portion. The journal information identifier 201 subscribed by 15 is included.

【0032】このジャーナル情報識別子201には、ジ
ャーナル書込指示受信部13が付与したこのジャーナル
情報に固有のジャーナル番号と、タイムスタンプ付与部
15がその処理時点で付与したタイムスタンプとが含ま
れている。このジャーナル情報識別子201内のタイム
スタンプは、実質的に、そのジャーナル情報の書込時刻
を示すものであり、当然に、トランザクション識別子2
03(100)内のタイムスタンプの時刻(トランザク
ション開始時刻)よりも若干遅い時刻となっている。
The journal information identifier 201 includes the journal number unique to the journal information given by the journal writing instruction receiving unit 13 and the time stamp given by the time stamp giving unit 15 at the time of processing. There is. The time stamp in the journal information identifier 201 substantially indicates the writing time of the journal information, and naturally, the transaction identifier 2
The time is slightly later than the time stamp (transaction start time) in 03 (100).

【0033】この図3(B)に示したようなフォーマッ
トのジャーナル情報が、時系列的にジャーナルファイル
に蓄積されている。
The journal information in the format as shown in FIG. 3B is accumulated in the journal file in time series.

【0034】図4は、ジャーナル読込要求処理部9の構
成を示す。
FIG. 4 shows the configuration of the journal read request processing unit 9.

【0035】ジャーナル読込指示受信部21は、ジャー
ナル読込要求を受信し、ジャーナル読込処理部23に通
知する。
The journal read instruction receiving unit 21 receives the journal read request and notifies the journal read processing unit 23 of it.

【0036】ジャーナル読込処理部23は、まず、ジャ
ーナルファイルの最後尾の(つまり、書込時刻が最も遅
い)ジャーナル情報を読込む。後述するトランザクショ
ン識別子判定部27からトランザクション識別子が不一
致である旨の通知を受けると、ジャーナル読込処理部2
3は、次に遅いジャーナル情報を読み込む。このよう
に、ジャーナル読込処理部23は、ジャーナルファイル
の最後尾から先頭へ向かって、書込時刻の遅い順にジャ
ーナル情報を読込んでいく。
The journal read processor 23 first reads the journal information at the end of the journal file (that is, the writing time is latest). When a notification that the transaction identifiers do not match is received from the transaction identifier determination unit 27, which will be described later, the journal read processing unit 2
3 reads the next slowest journal information. In this way, the journal read processing unit 23 reads the journal information from the end of the journal file toward the beginning, in the order of the latest writing time.

【0037】タイムスタンプ判定部25は、ジャーナル
読込処理部23によって読み込まれたジャーナル情報内
のジャーナル情報識別子201のタイムスタンプと、ジ
ャーナル読込要求内のトランザクション識別子100の
タイムスタンプとを比較する。その結果、ジャーナル情
報識別子201のタイムスタンプ(ジャーナル情報書込
時刻)がトランザクション識別子100のタイムスタン
プ(トランザクション開始時刻)より遅い場合は、トラ
ンザクション識別子判定部27にトランザクション識別
子の判定処理を依頼し、一方、ジャーナル書込時刻がト
ランザクション開始時刻より遅くない場合は、その旨を
ジャーナル読込処理終了部29に通知する。
The time stamp determination unit 25 compares the time stamp of the journal information identifier 201 in the journal information read by the journal read processing unit 23 with the time stamp of the transaction identifier 100 in the journal read request. As a result, when the time stamp of the journal information identifier 201 (journal information writing time) is later than the time stamp of the transaction identifier 100 (transaction start time), the transaction identifier determining unit 27 is requested to perform transaction identifier determination processing. If the journal write time is not later than the transaction start time, the journal read processing end unit 29 is notified to that effect.

【0038】トランザクション識別子判定部27は、タ
イムスタンプ判定部25より依頼を受けると、ジャーナ
ル読込処理部23によって読み込まれたジャーナル情報
内のトランザクション識別子203と、ジャーナル読込
要求内のトランザクション識別子100とを比較する。
その結果、両トランザクション識別子203、100が
一致しなければ、その旨をジャーナル読込処理部23に
伝え、一致すれば、その旨をジャーナル読込処理終了部
29に通知する。
Upon receipt of the request from the time stamp determination unit 25, the transaction identifier determination unit 27 compares the transaction identifier 203 in the journal information read by the journal read processing unit 23 with the transaction identifier 100 in the journal read request. To do.
As a result, if the transaction identifiers 203 and 100 do not match, the fact is notified to the journal reading processing unit 23, and if they match, the journal reading processing ending unit 29 is notified.

【0039】ジャーナル読込処理終了部29は、タイム
スタンプ判定部23から上記遅くない旨の通知を受けた
場合は、検索対象のジャーナル情報がジャーナルファイ
ルに存在しないと判断して、その判断結果を出力すると
共に、ジャーナル読込要求処理部9の動作を終了させ
る。一方、トランザクション識別子判定部27から上記
一致の旨の通知を受けた場合は、ジャーナル読込処理部
23によって読み込まれたジャーナル情報を検索結果と
して出力する共に、ジャーナル読込要求処理部9の動作
を終了させる。
When the journal read processing termination unit 29 receives the notification from the time stamp determination unit 23 that it is not late, it determines that the journal information to be searched does not exist in the journal file and outputs the determination result. At the same time, the operation of the journal read request processing unit 9 is terminated. On the other hand, when the notification of the above-mentioned coincidence is received from the transaction identifier determination unit 27, the journal information read by the journal read processing unit 23 is output as a search result and the operation of the journal read request processing unit 9 is ended. .

【0040】図5は、以上の構成をもつジャーナル読込
要求処理部9の動作流れを示す。
FIG. 5 shows an operation flow of the journal read request processing unit 9 having the above configuration.

【0041】ジャーナル読込要求が受信されると、その
ジャーナル読込要求を検索キーにして、以下の様な検索
動作が行われれる。
When the journal read request is received, the following search operation is performed using the journal read request as a search key.

【0042】先ず、ジャーナルファイルの最後尾のジャ
ーナル情報を読み込む(S1)。その際、正常に読込が
できなかった場合は(S2)、検索失敗として処理を終
了する。
First, the last journal information of the journal file is read (S1). At that time, if the data could not be read normally (S2), the search ends in failure and the process ends.

【0043】ジャーナル情報を正常に読み込めた場合
は、次に、検索キー内のトランザクション識別子100
中のタイムスタンプ(トランザクション開始時刻)と、
読み込んだジャーナル情報内のジャーナル識別子201
中のタイムスタンプ(ジャーナル書込時刻)とを比較す
る(S3)。トランザクション開始時刻はそのジャーナ
ル情報の書込時刻より必ず早いから、その比較結果がト
ランザクション開始時刻がジャーナル書込時刻より早く
ないことを示している場合には、検索失敗として処理を
終了する。
When the journal information is normally read, next, the transaction identifier 100 in the search key
Inside time stamp (transaction start time),
Journal identifier 201 in the read journal information
The time stamp (journal writing time) is compared (S3). Since the transaction start time is always earlier than the write time of the journal information, if the comparison result indicates that the transaction start time is not earlier than the journal write time, the process ends as a search failure.

【0044】一方、上記比較結果がトランザクション開
始時刻がジャーナル書込時刻より早いことを示している
場合は、次に、検索キー中のトランザクション識別子1
00と、読み込んだジャーナル情報中のトランザクショ
ン識別子203とを比較する(S4)。その結果、一致
すれば、検索成功として、そのジャーナル情報を出力し
て処理を終了する。
On the other hand, if the comparison result shows that the transaction start time is earlier than the journal write time, then the transaction identifier 1 in the search key
00 and the transaction identifier 203 in the read journal information are compared (S4). As a result, if they match, it is determined that the search is successful, the journal information is output, and the process ends.

【0045】トランザクション識別子が一致しない場合
は、一つ前のジャーナル情報をジャーナルファイルから
読出す(S5)。この時、正常に読み出せなければ検索
失敗として処理を終了し、正常に読み出せれば、そのジ
ャーナル情報について、ステップS3とステップS4の
チェックを再び行う。
If the transaction identifiers do not match, the previous journal information is read from the journal file (S5). At this time, if the data cannot be read normally, the process ends as a search failure, and if the data can be normally read, the journal information is checked again in steps S3 and S4.

【0046】以上の動作により、ジャーナル情報の検索
は、ジャーナルファイルのうち、書込時刻が読込対象の
トランザクション開始時刻より遅いジャーナル情報の範
囲だけで行われ、書込時刻がトランザクション開始時刻
より早いジャーナル情報の範囲のサーチは省かれる。従
って、読込対象がファイル内に存在しないジャーナル情
報であっても、ジャーナルファイル内の全範囲をサーチ
する必要がなくなり、短時間で検索が終了する。
By the above operation, the journal information is searched only in the range of the journal information of which the writing time is later than the transaction start time of the reading object in the journal file, and the writing time is earlier than the transaction start time. The search for a range of information is omitted. Therefore, even if the read target is journal information that does not exist in the file, it is not necessary to search the entire range in the journal file, and the search is completed in a short time.

【0047】また、ジャーナルファイルの検索範囲が一
部の範囲だけに限定されるため、ジャーナルファイルを
格納したディスク装置に対する負荷も軽減する。更に、
ジャーナル検索中にトランザクションを実行した場合
の、当該トランザクションのレスポンスタイム及びスル
ープットも向上する。
Further, since the search range of the journal file is limited to only a part of the range, the load on the disk device storing the journal file is also reduced. Furthermore,
When a transaction is executed during the journal search, the response time and throughput of the transaction are also improved.

【0048】以上、本発明の一実施例を説明したが、本
発明はこの実施例以外の種々の態様でも実施することが
できる。例えば、特開平3−202956号に開示され
たようなインデックスファイルでの検索や、特開平4−
190454号に開示された時刻情報ファイルでの検索
においても、本発明に従って検索キーの示す時刻より遅
い時刻範囲だけを検索すれば、特に検索対象が存在しな
い場合に一層の検索時間の短縮につながる。
Although one embodiment of the present invention has been described above, the present invention can be implemented in various modes other than this embodiment. For example, a search using an index file as disclosed in Japanese Patent Laid-Open No. 3-202956 and Japanese Patent Laid-Open No.
Also in the search in the time information file disclosed in No. 190454, if only the time range later than the time indicated by the search key is searched according to the present invention, the search time can be further shortened particularly when there is no search target.

【0049】[0049]

【発明の効果】本発明によれば、存在しないジャーナル
情報が検索対象であっても、時刻により制限された範囲
だけを検索するれば良いため、検索時間が短縮する。
According to the present invention, even if non-existent journal information is a search target, only the range limited by the time need be searched, so the search time is shortened.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明を適用したジャーナル処理装置の一実施
例の構成を示すブロック図。
FIG. 1 is a block diagram showing the configuration of an embodiment of a journal processing apparatus to which the present invention is applied.

【図2】同実施例のジャーナル書込要求処理部の構成を
示すブロック図。
FIG. 2 is a block diagram showing the configuration of a journal write request processing unit of the embodiment.

【図3】同実施例で用いられるトランザクション識別子
及びジャーナル情報の構成を示すデータ構成図。
FIG. 3 is a data configuration diagram showing a configuration of a transaction identifier and journal information used in the embodiment.

【図4】同実施例のジャーナル読込要求処理部の構成を
示すブロック図。
FIG. 4 is a block diagram showing the configuration of a journal read request processing unit of the embodiment.

【図5】ジャーナル読込要求処理部の動作を示すフロー
チャート。
FIG. 5 is a flowchart showing the operation of a journal read request processing unit.

【符号の説明】[Explanation of symbols]

1 ジャーナル処理装置 7 ジャーナル書込要求処理部 9 ジャーナル読込要求処理部 15 タイムスタンプ付与部 23 ジャーナル読込処理部 25 タイムスタンプ判定部 27 トランザクション識別子判定部 1 Journal Processing Device 7 Journal Write Request Processing Unit 9 Journal Read Request Processing Unit 15 Time Stamp Adding Unit 23 Journal Read Processing Unit 25 Time Stamp Determination Unit 27 Transaction Identifier Determination Unit

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 時刻情報をもつジャーナル情報を時刻情
報の順序で格納したジャーナルファイルと、 指定された時刻情報をもつジャーナル検索要求を受け
て、前記ジャーナルファイル内の検索可能範囲から、個
々のジャーナル情報の時刻情報を読出す時刻情報読出し
手段と、 前記読み出された時刻情報と前記指定された時刻情報と
を比較して、前者の時刻情報が後者の時刻情報より遅く
ない場合に、前記ジャーナルファイル内の検索可能範囲
を、前記前者の時刻情報より遅い時刻情報をもつ範囲だ
けに制限する検索範囲制限手段とを備えたジャーナル検
索方式。
1. A journal file in which journal information having time information is stored in the order of time information, and a journal search request having designated time information is received, and individual journals are searched from the searchable range in the journal file. Time information reading means for reading time information of information, and the read time information and the specified time information are compared, and when the former time information is not later than the latter time information, the journal A journal search method comprising a search range limiting means for limiting a searchable range in a file to a range having time information later than the former time information.
【請求項2】 請求項1記載の方式において、 前記ジャーナルファイル内のジャーナル情報の時刻情報
が、前記ジャーナル情報が前記ジャーナルファイルに書
込まれた時刻を示し、 前記ジャーナル検索要求の時刻情報が、検索対象のジャ
ーナル情報を生んだトランザクションの処理時刻を示す
ことを特徴とするジャーナル検索方式。
2. The method according to claim 1, wherein the time information of the journal information in the journal file indicates the time when the journal information is written in the journal file, and the time information of the journal search request is A journal search method characterized by indicating the processing time of the transaction that generated the journal information to be searched.
【請求項3】 請求項1記載の方式において、 前記ジャーナルファイル内の各ジャーナル情報が、前記
時刻情報の他に、各ジャーナル情報を生んだトランザク
ションに固有のトランザクション識別子を含み、 前記ジャーナル検索要求が、検索対象のジャーナル情報
を生んだトランザクションに固有のトランザクション識
別子を含み、 各トランザクションのトランザクション識別子が、各ト
ランザクションの処理時刻を示す時刻情報を前記指定さ
れた時刻情報として含む、ことを特徴とするジャーナル
検索方式。
3. The method according to claim 1, wherein each journal information in the journal file includes, in addition to the time information, a transaction identifier unique to a transaction that generated each journal information, and the journal search request is A journal including a transaction identifier unique to the transaction that has generated the journal information to be searched, and the transaction identifier of each transaction includes time information indicating a processing time of each transaction as the specified time information. Search method.
【請求項4】 請求項3記載の方式において、 前記時刻情報読出し手段が、前記個々のジャーナル情報
の時刻情報を読み出すとき、前記個々のジャーナル情報
のトランザクション識別子も共に読出すようになってお
り、 前記検索範囲制限手段による比較の結果が前記前者の時
刻情報が前記後者の時刻情報より遅いことを示している
場合、前記読み出したトランザクション識別子と前記ジ
ャーナル検索要求に含まれていたトランザクション識別
子とを比較し、双方のトランザクション識別子が一致し
たとき、検索成功と判定して、対応するジャーナル情報
を出力する成功判定手段を更に備えたことを特徴とする
ジャーナル検索方式。
4. The method according to claim 3, wherein when the time information reading means reads the time information of the individual journal information, the transaction identifier of the individual journal information is also read. When the result of the comparison by the search range limiting means indicates that the former time information is later than the latter time information, the read transaction identifier is compared with the transaction identifier included in the journal search request. However, when both transaction identifiers match, it is determined that the search is successful, and further comprises a success determination means for outputting the corresponding journal information.
【請求項5】 時刻情報をもつジャーナル情報を時刻情
報の順序で格納したジャーナルファイルを用意する過程
と、 指定された時刻情報をもつジャーナル検索要求を受け
て、前記ジャーナルファイル内の検索可能範囲から、個
々のジャーナル情報の時刻情報を読出す時刻情報読出し
過程と、 前記読み出された時刻情報と前記指定された時刻情報と
を比較して、前者の時刻情報が後者の時刻情報より遅く
ない場合、前記ジャーナルファイル内の検索可能範囲
を、前記前者の時刻情報より遅い時刻情報をもつ範囲だ
けに制限する検索範囲制限過程とを備えたジャーナル検
索方法。
5. A process of preparing a journal file in which journal information having time information is stored in the order of time information, and a journal search request having specified time information is received, and the journal file within the searchable range in the journal file is received. If the former time information is not later than the latter time information by comparing the time information read process of reading the time information of each journal information with the specified time information. A search range limiting step of limiting the searchable range in the journal file to only a range having time information later than the former time information.
JP7064833A 1995-02-28 1995-02-28 Journal retrieval systm Pending JPH08235044A (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP7064833A JPH08235044A (en) 1995-02-28 1995-02-28 Journal retrieval systm
EP96903243A EP0758114A4 (en) 1995-02-28 1996-02-27 Cooperative distributed system, and journal and recovery processings therein
PCT/JP1996/000440 WO1996027157A1 (en) 1995-02-28 1996-02-27 Cooperative distributed system, and journal and recovery processings therein
US08/737,040 US6052695A (en) 1995-02-28 1996-02-27 Accurate completion of transaction in cooperative type distributed system and recovery procedure for same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7064833A JPH08235044A (en) 1995-02-28 1995-02-28 Journal retrieval systm

Publications (1)

Publication Number Publication Date
JPH08235044A true JPH08235044A (en) 1996-09-13

Family

ID=13269650

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7064833A Pending JPH08235044A (en) 1995-02-28 1995-02-28 Journal retrieval systm

Country Status (1)

Country Link
JP (1) JPH08235044A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008250717A (en) * 2007-03-30 2008-10-16 Nec Corp Method, unit and program for database recovery
CN111708670A (en) * 2020-06-10 2020-09-25 中国第一汽车股份有限公司 Method and device for determining task time parameters in real-time operating system and vehicle

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008250717A (en) * 2007-03-30 2008-10-16 Nec Corp Method, unit and program for database recovery
CN111708670A (en) * 2020-06-10 2020-09-25 中国第一汽车股份有限公司 Method and device for determining task time parameters in real-time operating system and vehicle

Similar Documents

Publication Publication Date Title
US5613113A (en) Consistent recreation of events from activity logs
JP3554459B2 (en) Text data registration search method
CN110543446B (en) Block chain direct filing method based on snapshot
JP2003515802A (en) System and method for extracting an index key data field
JP2000357115A (en) Device and method for file retrieval
EP1850250A1 (en) Method and system for renewing an index
JPH08235044A (en) Journal retrieval systm
JP2925042B2 (en) Information link generation method
JPS62245348A (en) Method and device for updating data base
JP2669241B2 (en) Migration processing method
JP2980610B2 (en) Transaction management device
JP2747009B2 (en) Record addition method for indexed sequential files
JP3317856B2 (en) Installation speedup method by simultaneous execution
JPH0962554A (en) Quiescent point save generation system
JPH10124351A (en) Device and method for managing file retention period and storage medium for storing file retention period managing program
JPS61278932A (en) Method of processing data addition
JPH06332856A (en) On-line job processing system
JPH07117937B2 (en) Online system transaction processor
JPH02227774A (en) Retrieving data setting process system
JPS63196958A (en) Fault recovery processing method
JPH0784849A (en) Data access control method
JPH0823840B2 (en) Method and apparatus for updating database
JPH06149635A (en) Method for additional processing of record
JPH0488476A (en) Data totalization system
JPH0877044A (en) Data base controller