JPH0210457B2 - - Google Patents

Info

Publication number
JPH0210457B2
JPH0210457B2 JP57051593A JP5159382A JPH0210457B2 JP H0210457 B2 JPH0210457 B2 JP H0210457B2 JP 57051593 A JP57051593 A JP 57051593A JP 5159382 A JP5159382 A JP 5159382A JP H0210457 B2 JPH0210457 B2 JP H0210457B2
Authority
JP
Japan
Prior art keywords
log file
data
block
processing unit
database
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP57051593A
Other languages
Japanese (ja)
Other versions
JPS58168165A (en
Inventor
Kyotaka Sukauchi
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP57051593A priority Critical patent/JPS58168165A/en
Publication of JPS58168165A publication Critical patent/JPS58168165A/en
Publication of JPH0210457B2 publication Critical patent/JPH0210457B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operations

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

【発明の詳細な説明】 〔発明の技術分野〕 本発明は、一時ログ・フアイルと履歴ログ・フ
アイルとを有し、データ・ベースのリカバリを行
う際に履歴ログ・フアイルを用いるようになつた
データ・ベース・システムのリカバリ方式におい
て、履歴ログ・フアイルの読出データにエラーが
検出された場合、上記一時ログ・フアイルを用い
て履歴ログ・フアイルを復旧すると共にデータ・
ベースのリカバリを行うようにしたデータ・ベー
ス・システムのリカバリ方式に関するものであ
る。
[Detailed Description of the Invention] [Technical Field of the Invention] The present invention has a temporary log file and a historical log file, and the historical log file is used when performing database recovery. In the recovery method of a database system, if an error is detected in the read data of the history log file, the temporary log file is used to recover the history log file and the data is restored.
This invention relates to a recovery method for a database system that performs base recovery.

〔従来技術と問題点〕[Conventional technology and problems]

第1図は本発明が適用されるデータ・ベース・
システムにおけるログ取得処理を説明する図であ
る。第1図において、1はデータ・ベース、2―
Aないし2―Cは応用プログラム、3はログ・デ
ータ取得処理部、4はログ・データ収集制御機
構、5はHLFバツフア、6はログ・データ書出
し制御機構、7はTLF書出し制御部、8はHLF
書出し制御部、9は一時ログ・フアイル(以下、
TLFという)、10は履歴ログ・フアイル(以
下、HLFという)、Tはトラツク、Ko-1,Ko
Ko+1,…はHLFのブロツク、ないしは更新
後ログ・データをそれぞれ示している。また、
、、……は処理の順序を示している。
TLF9には高速ドラムが使用され、HLF10に
はTLF9より低速のDASDが使用される。
Figure 1 shows a database to which the present invention is applied.
FIG. 2 is a diagram illustrating log acquisition processing in the system. In Figure 1, 1 is a database, 2-
A to 2-C are application programs, 3 is a log data acquisition processing unit, 4 is a log data collection control mechanism, 5 is an HLF buffer, 6 is a log data write control mechanism, 7 is a TLF write control unit, and 8 is a HLF
The write control unit, 9 is a temporary log file (hereinafter referred to as
10 is a history log file (hereinafter referred to as HLF), T is a track, K o-1 , K o ,
K o+1 , . . . indicate HLF blocks or updated log data, respectively. Also,
,,... indicate the order of processing.
TLF9 uses a high-speed drum, and HLF10 uses DASD, which is slower than TLF9.

次に第1図を参照してログ・データの取得を説
明する。
Next, acquisition of log data will be explained with reference to FIG.

応用プログラム2―Aはデータ・ベース1を
更新し、という更新後データを発生する。
Application program 2-A updates database 1 and generates updated data.

ログ・データはログ・データ収集制御機構
4によりHLFバツフア5上に転送される。
The log data is transferred onto the HLF buffer 5 by the log data collection control mechanism 4.

、 HLFバツフア5上の更新後ログ・デー
タは、さらにログ・データ書出し制御機構6
によつてあるTLF9のトラツク上の任意のブ
ロツクに書込まれる。
The updated log data on the HLF buffer 5 is further transferred to the log data write control mechanism 6.
is written to an arbitrary block on a certain TLF9 track.

、、 ないしと同様な処理が繰り返え
される。
, , etc. The same process is repeated.

応用プログラム2―Cはデータ・ベースを更
新し、更新後ログ・データを発生する。
Application program 2-C updates the database and generates updated log data.

ログ・データをHLFバツフア5上に転送
しようとするが、HLFバツフア5上の未使用
領域が不足しているので、HLFバツフア5の
内容とをHLF10のカレント・ブロツク
Koへ書出す。
An attempt is made to transfer the log data to HLF buffer 5, but there is not enough unused space on HLF buffer 5, so the contents of HLF buffer 5 are transferred to the current block of HLF 10.
Write to K o .

なお、第1図に図示されていないが、その後に
更新後ログ・データはHLFバツフア5に移さ
れ、しかる後にログ・データ書出し制御機構6に
よつてTLF9に書込まれる。
Although not shown in FIG. 1, the updated log data is then transferred to the HLF buffer 5, and then written to the TLF 9 by the log data write control mechanism 6.

データ・ベース・システムに電源断などが生
じ、システム・ダウンとなると、障害復旧後にト
ランザクシヨン・リカバリ・プログラムが起動さ
れる。トランザクシヨン・リカバリ・プログラム
はHLF10を或るポイントから順番に読んでシ
ステム・ダウン・ポイントを知ろうとするが、電
源断がHLF書出し中に発生していたとすると、
読込み不能のブロツクを検出する。従来技術にお
いては、HLFに書出し中に電源断などが発生し
た場合、その書出し中のデータを読込むことは再
書込みを行わない限り不可能となり、そのデー
タ・セツトを読んで処理を行うトランザクシヨ
ン・リカバリ・プログラムは正常な動作をするこ
とが出来ない。なお、TLFおよびHLFを使用し
たログ取得及びリカバリの一般については、例え
ばFACOM OS /F4 AIM解説書 XE40系
用(昭和55年12月富士通株式会社発行)に記載さ
れている。
When a database system goes down due to a power outage, etc., a transaction recovery program is started after the failure is recovered. The transaction recovery program attempts to know the system down point by reading HLF10 sequentially from a certain point, but if a power failure occurs while writing the HLF,
Detect unreadable blocks. In conventional technology, if a power outage occurs while writing to HLF, it is impossible to read the data being written unless it is rewritten, and a transaction that reads and processes the data set becomes impossible.・The recovery program cannot operate normally. General information on log acquisition and recovery using TLF and HLF is described, for example, in the FACOM OS/F4 AIM Manual for XE40 Series (published by Fujitsu Limited, December 1980).

〔発明の目的〕[Purpose of the invention]

本発明は、上記の考察に基づくものであつて、
ログ・データの取得のためにTLFとHLFとを有
するデータ・ベース・システムにおいて、HLF
書込み中に電源断や電源異常が発生してシステ
ム・ダウンした場合でも、データ・ベース・シス
テムの正常な立上げ復旧処理を行い得ると共にそ
の後のデータ・ベース・システムの正常動作を保
障できるようになつたデータ・ベース・システム
のリカバリ方式を提供することを目的としてい
る。
The present invention is based on the above considerations, and includes:
In a database system that has TLF and HLF for acquiring log data, HLF
Even if the system goes down due to a power outage or power failure during writing, the database system can be restarted and recovered normally, and the normal operation of the database system can be guaranteed thereafter. Its purpose is to provide a recovery method for damaged database systems.

〔発明の構成〕[Structure of the invention]

そしてそのため、本発明のデータ・ベース・シ
ステムにおけるリカバリ方式は、 「データ・ベース1と、 一時ログ・フアイル9と、 複数のブロツクを持つ履歴ログ・フアイル10
と、 履歴ログ・フアイル用バツフア5を持つログ・
データ取得処理部3と、 リカバリ処理部11と を具備し、 上記ログ・データ取得処理部3が、上記デー
タ・ベースを使用する応用プログラムによつて作
られた更新データを履歴ログ・フアイル用バツフ
ア5を経由して一時ログ・フアイル9に書き込む
と共に、他の更新後データを一時ログ・フアイル
9に書き込む際に履歴ログ・フアイル用バツフア
5に当該他の更新後データを格納するスペースが
存在しない場合には履歴ログ・フアイル用バツフ
ア5の内容を履歴ログ・フアイル10のカレン
ト・ブロツクに書き込むように構成され、 リカバリ処理部11が、一時ログ・フアイル9
および履歴ログ・フアイル10に格納されている
更新後データを使用してシステムをダウン直前の
状態に復旧するための処理を行うように構成され
ている データ・ベース・システムにおけるリカバリ方式
であつて、 リカバリ処理を行う際、リカバリ処理部11
は、履歴ログ・フアイル10のブロツクを順次読
込み、読込み不可でない場合には読込んだデータ
を用いてデータ・ベース1を更新し、 読込み不可である場合には、当該読込み不可ブ
ロツクが最新ブロツクか否かを調べ、当該読込み
不可ブロツクが最新ブロツクである場合には当該
読込み不可ブロツクに対応するデータを一時ロ
グ・フアイル9から捜し出し、当該捜し出したデ
ータを用いて読込み不可ブロツクを修復すると共
にデータ・ベース1を更新するように構成されて
いる ことを特徴とするデータ・ベース・システムにお
けるリカバリ方式。
Therefore, the recovery method in the database system of the present invention consists of a database 1, a temporary log file 9, and a history log file 10 having a plurality of blocks.
and a log file with a buffer of 5 for the history log file.
It is equipped with a data acquisition processing unit 3 and a recovery processing unit 11, and the log data acquisition processing unit 3 stores update data created by an application program that uses the database into a history log file buffer. 5 to the temporary log file 9, and when writing other updated data to the temporary log file 9, there is no space in the history log file buffer 5 to store the other updated data. In this case, the contents of the history log file buffer 5 are written to the current block of the history log file 10, and the recovery processing unit 11 writes the contents of the history log file buffer 5 to the temporary log file 9.
A recovery method in a database system configured to perform processing for restoring the system to a state immediately before the system went down using the updated data stored in the history log file 10, When performing recovery processing, the recovery processing unit 11
reads the blocks in history log file 10 one after another, and if it is not readable, updates database 1 using the read data, and if it is not readable, checks whether the block that cannot be read is the latest block. If the unreadable block is the latest block, the data corresponding to the unreadable block is searched from the temporary log file 9, and the unreadable block is repaired using the found data. A recovery method in a database system, characterized in that it is configured to update a base 1.

〔発明の実施例〕[Embodiments of the invention]

以下、本発明を図面を参照しつつ説明する。 Hereinafter, the present invention will be explained with reference to the drawings.

第2図は本発明の1実施例を説明する図であ
る。第2図において、11はトランザクシヨン・
リカバリ処理部、12はHLF読込み制御部、1
3はログ・データ組立て処理部、14はデータ・
ベース更新処理部、15はREAD不可ブロツク
復元処理部、16は電源異常によるREAD不可
状態診断処理部、17はTLF読込み制御部をそ
れぞれ示している。なお、第1図と同一符号は同
一物を示している。
FIG. 2 is a diagram illustrating one embodiment of the present invention. In Figure 2, 11 is the transaction
Recovery processing section, 12 is HLF reading control section, 1
3 is a log/data assembly processing unit; 14 is a data/data assembly processing unit;
15 is a base update processing section, 15 is a READ disabled block restoration processing section, 16 is a READ disabled state diagnosis processing section due to a power failure, and 17 is a TLF read control section. Note that the same reference numerals as in FIG. 1 indicate the same parts.

要約すると、トランザクシヨン・リカバリ処理
部11は、システム異常(システム・ダウン)が
発生した後に動作し、応用プログラムの使用して
いたデータ・ベース1をTLF9およびHLF10
に取得済みのログ・データを使用して、システ
ム・ダウン直前の矛盾のない状態に復旧する役目
を有しているものである。次に第2図を参照して
トランザクシヨン・リカバリ処理を説明する。
To summarize, the transaction recovery processing unit 11 operates after a system abnormality (system down) occurs, and restores the database 1 used by the application program to TLF9 and HLF10.
It has the role of restoring the system to a consistent state just before the system went down, using log data that has already been acquired. Next, transaction recovery processing will be explained with reference to FIG.

HLF10の任意のブロツクKo-1よりログ・
データを読込む。
Log from any block K o-1 of HLF10.
Load data.

読取られたログ・データは仕分けされ、デー
タ・ベース1へ書込む形式に組立てられる。
The read log data is sorted and assembled into a format for writing to database 1.

HLF10上のシステム異常(電源断)時に
カレントであつたブロツクKoの内容を読もう
とするが、データ・チエツク(Data Check)
が発生し、読めない。なお、従来技術において
は、この時点でトランザクシヨン・リカバリ処
理を中断していた。
An attempt is made to read the contents of block K o that was current at the time of a system error (power off) on HLF10, but Data Check is not executed.
occurs and cannot be read. Note that in the prior art, transaction recovery processing was interrupted at this point.

、 電源異常によつてREAD不可状態が発
生したのかを診断する。この診断は、READ
不可ブロツクの次のブロツクを読んでみて、読
めた場合には更にその読んだデータが無効デー
タであるかを調べる。HLF10のブロツク
Ko-1,Ko,Ko+1…に書出されているログ・デ
ータの中には、ログ・データ取得の時刻が含ま
れているので有効か、或は無効かは前後のブロ
ツクの比較により容易に知ることが出来る。
, Diagnose whether the READ impossible state has occurred due to a power supply abnormality. This diagnosis is
The block next to the invalid block is read, and if it can be read, it is further checked whether the read data is invalid data. HLF10 block
The log data written to K o-1 , K o , K o+1 ... includes the time of log data acquisition, so whether it is valid or invalid depends on the previous and subsequent blocks. This can be easily determined by comparing.

、 HLF10上のREAD不可ブロツクKo
含まれるべきログ・データをTLF9上の全ト
ラツクTを読んで捜し出す。
, reads all tracks T on TLF9 and searches for the log data to be included in the non-READable block K o on HLF10.

、 TLF9から捜し出されたログ・データ
はHLFのブロツク・データ形式に変更され、
HLF10のREAD不可ブロツクKoに書出され
ると共に、データ・ベース復旧のためのデータ
として使用される。
, the log data retrieved from TLF9 is changed to HLF block data format,
It is written to the non-readable block Ko of HLF 10 and is used as data for database recovery.

〔発明の効果〕〔Effect of the invention〕

以上の説明から明らかなように、本発明によれ
ば、TLFとHLFによつてログ・データが取得さ
れるデータ・ベース・システムにおいて、HLF
書込み中に電源断などが生じてシステム・ダウン
した場合においても、データ・ベース・システム
の状態を異常事態発生前の状態に復旧でき、リカ
バリ不能という最悪の事態を回避することが出来
る。
As is clear from the above description, according to the present invention, in a database system in which log data is acquired by TLF and HLF, HLF
Even if the system goes down due to a power outage or the like during writing, the state of the database system can be restored to the state before the occurrence of the abnormality, and the worst case of being unable to recover can be avoided.

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

第1図は本発明が適用されるデータ・ベース・
システムにおけるログ取得処理を説明する図、第
2図は本発明の1実施例を説明する図である。 1…データ・ベース、2―Aないし2―C…応
用プログラム、3…ログ・データ取得処理部、4
…ログ・データ収集制御機構、5…HLFバツフ
ア、6…ログ・データ書出し制御機構、7…
TLF書出し制御部、8…HLF書出し制御部、9
…一時ログ・フアイル(以下TLFという)、10
…履歴ログ・フアイル(以下、HLFという)、T
…トラツク、Ko-1,Ko,Ko+1、…HLFのブロツ
ク、ないし…更新後ログ・データ、11…ト
ランザクシヨン・リカバリ処理部、12…HLF
読込み制御部、13…ログ・データ組立て処理
部、14…データ・ベース更新処理部、15…
READ不可ブロツク復元処理部、16…電源異
常によるREAD不可状態診断処理部、17…
TLF読込み処理部。
Figure 1 shows a database to which the present invention is applied.
FIG. 2 is a diagram illustrating log acquisition processing in the system, and is a diagram illustrating one embodiment of the present invention. 1...Data base, 2-A or 2-C...Application program, 3...Log data acquisition processing unit, 4
...Log/data collection control mechanism, 5...HLF buffer, 6...Log/data writing control mechanism, 7...
TLF writing control unit, 8...HLF writing control unit, 9
...Temporary log file (hereinafter referred to as TLF), 10
...History log file (hereinafter referred to as HLF), T
...Truck, K o-1 , K o , K o+1 , ...HLF block, or...post-update log data, 11...Transaction recovery processing unit, 12...HLF
Read control unit, 13... Log data assembly processing unit, 14... Database update processing unit, 15...
READ-disabled block restoration processing unit, 16...READ-disabled state diagnosis processing unit due to power supply abnormality, 17...
TLF reading processing section.

Claims (1)

【特許請求の範囲】 1 データ・ベース1と、 一時ログ・フアイル9と、 複数のブロツクを持つ履歴ログ・フアイル10
と、 履歴ログ・フアイル用バツフア5を持つログ・
データ取得処理部3と、 リカバリ処理部11と を具備し、 上記ログ・データ取得処理部3が、上記デー
タ・ベースを使用する応用プログラムによつて作
られた更新後データを履歴ログ・フアイル用バツ
フア5を経由して一時ログ・フアイル9に書き込
むと共に、他の更新後データを一時ログ・フアイ
ル9に書き込む際に履歴ログ・フアイル用バツフ
ア5に当該他の更新後データを格納するスペース
が存在しない場合には履歴ログ・フアイル用バツ
フア5の内容を履歴ログ・フアイル10のカレン
ト・ブロツクに書き込むように構成され、 リカバリ処理部11が、一時ログ・フアイル9
および履歴ログ・フアイル10に格納されている
更新後データを使用してシステムをダウン直前の
状態に復旧するための処理を行うように構成され
ている データ・ベース・システムにおけるリカバリ方式
であつて、 リカバリ処理を行う際、リカバリ処理部11
は、履歴ログ・フアイル10のブロツクを順次読
込み、読込み不可でない場合には読込んだデータ
を用いてデータ・ベース1を更新し、 読込み不可である場合には、当該読込み不可ブ
ロツクが最新ブロツクか否かを調べ、当該読込み
不可ブロツクが最新ブロツクである場合には当該
読込み不可ブロツクに対応するデータを一時ロ
グ・フアイル9から捜し出し、当該捜し出したデ
ータを用いて読込み不可ブロツクを修復すると共
にデータ・ベース1を更新するように構成されて
いる ことを特徴とするデータ・ベース・システムにお
けるリカバリ方式。
[Claims] 1. A database 1, a temporary log file 9, and a history log file 10 having a plurality of blocks.
and a log file with a buffer of 5 for the history log file.
The log data acquisition processing unit 3 includes a data acquisition processing unit 3 and a recovery processing unit 11, and the log data acquisition processing unit 3 stores updated data created by an application program that uses the database into a history log file. In addition to writing to the temporary log file 9 via the buffer 5, when writing other updated data to the temporary log file 9, there is space in the history log file buffer 5 to store the other updated data. If not, the contents of the history log file buffer 5 are written to the current block of the history log file 10, and the recovery processing unit 11 writes the contents of the history log file buffer 5 to the temporary log file 9.
A recovery method in a database system configured to perform processing for restoring the system to a state immediately before the system went down using the updated data stored in the history log file 10, When performing recovery processing, the recovery processing unit 11
reads the blocks in history log file 10 one after another, and if it is not readable, updates database 1 using the read data, and if it is not readable, checks whether the block that cannot be read is the latest block. If the unreadable block is the latest block, the data corresponding to the unreadable block is searched from the temporary log file 9, and the unreadable block is repaired using the found data. A recovery method in a database system, characterized in that it is configured to update a base 1.
JP57051593A 1982-03-30 1982-03-30 Recovery system in data base system Granted JPS58168165A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP57051593A JPS58168165A (en) 1982-03-30 1982-03-30 Recovery system in data base system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP57051593A JPS58168165A (en) 1982-03-30 1982-03-30 Recovery system in data base system

Publications (2)

Publication Number Publication Date
JPS58168165A JPS58168165A (en) 1983-10-04
JPH0210457B2 true JPH0210457B2 (en) 1990-03-08

Family

ID=12891205

Family Applications (1)

Application Number Title Priority Date Filing Date
JP57051593A Granted JPS58168165A (en) 1982-03-30 1982-03-30 Recovery system in data base system

Country Status (1)

Country Link
JP (1) JPS58168165A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8882561B2 (en) 2006-04-07 2014-11-11 Mattel, Inc. Multifunction removable memory device with ornamental housing

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110298935B (en) * 2019-06-28 2021-08-10 深圳市元征科技股份有限公司 Method for acquiring user operation habit information, diagnosis equipment and server

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS51118351A (en) * 1975-04-11 1976-10-18 Hitachi Ltd Operation history output systum in duplex system computer
JPS55138155A (en) * 1979-04-12 1980-10-28 Fujitsu Ltd File processing system
JPS55166745A (en) * 1979-06-14 1980-12-26 Fujitsu Ltd Maintenance information holding system by controller

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8882561B2 (en) 2006-04-07 2014-11-11 Mattel, Inc. Multifunction removable memory device with ornamental housing

Also Published As

Publication number Publication date
JPS58168165A (en) 1983-10-04

Similar Documents

Publication Publication Date Title
US6868506B2 (en) Data recovery method and apparatus
US7991749B2 (en) Database recovery method applying update journal and database log
EP0232769B1 (en) Maintaining availability of a restartable data base system
US7266574B1 (en) Identification of updated files for incremental backup
US7310743B1 (en) Data recovery method and apparatus
US5421003A (en) Disk storage system with fault tolerant media maintenance
JPS5913783B2 (en) Duplicate file method
CN115599756A (en) Database data writing method, storage medium and equipment
JPH06149485A (en) Data completion guarantee processing method
CN116483284A (en) Method, device, medium and electronic equipment for reading and writing virtual hard disk
JPS58168165A (en) Recovery system in data base system
JPH08314784A (en) File management device
JPH0259837A (en) Data recovery processing system
JP2744247B2 (en) Data integrity processing method
KR100204576B1 (en) Structure of Common Block Register Embedded Memory and Its Shadow Page Recovery Structure
JPH04307643A (en) Highly reliable file system
JPS6167153A (en) Partial trouble recovery processing system of direct access storage device
JPH04256006A (en) File restoring system
CN121785756A (en) Waste recycling methods, devices, electronic equipment and storage media
JP2806779B2 (en) Journal block recovery method and journal block recovery method
JPH04309145A (en) Data file control system
JPS58200358A (en) File reprocessing and recovering method on disk base
CN118012669A (en) File metadata recovery system and method for distributed file system
JP2806342B2 (en) Database failure recovery method and device
JPS6389944A (en) Managing system for file updating history