JP6289883B2 - Storage device - Google Patents

Storage device Download PDF

Info

Publication number
JP6289883B2
JP6289883B2 JP2013244857A JP2013244857A JP6289883B2 JP 6289883 B2 JP6289883 B2 JP 6289883B2 JP 2013244857 A JP2013244857 A JP 2013244857A JP 2013244857 A JP2013244857 A JP 2013244857A JP 6289883 B2 JP6289883 B2 JP 6289883B2
Authority
JP
Japan
Prior art keywords
database
conversion table
logical
transaction
processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2013244857A
Other languages
Japanese (ja)
Other versions
JP2015103147A (en
Inventor
高橋 健治
健治 高橋
基孝 金松
基孝 金松
長谷川 哲夫
哲夫 長谷川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2013244857A priority Critical patent/JP6289883B2/en
Publication of JP2015103147A publication Critical patent/JP2015103147A/en
Application granted granted Critical
Publication of JP6289883B2 publication Critical patent/JP6289883B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本明細書に記載の実施の形態は、ストレージ装置に関する。   Embodiments described herein relate to a storage apparatus.

近年、SSD(Solid State Drive)と呼ばれるフラッシュメモリ、特にNAND型フラッシュメモリを用いた記憶媒体を、データベースのストレージとして使う製品が増えている。従来はファイルシステム上にデータベースを保存していたが、今後は、ファイルシステムなしのデータベースが増加すると思われる。このようなファイルシステムなしのデータベースにおいては、トランザクション処理速度がデータベースの性能を左右する。そのため、コミット(反映)とロールバック(キャンセル)を速やかに実行する技術が求められている。
NAND型フラッシュメモリを用いた記憶媒体をデータベースのストレージとして使う従来のストレージ装置について説明する。
In recent years, an increasing number of products use a storage medium using a flash memory called SSD (Solid State Drive), in particular a NAND flash memory, as database storage. Previously, databases were stored on file systems, but in the future, databases without file systems are expected to increase. In such a database without a file system, the transaction processing speed affects the performance of the database. For this reason, there is a need for a technique for promptly executing commit (reflection) and rollback (cancellation).
A conventional storage apparatus using a storage medium using NAND flash memory as database storage will be described.

図15は、NAND型フラッシュメモリを用いた記憶媒体をデータベースのストレージとして使う、従来のストレージ装置の構成例を示す機能ブロック図である。   FIG. 15 is a functional block diagram showing a configuration example of a conventional storage apparatus that uses a storage medium using a NAND flash memory as a database storage.

従来のストレージ装置1Aは、入出力装置10と、入出力装置10に接続されたデータ管理部60と、データ管理部60に接続された演算装置50と、データ管理部60に接続された不揮発性メモリ40と、データ管理部60に接続された揮発性メモリ30Aとを有している。
揮発性メモリ30Aは、キャッシュメモリ31と、消去済ページリスト32と、ブロック状態テーブル33と、論物変換テーブル34とを有している。
The conventional storage apparatus 1A includes an input / output device 10, a data management unit 60 connected to the input / output device 10, a computing device 50 connected to the data management unit 60, and a non-volatile connected to the data management unit 60. The memory 40 and the volatile memory 30 </ b> A connected to the data management unit 60 are included.
The volatile memory 30 </ b> A includes a cache memory 31, an erased page list 32, a block state table 33, and a logical / physical conversion table 34.

入出力装置10は、ストレージ装置1Aと、ストレージ装置1Aと接続されたコンピュータなどの装置とのインターフェイスであって、例えばシリアルATA(SATA)などである。   The input / output device 10 is an interface between the storage device 1A and a device such as a computer connected to the storage device 1A, and is, for example, a serial ATA (SATA).

データ管理部60は、不揮発性メモリ40のブロックやページ状態を管理し、読み書きを制御する機能を有する。データ管理部60は、例えばNANDメモリコントローラチップを用いて実現される。データ管理部60は、全ページが無効のブロックを選択・消去し、消去済ページリスト32に追加し、データを書きこむ際は、消去済ページリスト32からページを取得する。   The data management unit 60 has a function of managing blocks and page states of the nonvolatile memory 40 and controlling reading and writing. The data management unit 60 is realized using, for example, a NAND memory controller chip. The data management unit 60 selects and erases blocks in which all pages are invalid, adds them to the erased page list 32, and acquires pages from the erased page list 32 when writing data.

演算装置50は 、データ管理部60からの要求に従って演算を行い、演算結果を出力する機能を有する 。演算装置50では、データの格納先を取得したり、データの有効・無効などの状態を判断する処理を行う。
不揮発性メモリ40は、電源を供給しなくても記憶を保持するメモリであって、例えばNANDメモリチップである。
The arithmetic device 50 has a function of performing an operation according to a request from the data management unit 60 and outputting an operation result. The arithmetic device 50 performs processing for obtaining a data storage destination and determining the status of data validity / invalidity.
The nonvolatile memory 40 is a memory that retains memory without supplying power, and is, for example, a NAND memory chip.

揮発性メモリ30Aは、電源を供給しないと記憶している情報を保持できないメモリであって、例えばDRAMなどである。揮発性メモリ30Aは、キャッシュメモリ31と、消去済ページリスト32と、ブロック状態テーブル33と、論物変換テーブル34とを有している。
キャッシュメモリ31は、データを一時的に保存するための記憶領域である。
The volatile memory 30A is a memory that cannot hold stored information unless power is supplied, and is, for example, a DRAM. The volatile memory 30 </ b> A includes a cache memory 31, an erased page list 32, a block state table 33, and a logical / physical conversion table 34.
The cache memory 31 is a storage area for temporarily storing data.

消去済ページリスト32は、不揮発性メモリ40における書き込み可能なページのリスト(データ)を保存するための記憶領域である。データ管理部60は、不揮発性メモリ40にデータを書きこむ際は、この消去済ページリスト32から書き込み先ページを取得する。   The erased page list 32 is a storage area for storing a list (data) of writable pages in the nonvolatile memory 40. When the data management unit 60 writes data into the nonvolatile memory 40, the data management unit 60 acquires a write destination page from the erased page list 32.

ブロック状態テーブル33は、不揮発性メモリ40における各ブロックのページの状態を管理するデータを保存するための記憶領域である。ブロック状態テーブル33は、各ブロックについて「有効」「無効」「消去済」などの状態を持つ。   The block state table 33 is a storage area for storing data for managing the page state of each block in the nonvolatile memory 40. The block state table 33 has states such as “valid”, “invalid”, and “erased” for each block.

論物変換テーブル34は、不揮発性メモリ40における各ページの論理アドレスと物理アドレスの対応関係を保持するデータを保存するための記憶領域である。図16は、論物変換テーブル34の例を示す図である。図16に示す論物変換テーブル34は、論理アドレス「0」、論理アドレス「1」、論理アドレス「2」、論理アドレス「3」に対応するレコードを有している。論理アドレス「0」に対応するレコードは、対応する物理アドレスとしてブロック「1」のページ「3」を記憶している。論理アドレス「1」に対応するレコードは、対応する物理アドレスとしてブロック「4」のページ「0」を記憶している。論理アドレス「2」に対応するレコードは、対応する物理アドレスとしてブロック「1」のページ「2」を記憶している。論理アドレス「3」に対応するレコードは、対応する物理アドレスとしてブロック「2」のページ「1」を記憶している。   The logical-physical conversion table 34 is a storage area for storing data that holds the correspondence between the logical address and physical address of each page in the nonvolatile memory 40. FIG. 16 is a diagram illustrating an example of the logical / physical conversion table 34. The logical-physical conversion table 34 illustrated in FIG. 16 includes records corresponding to the logical address “0”, the logical address “1”, the logical address “2”, and the logical address “3”. The record corresponding to the logical address “0” stores the page “3” of the block “1” as the corresponding physical address. The record corresponding to the logical address “1” stores the page “0” of the block “4” as the corresponding physical address. The record corresponding to the logical address “2” stores the page “2” of the block “1” as the corresponding physical address. The record corresponding to the logical address “3” stores the page “1” of the block “2” as the corresponding physical address.

論物変換テーブル34の内容の通り、論理アドレス「0」に対応するデータは、不揮発性メモリ40のブロック「1」のページ「3」に書き込まれている。論理アドレス「1」に対応するデータは、不揮発性メモリ40のブロック「4」のページ「0」に書き込まれている。論理アドレス「2」に対応するデータは、不揮発性メモリ40のブロック「1」のページ「2」に書き込まれている。論理アドレス「4」に対応するデータは、不揮発性メモリ40のブロック「2」のページ「1」に書き込まれている。
なお、データが更新される時は、データ管理部60は、常に別の物理アドレスに更新データを書き込む。
As shown in the contents of the logical-physical conversion table 34, the data corresponding to the logical address “0” is written in the page “3” of the block “1” of the nonvolatile memory 40. Data corresponding to the logical address “1” is written in the page “0” of the block “4” of the nonvolatile memory 40. Data corresponding to the logical address “2” is written in the page “2” of the block “1” of the nonvolatile memory 40. Data corresponding to the logical address “4” is written in the page “1” of the block “2” of the nonvolatile memory 40.
When the data is updated, the data management unit 60 always writes the update data to another physical address.

[従来のストレージ装置の書込み処理(書込み動作)]
次に、従来のストレージ装置1Aの書込み処理(書込み動作)を説明する。図17は、従来のストレージ装置1Aの書込み処理の例を示すフローチャートである。
[Conventional storage device write processing (write operation)]
Next, write processing (write operation) of the conventional storage apparatus 1A will be described. FIG. 17 is a flowchart showing an example of write processing of the conventional storage apparatus 1A.

従来のストレージ装置1A、より詳しくはデータ管理部60は、コンピュータなどの装置から入出力装置10を介して、ある論理アドレスへの書き込み要求を取得する(S1710 )。
データ管理部60は、この書き込み要求に対応するデータ(更新データなど)を、揮発性メモリ30Aのキャッシュメモリ31上に書き込む(S1720)。
次に、データ管理部60は、揮発性メモリ30Aの消去済ページリスト32の先頭から書き込み先物理ページを取得する(S1730)。
The conventional storage apparatus 1A, more specifically, the data management unit 60 acquires a write request to a certain logical address from an apparatus such as a computer via the input / output device 10 (S1710).
The data management unit 60 writes data (update data or the like) corresponding to this write request on the cache memory 31 of the volatile memory 30A (S1720).
Next, the data management unit 60 acquires a write destination physical page from the top of the erased page list 32 of the volatile memory 30A (S1730).

次に、データ管理部60は、不揮発性メモリ40における、上記ステップS1730で取得した物理ページに、ステップS1720でキャッシュメモリ31に書き込んだデータを書き込む(S1740)。   Next, the data management unit 60 writes the data written in the cache memory 31 in step S1720 to the physical page acquired in step S1730 in the nonvolatile memory 40 (S1740).

次に、データ管理部60は、論物変換テーブル34の上記論理アドレスに対応するレコードの内容を、ステップS1740においてデータを書き込んだ物理ページに対応するブロック番号及びページ番号に書き換える(S1750)。   Next, the data management unit 60 rewrites the contents of the record corresponding to the logical address in the logical-physical conversion table 34 to the block number and page number corresponding to the physical page in which the data was written in step S1740 (S1750).

次に、データ管理部60は、論物変換テーブル34の、以前登録されていた物理アドレスに対応する、ブロック状態テーブル33の当該ページの状態を「有効」から「無効」に変更する(以前登録されていた物理アドレスが有効な値の場合)(S1760)。   Next, the data management unit 60 changes the state of the page of the block state table 33 corresponding to the previously registered physical address in the logical-physical conversion table 34 from “valid” to “invalid” (previously registered). (If the physical address used is a valid value) (S1760).

次に、データ管理部60は、ブロック状態テーブル33の、ステップS1740において書き込んだ該当ページの状態を「消去済」から「有効」に変更する(S1770)。
以上で、従来のストレージ装置1Aは、書込み処理を終了する。
Next, the data management unit 60 changes the state of the corresponding page written in step S1740 in the block state table 33 from “erased” to “valid” (S1770).
Thus, the conventional storage apparatus 1A ends the write process.

[従来のストレージ装置の消去処理(消去動作 )]
次に、従来のストレージ装置1Aの消去処理(消去動作)を説明する。図18は、従来のストレージ装置1Aの消去処理の例を示すフローチャートである。
[Conventional storage device erase processing (erase operation)]
Next, an erasing process (erasing operation) of the conventional storage apparatus 1A will be described. FIG. 18 is a flowchart showing an example of the erasing process of the conventional storage apparatus 1A.

従来のストレージ装置1A、より詳しくはデータ管理部60は、揮発性メモリ30Aの消去済ページリスト32に書き込まれている登録済ページの数が一定以下か否かを判定する(S1810)。消去済ページリスト32に書き込まれている登録済ページの数が一定以下ではないと判定した場合(S1810, No)、ストレージ装置1、より詳しくはデータ管理部60は消去処理を終了する。   The conventional storage apparatus 1A, more specifically, the data management unit 60, determines whether or not the number of registered pages written in the erased page list 32 of the volatile memory 30A is equal to or less than a certain value (S1810). When it is determined that the number of registered pages written in the erased page list 32 is not below a certain level (S1810, No), the storage device 1, more specifically, the data management unit 60 ends the erase process.

一方、ステップS1810において、登録済ページの数が一定以下であると判定した場合(S1810, Yes)、従来のストレージ装置1A、より詳しくはデータ管理部60は、揮発性メモリ30のブロック状態テーブル33から、全ページが「無効」となっているブロックを選択する(S1820)。   On the other hand, if it is determined in step S1810 that the number of registered pages is less than or equal to a certain number (S1810, Yes), the conventional storage apparatus 1A, more specifically, the data management unit 60, stores the block state table 33 of the volatile memory 30. Then, a block in which all pages are “invalid” is selected (S1820).

次に、従来のストレージ装置1A、より詳しくはデータ管理部60は、ステップS1820で選択した、不揮発性メモリ40のブロックに書き込まれているデータを消去する(S1830)。   Next, the conventional storage apparatus 1A, more specifically, the data management unit 60 erases the data written in the block of the nonvolatile memory 40 selected in step S1820 (S1830).

次に、従来のストレージ装置1A、より詳しくはデータ管理部60は、ステップS1820で選択したブロックの全ページについて、揮発性メモリ30のブロック状態テーブル33に記録されている状態を「消去済」に変更する(S1840)。   Next, the conventional storage device 1A, more specifically, the data management unit 60 sets the state recorded in the block state table 33 of the volatile memory 30 to “erased” for all pages of the block selected in step S1820. Change (S1840).

次に、ストレージ装置1、より詳しくはデータ管理部60は、揮発性メモリ30Aの消去済ページリスト32に、ステップS1830で消去したページを追加する(S1850)。
以上で従来のストレージ装置1Aは消去処理(消去動作)を終了する。
[従来のストレージ装置のトランザクション・コミット処理]
Next, the storage device 1, more specifically, the data management unit 60 adds the page erased in step S1830 to the erased page list 32 of the volatile memory 30A (S1850).
Thus, the conventional storage device 1A ends the erasing process (erasing operation).
[Conventional storage device transaction commit processing]

従来のストレージ装置1Aのトランザクション・コミット処理を説明する。図19は、従来のストレージ装置1Aのトランザクション・コミット処理の例を示すフロー図である。   A transaction commit process of the conventional storage apparatus 1A will be described. FIG. 19 is a flowchart showing an example of transaction / commit processing of the conventional storage apparatus 1A.

まず、従来のストレージ装置1Aに接続されたコンピュータ(図略)にBEGIN文が入力される(S3010)。これによりトランザクションが開始する。BEGIN文の入力に対して、データベース内部の動作は特に行われない(S3110)。   First, a BEGIN sentence is input to a computer (not shown) connected to the conventional storage apparatus 1A (S3010). This starts a transaction. In response to the input of the BEGIN statement, the internal operation of the database is not performed (S3110).

次に、ステップS3010に続いて、データベースへの処理命令文(INSERT, UPDATEなど)がストレージ装置1Aに接続されたコンピュータ(図略)に入力される(S3020)。これらの処理命令文に応じて、データベース内部の動作として、データ管理部60は、キャッシュメモリ31上で、上記処理命令文に応じてデータベースを更新する(S3120)。   Next, following step S3010, a processing command statement (INSERT, UPDATE, etc.) to the database is input to a computer (not shown) connected to the storage apparatus 1A (S3020). In accordance with these processing instructions, the data management unit 60 updates the database according to the processing instructions on the cache memory 31 as an internal operation of the database (S3120).

次にストレージ装置1Aに接続されたコンピュータ(図略)にCOMMIT文が入力される(S3030)。COMMIT文の入力に応じて、データベース内部の動作として、データ管理部60は、キャッシュメモリ31上のデータベースを不揮発性メモリ40に書き込む(S3130)。
以上で、従来のストレージ装置1Aのトランザクション・コミット処理は終了する。
Next, a COMMIT sentence is input to a computer (not shown) connected to the storage apparatus 1A (S3030). In response to the input of the COMMIT statement, as an internal operation of the database, the data management unit 60 writes the database on the cache memory 31 to the nonvolatile memory 40 (S3130).
Thus, the transaction / commit processing of the conventional storage apparatus 1A is completed.

[従来のストレージ装置のトランザクション・ロールバック処理]
従来のストレージ装置1Aのトランザクション・ロールバック処理を説明する。図20は、従来のストレージ装置1Aのトランザクション・ロールバック処理の例を示すフロー図である。
[Conventional storage device transaction rollback processing]
A transaction / rollback process of the conventional storage apparatus 1A will be described. FIG. 20 is a flowchart showing an example of transaction / rollback processing of the conventional storage apparatus 1A.

まず、従来のストレージ装置1Aに接続されたコンピュータ(図略)にBEGIN文が入力される(S4010)。これによりトランザクションが開始する。BEGIN文の入力に対して、データベース内部の動作は特に行われない(S4110)。   First, a BEGIN sentence is input to a computer (not shown) connected to the conventional storage apparatus 1A (S4010). This starts a transaction. In response to the input of the BEGIN statement, no internal operation is performed in the database (S4110).

次に、ステップS4010に続いて、データベースへの処理命令文(INSERT, UPDATEなど)が従来のストレージ装置1Aに接続されたコンピュータ(図略)に入力される(S4020)。これらの処理命令文に応じて、データベース内部の動作として、データ管理部60は、キャッシュメモリ31上で、上記処理命令文に応じてデータベースを更新する(S4120)。   Next, following step S4010, a processing command statement (INSERT, UPDATE, etc.) to the database is input to a computer (not shown) connected to the conventional storage apparatus 1A (S4020). In response to these processing instructions, the data management unit 60 updates the database on the cache memory 31 according to the processing instructions as an operation inside the database (S4120).

次に従来のストレージ装置1Aに接続されたコンピュータ(図略)に、ROLLBACK文が入力される(S4030)。ROLLBACK文に応じて、データベース内部の動作として、データ管理部60は、キャッシュメモリ31上のデータベースを破棄する(S4130)。
以上で、従来のストレージ装置1Aのトランザクション・ロールバック処理は終了する。
Next, a ROLLBACK statement is input to a computer (not shown) connected to the conventional storage apparatus 1A (S4030). In response to the ROLLBACK statement, as an internal operation of the database, the data management unit 60 discards the database on the cache memory 31 (S4130).
Thus, the transaction / rollback process of the conventional storage apparatus 1A is completed.

特開2006−209316号公報JP 2006-209316 A

NAND型フラッシュメモリを用いた記憶媒体をデータベースのストレージとして使う場合、トランザクション時にコミット操作をしてからデータをNAND型フラッシュメモリに書き込むと時間がかかるという問題がある。
本発明の目的は、トランザクション処理を、コミット(COMMIT)およびロールバック(ROLLBACK)共、高速に実行する技術を提供することにある。
When a storage medium using NAND flash memory is used as database storage, there is a problem that it takes time to write data to the NAND flash memory after performing a commit operation during a transaction.
An object of the present invention is to provide a technique for executing transaction processing at high speed for both COMMIT and ROLLBACK.

本発明の実施の形態はストレージ装置として提案される。ストレージ装置は、不揮発性メモリと、キャッシュメモリと、第1の変換テーブルと、第2の変換テーブルと、第1の処理手段と、第2の処理手段とを有する。   The embodiment of the present invention is proposed as a storage apparatus. The storage apparatus includes a nonvolatile memory, a cache memory, a first conversion table, a second conversion table, a first processing unit, and a second processing unit.

不揮発性メモリは、データベースを記憶する。キャッシュメモリは、データベースを一時的に記憶する。第1の変換テーブル は、データの論理アドレスと、これに対応する不揮発性メモリの物理アドレスを対応付けて記憶する。第2の変換テーブルは、データの論理アドレスと、これに対応する不揮発性メモリの物理アドレスを対応付けて記憶する。第1の処理手段は、データベースを操作する命令であるコマンド文を受け取り、このコマンド文を解釈してデータベースの変更内容を決定し、このデータベースの変更内容に基づいて、キャッシュメモリ上のデータベースの内容を変更し、キャッシュメモリ上のデータベースの変更された内容に対応する論理アドレスと、この変更された内容のデータを記憶させることが可能な不揮発性メモリ上の物理アドレスとを対応付けて、第2の変換テーブルに書き込み、トランザクション処理の結果をデータベースに反映させること意味する命令を受け取ると、第2の変換テーブル内容を第1の変換テーブルに反映させる。第2の処理手段は、キャッシュメモリ上のデータベースの変更された内容を、不揮発性メモリへバックグラウンドで書き込む。   The non-volatile memory stores a database. The cache memory temporarily stores the database. The first conversion table stores the logical address of data and the corresponding physical address of the nonvolatile memory in association with each other. The second conversion table stores the logical address of the data and the corresponding physical address of the non-volatile memory in association with each other. The first processing means receives a command statement that is an instruction for operating the database, interprets the command statement, determines a database change content, and based on the database change content, the database content on the cache memory And the logical address corresponding to the changed contents of the database on the cache memory is associated with the physical address on the nonvolatile memory capable of storing the data of the changed contents, and the second Is received, and the second conversion table content is reflected in the first conversion table when an instruction indicating that the result of transaction processing is reflected in the database is received. The second processing means writes the changed contents of the database on the cache memory to the nonvolatile memory in the background.

本実施の形態に係るストレージ装置の構成例を示す機能ブロック図Functional block diagram showing a configuration example of the storage apparatus according to the present embodiment ストレージ装置のトランザクション・コミット処理の例を示すフロー図Flow chart showing an example of transaction commit processing of the storage device ストレージ装置のトランザクション・ロールバック処理の例を示すフロー図Flow chart showing an example of transaction rollback processing of a storage device ストレージ装置のトランザクション処理の例を示すフローチャートA flowchart showing an example of transaction processing of the storage apparatus BEGIN文処理の例を示すフローチャートFlow chart showing an example of BEGIN statement processing コマンド文処理の例を示したフローチャートFlow chart showing an example of command statement processing COMMIT処理の一例を示すフローチャートFlow chart showing an example of COMMIT processing ROLLBACK処理の一例を示すフローチャートFlow chart showing an example of ROLLBACK processing トランザクション処理前のトランザクション用論物変換テーブル、論物変換テーブル、不揮発性メモリの記憶内容例を示すExample of stored contents of transaction logical / physical conversion table, logical / physical conversion table, and nonvolatile memory before transaction processing 図9に続く時点の状態のトランザクション用論物変換テーブル、論物変換テーブル、不揮発性メモリの記憶内容例を示す図The figure which shows the example of the memory content of the transaction logical-physical conversion table of the state at the time of following FIG. 9, a logical-physical conversion table, and a non-volatile memory 図10に続く時点の状態のトランザクション用論物変換テーブル、論物変換テーブル、不揮発性メモリの記憶内容例を示す図The figure which shows the example of the memory content of the transaction logical-physical conversion table of the state at the time following FIG. 10, a logical-physical conversion table, and a non-volatile memory 図11に続く時点の状態のトランザクション用論物変換テーブル、論物変換テーブル、不揮発性メモリの記憶内容例を示す図FIG. 11 is a diagram showing an example of storage contents of a transaction logical-physical conversion table, a logical-physical conversion table, and a nonvolatile memory in a state at a time point subsequent to FIG. 図11に続く時点の状態のトランザクション用論物変換テーブル、論物変換テーブル、不揮発性メモリの記憶内容例を示す別の図FIG. 11 is another diagram showing an example of stored contents of a transaction-logical / physical conversion table, a logical / physical conversion table, and a non-volatile memory in a state at the time point following FIG. (A)は従来手法によるトランザクション処理のシーケンス図、(B)は本実施の形態にかかるストレージ装置によるトランザクション処理のシーケンス図(A) is a sequence diagram of transaction processing by a conventional method, and (B) is a sequence diagram of transaction processing by the storage apparatus according to the present embodiment. 従来のストレージ装置の構成例を示す機能ブロック図Functional block diagram showing a configuration example of a conventional storage device 論物変換テーブルの例を示す図Diagram showing an example of a logical-physical conversion table 従来のストレージ装置の書込み処理の例を示すフローチャートA flowchart showing an example of write processing of a conventional storage apparatus 従来のストレージ装置の消去処理の例を示すフローチャートA flowchart showing an example of a conventional storage apparatus erasing process 従来のストレージ装置のトランザクション・コミット処理の例を示すフロー図Flow chart showing an example of transaction commit processing of a conventional storage device 従来のストレージ装置のトランザクション・ロールバック処理の例を示すフロー図Flow chart showing an example of transaction rollback processing in a conventional storage device

以下、図面を参照して本発明の実施の形態に係るストレージ装置を説明する。
[0.用語の定義]
本明細書中で使用する用語の定義を述べる。
Hereinafter, a storage apparatus according to an embodiment of the present invention will be described with reference to the drawings.
[0. Definition of terms]
Definitions of terms used in this specification will be described.

[0.1.論物変換テーブル]
「論物変換テーブル」とは、論理アドレスをNAND型フラッシュメモリの物理アドレスに変換するためのテーブルをいう。
[0.1. Logical-physical conversion table]
The “logical / physical conversion table” is a table for converting a logical address into a physical address of a NAND flash memory.

[0.2.トランザクション]
「トランザクション」とは、データベースにおいて、一連の処理を一つの作業としてまとめて行う処理をいう。
[0.2. transaction]
A “transaction” refers to a process in which a series of processes are collectively performed as one work in a database.

[0.3.コミット]
「コミット」とは、トランザクション処理の結果をデータベースに反映する処理をいう。
[0.3. commit]
“Commit” refers to a process of reflecting the result of a transaction process in a database.

[0.4.ロールバック]
「ロールバック」とは、トランザクション処理の結果を取り消す処理をいう。
[0.4. roll back]
“Rollback” refers to a process of canceling the result of a transaction process.

[1.本発明の実施の形態]
本発明の実施の形態は、ストレージ装置として提案される。このストレージ装置は、論物変換テーブルを利用してトランザクション処理のコミットやロールバックを実現することで、処理時間を短縮する装置である。
[1. Embodiment of the Invention]
The embodiment of the present invention is proposed as a storage apparatus. This storage device is a device that shortens processing time by realizing transaction processing commit and rollback using a logical-physical conversion table.

ストレージ装置は、情報処理装置であって、この情報処理装置は、演算処理装置(CPU)、主メモリ(RAM)、読み出し専用メモリ(ROM)、入出力装置(I/O)、及び必要な場合にはハードディスク装置等の外部記憶装置を具備している装置である。   The storage device is an information processing device, and this information processing device includes an arithmetic processing unit (CPU), a main memory (RAM), a read-only memory (ROM), an input / output device (I / O), and when necessary Is a device having an external storage device such as a hard disk device.

[1.1.構成例]
本発明の実施の形態にかかるストレージ装置の構成について説明する。図1は、本実施の形態に係るストレージ装置の構成例を示す機能ブロック図である。なお、機能ブロック図中に示す構成要素は、ストレージ装置の機能を機能ごとにまとめてブロックとして捉えたものであり、ストレージ装置が各構成要素に対応する基板、装置、回路、部品などの物理的構成要素を備えていなければならないことを意味するわけではない。また、「接続されている」とは、データ、情報、命令などの送受信、受け取り、受け渡しなどが可能な状態になっていることをいい、互いに配線で連結されているような物理的な接続に限られる意味ではない。本明細書中の他の構成要素の機能ブロック図の説明についても同様である。
[1.1. Configuration example]
A configuration of the storage apparatus according to the embodiment of the present invention will be described. FIG. 1 is a functional block diagram showing a configuration example of the storage apparatus according to the present embodiment. Note that the components shown in the functional block diagram are the functions of the storage device that are grouped by function and regarded as a block. The storage device is a physical component such as a board, device, circuit, or component that corresponds to each component. It does not mean that it must have components. “Connected” means that data, information, instructions, etc. can be sent, received, delivered, etc. It is not limited. The same applies to the description of the functional block diagrams of the other components in this specification.

ストレージ装置1は、入出力装置10と、入出力装置10に接続されたデータベース処理部20と、データベース処理部20に接続された演算装置50と、演算装置50に接続されたデータ管理部60と、データベース処理部20及びデータ管理部60に接続された揮発性メモリ30と、データベース処理部20及びデータ管理部60に接続された不揮発性メモリ40とを有している。   The storage device 1 includes an input / output device 10, a database processing unit 20 connected to the input / output device 10, an arithmetic device 50 connected to the database processing unit 20, and a data management unit 60 connected to the arithmetic device 50. The volatile memory 30 is connected to the database processing unit 20 and the data management unit 60, and the non-volatile memory 40 is connected to the database processing unit 20 and the data management unit 60.

データベース処理部20は、入出力装置10に接続された入出力部21と、入出力部21に接続されたコマンド解釈・処理部22と、コマンド解釈・処理部22に接続された保存・読み出し処理23とを有している。保存・読み出し処理23は不揮発性メモリ40に接続されており、不揮発性メモリ40へのデータ書き込み、不揮発性メモリ40からのデータ読み出しが可能である。   The database processing unit 20 includes an input / output unit 21 connected to the input / output device 10, a command interpretation / processing unit 22 connected to the input / output unit 21, and a save / read process connected to the command interpretation / processing unit 22. 23. The save / read processing 23 is connected to the nonvolatile memory 40, and data writing to the nonvolatile memory 40 and data reading from the nonvolatile memory 40 are possible.

揮発性メモリ30は、キャッシュメモリ31と、消去済ページリスト32と、ブロック状態テーブル33と、論物変換テーブル34と、トランザクション用論物変換テーブル35とを有している。   The volatile memory 30 includes a cache memory 31, an erased page list 32, a block state table 33, a logical / physical conversion table 34, and a transaction logical / physical conversion table 35.

データベース処理部20は 、外部からの命令に応じて、データベースの読出し、追加、変更を行う機能を有する。なお、不揮発性メモリ40へのデータの書き込みは、データ管理部60が行い、データベース処理部20は揮発性メモリ30上のキャッシュデータ等の書き換えを行う。   The database processing unit 20 has a function of reading, adding, and changing a database in accordance with an external command. The data management unit 60 writes data to the nonvolatile memory 40, and the database processing unit 20 rewrites cache data and the like on the volatile memory 30.

入出力部21は、入出力装置10からデータベース操作に関する命令文を受け取り、当該命令文の処理結果を入出力装置10へ出力する機能を有する。   The input / output unit 21 has a function of receiving a command statement related to database operation from the input / output device 10 and outputting the processing result of the command statement to the input / output device 10.

コマンド解釈・処理部22は入出力部21からデータベース操作に関する命令文を受け取り、この命令文を解釈して、データベースの変更内容を出力する機能を有する。   The command interpreting / processing unit 22 has a function of receiving a command statement related to database operation from the input / output unit 21, interpreting the command statement, and outputting a database change content.

保存・読み出し処理23は、データベースの変更内容を、揮発性メモリ30上のキャッシュメモリ31と、消去済ページリスト32と、ブロック状態テーブル33と、論物変換テーブル34と、トランザクション用論物変換テーブル35とに反映させる機能を有する。   The save / read processing 23 stores the contents of the database change in the cache memory 31 on the volatile memory 30, the erased page list 32, the block state table 33, the logical / physical conversion table 34, and the logical / physical conversion table for transactions. 35.

トランザクション用論物変換テーブル35は、一つのトランザクションの開始から終了までの間に生じた論理アドレスと物理アドレスの対応関係を記述したデータを保存する記憶領域である。   The transaction logical-physical conversion table 35 is a storage area for storing data describing the correspondence between logical addresses and physical addresses generated from the start to the end of one transaction.

ストレージ装置1のその他の構成要素は、図15に示した従来のストレージ装置1Aの構成要素と同様の機能を有する。同様の機能を有する構成要素には、同一の参照符号を付し、これらの機能の詳細な説明は省略する。なお、論物変換テーブル34は本実施の形態の第1の変換テーブルに相当し、トランザクション用論物変換テーブル35は本実施の形態の第2の変換テーブルに相当し、データベース処理部20は本実施の形態の第1の処理手段に相当し、データ管理部60は本実施の形態の第2の処理手段に相当する。   Other components of the storage apparatus 1 have the same functions as those of the conventional storage apparatus 1A shown in FIG. Components having similar functions are denoted by the same reference numerals, and detailed description of these functions is omitted. The logical-physical conversion table 34 corresponds to the first conversion table of the present embodiment, the transaction logical-physical conversion table 35 corresponds to the second conversion table of the present embodiment, and the database processing unit 20 The data management unit 60 corresponds to the second processing unit of the present embodiment, and corresponds to the first processing unit of the present embodiment.

[2.動作例]
次に、ストレージ装置1の動作を説明する。
[2.1.ストレージ装置のトランザクション・コミット処理]
ストレージ装置1のトランザクション・コミット処理を説明する。図2は、ストレージ装置1のトランザクション・コミット処理の例を示すフロー図である。
[2. Example of operation]
Next, the operation of the storage apparatus 1 will be described.
[2.1. Storage device transaction commit processing]
The transaction / commit processing of the storage apparatus 1 will be described. FIG. 2 is a flowchart showing an example of transaction / commit processing of the storage apparatus 1.

まず、ストレージ装置1に接続されたコンピュータ(図略)にBEGIN文が入力される(S1010)。これによりトランザクションが開始する。BEGIN文の入力に対して、データベース内部の動作は特に行われない(S1110)。   First, a BEGIN sentence is input to a computer (not shown) connected to the storage device 1 (S1010). This starts a transaction. In response to the input of the BEGIN statement, no internal operation is performed in the database (S1110).

次に、ステップS1010に続いて、データベースへのコマンド文(処理命令文;INSERT, UPDATEなど)がストレージ装置1に接続されたコンピュータ(図略)に入力される(S1020)。これらの処理命令文に応じて、データベース処理部20、より詳しくは入出力部21が入出力装置10を介してコンピュータ(図略)から処理命令文を受信する。コマンド解釈・処理部22は、入出力部21から処理命令文を受け取り、この処理命令文を解釈してデータベースの変更内容を決定する。保存・読み出し処理23は、データベースの変更内容に基づいて、キャッシュメモリ31上のデータベースを更新する(S1120)。なお、データ管理部60は、その後、バックグラウンドで、キャッシュメモリ31上のデータベースに基づいて、不揮発性メモリ40へデータベースの内容を書き込む。なお、不揮発性メモリ40へデータベースの内容を書き込む場合の物理アドレスは、消去済ページリスト32の先頭から書込み先物理アドレス(物理ページ)を取得する 。   Next, following step S1010, a command statement (processing command statement; INSERT, UPDATE, etc.) to the database is input to a computer (not shown) connected to the storage apparatus 1 (S1020). In response to these processing command statements, the database processing unit 20, more specifically, the input / output unit 21, receives processing command statements from a computer (not shown) via the input / output device 10. The command interpretation / processing unit 22 receives a processing command statement from the input / output unit 21 and interprets the processing command statement to determine the contents of database change. The saving / reading process 23 updates the database on the cache memory 31 based on the database change contents (S1120). The data management unit 60 then writes the contents of the database to the nonvolatile memory 40 based on the database on the cache memory 31 in the background. Note that the physical address for writing the contents of the database to the nonvolatile memory 40 is the write destination physical address (physical page) from the top of the erased page list 32.

また、データベース処理部20、より詳しくは保存・読み出し処理23は、キャッシュメモリ31、消去済ページリスト32、論物変換テーブル34を参照して、データベースの更新データに対応する論物変換情報をトランザクション用論物変換テーブル35に書き込む(S1120)。   Further, the database processing unit 20, more specifically, the storage / reading process 23 refers to the cache memory 31, the erased page list 32, and the logical / physical conversion table 34, and processes logical / physical conversion information corresponding to the update data of the database. Write to the logical-object conversion table 35 (S1120).

次にストレージ装置1に接続されたコンピュータ(図略)にCOMMIT文が入力される(S1030)。入力されたCOMMIT文は入出力装置10を介してデータベース処理部20、より詳しくは入出力部21に渡される。コマンド解釈・処理部22は、入出力部21からCOMMIT文を受け取り、このCOMMIT文に応じて保存・読み出し処理23にトランザクション用論物変換テーブル35の内容を論物変換テーブル34に反映させるよう命令を送る。この命令を受け取った保存・読み出し処理23はトランザクション用論物変換テーブル35の内容を論物変換テーブル34に反映させる(S1130)。
以上で、ストレージ装置1のトランザクション・コミット処理は終了する。
Next, a COMMIT sentence is input to a computer (not shown) connected to the storage apparatus 1 (S1030). The input COMMIT statement is passed to the database processing unit 20, more specifically, the input / output unit 21 through the input / output device 10. The command interpreting / processing unit 22 receives a COMMIT statement from the input / output unit 21 and instructs the save / read processing 23 to reflect the contents of the transaction logical-physical conversion table 35 in the logical-physical conversion table 34 according to the COMMIT statement. Send. The saving / reading process 23 that has received this command reflects the contents of the transaction logical-physical conversion table 35 in the logical-physical conversion table 34 (S1130).
Thus, the transaction commit processing of the storage apparatus 1 is completed.

[2.2.ストレージ装置のトランザクション・ロールバック処理]
ストレージ装置1のトランザクション・ロールバック処理を説明する。図3は、ストレージ装置1のトランザクション・ロールバック処理の例を示すフロー図である。
[2.2. Storage device transaction rollback processing]
A transaction rollback process of the storage apparatus 1 will be described. FIG. 3 is a flowchart showing an example of transaction / rollback processing of the storage apparatus 1.

まず、ストレージ装置1に接続されたコンピュータ(図略)にBEGIN文が入力される(S2010)。これによりトランザクションが開始する。BEGIN文の入力に対して、データベース内部の動作は特に行われない(S2110)。   First, a BEGIN sentence is input to a computer (not shown) connected to the storage device 1 (S2010). This starts a transaction. In response to the input of the BEGIN statement, no internal operation is performed in the database (S2110).

次に、ステップS2010に続いて、データベースへの処理命令文(INSERT, UPDATEなど)がストレージ装置1に接続されたコンピュータ(図略)に入力される(S2020)。これらの処理命令文に応じて、データベース処理部20、より詳しくは入出力部21が入出力装置10を介してコンピュータ(図略)から処理命令文を受信する。コマンド解釈・処理部22は、入出力部21から処理命令文を受け取り、この処理命令文を解釈してデータベースの変更内容を決定する。保存・読み出し処理23は、データベースの変更内容に基づいて、キャッシュメモリ31上のデータベースを更新する(S2120)。なお、データ管理部60は、その後、バックグラウンドで、キャッシュメモリ31上のデータベースに基づいて、不揮発性メモリ40へデータベースの内容を書き込む。   Next, following step S2010, a processing command statement (INSERT, UPDATE, etc.) to the database is input to a computer (not shown) connected to the storage device 1 (S2020). In response to these processing command statements, the database processing unit 20, more specifically, the input / output unit 21, receives processing command statements from a computer (not shown) via the input / output device 10. The command interpretation / processing unit 22 receives a processing command statement from the input / output unit 21 and interprets the processing command statement to determine the contents of database change. The saving / reading process 23 updates the database on the cache memory 31 based on the database change contents (S2120). The data management unit 60 then writes the contents of the database to the nonvolatile memory 40 based on the database on the cache memory 31 in the background.

また、データベース処理部20、より詳しくは保存・読み出し処理23は、キャッシュメモリ31、消去済ページリスト32、論物変換テーブル34を参照して、データベースの更新データに対応する論物変換情報をトランザクション用論物変換テーブル35に書き込む(S2120)。   Further, the database processing unit 20, more specifically, the storage / reading process 23 refers to the cache memory 31, the erased page list 32, and the logical / physical conversion table 34, and processes logical / physical conversion information corresponding to the update data of the database. It writes in the theory conversion table 35 (S2120).

次にストレージ装置1に接続されたコンピュータ(図略)にROLLBACK文が入力される(S2030)。入力されたROLLBACK文は入出力装置10を介してデータベース処理部20、より詳しくは入出力部21に渡される。コマンド解釈・処理部22は、入出力部21からROLLBACK文を受け取り、このROLLBACK文に応じて保存・読み出し処理23にトランザクション用論物変換テーブル35の内容を削除するよう命令を送る。の命令を受け取った保存・読み出し処理23はトランザクション用論物変換テーブル35の内容を削除する(S2130)。
以上で、ストレージ装置1のトランザクション・ロールバック処理は終了する。
Next, a ROLLBACK statement is input to a computer (not shown) connected to the storage device 1 (S2030). The input ROLLBACK statement is passed to the database processing unit 20, more specifically, to the input / output unit 21 via the input / output device 10. The command interpretation / processing unit 22 receives a ROLLBACK statement from the input / output unit 21 and sends an instruction to the save / read processing 23 to delete the contents of the transaction logical-physical conversion table 35 in response to the ROLLBACK statement. The save / read processing 23 that has received the command deletes the contents of the transaction logical-physical conversion table 35 (S2130).
This completes the transaction rollback process of the storage apparatus 1.

[2.3.トランザクション処理]
次に、ストレージ装置1のトランザクション処理について説明する。図4は、ストレージ装置1のトランザクション処理の例を示すフローチャートである。
[2.3. Transaction processing]
Next, transaction processing of the storage apparatus 1 will be described. FIG. 4 is a flowchart showing an example of transaction processing of the storage apparatus 1.

トランザクション処理において、まずストレージ装置1はBEGIN文処理を実行する(S10)。図5に、BEGIN文処理の例を示すフローチャートを掲げる。BEGIN文処理では、ストレージ装置1、より詳しくはデータベース処理部20及びデータ管理部60は、BEGIN文の受け取りをトリガとして、トランザクション状態を「開始」にする(S110)。以上でBEGIN文処理は終了する。   In the transaction processing, first, the storage apparatus 1 executes BEGIN statement processing (S10). FIG. 5 is a flowchart showing an example of BEGIN statement processing. In the BEGIN statement processing, the storage device 1, more specifically, the database processing unit 20 and the data management unit 60 sets the transaction state to “start” with the reception of the BEGIN statement as a trigger (S11). This completes the BEGIN statement processing.

図4に戻り、トランザクション処理の説明を続る。ステップS10に続いて、ストレージ装置1、より詳しくはデータベース処理部20及びデータ管理部60は、コマンド(命令文)入力を待ち受け、コマンド文入力を受信した場合には、当該コマンド文に応じた内容の処理(以下、「コマンド文処理」という)を実行する(S20)。図6に、コマンド文処理の例を示したフローチャートを掲げ、このフローチャートを参照しながらコマンド文処理を説明する。   Returning to FIG. 4, the description of the transaction processing will be continued. Subsequent to step S10, the storage device 1, more specifically, the database processing unit 20 and the data management unit 60, waits for a command (command statement) input, and if a command statement input is received, the content corresponding to the command statement (Hereinafter referred to as “command statement processing”) is executed (S20). FIG. 6 is a flowchart showing an example of command sentence processing, and the command sentence processing will be described with reference to this flowchart.

コマンド文処理において、ストレージ装置1、より詳しくはデータベース処理部20は、データ登録の要求であるINSERT文、或いはデータベース更新の要求であるUPDATE文を、入出力装置10及び入出力部21を介して受信する(S210)。   In command statement processing, the storage device 1, more specifically the database processing unit 20, sends an INSERT statement that is a data registration request or an UPDATE statement that is a database update request via the input / output device 10 and the input / output unit 21. Receive (S210).

ステップS210に続いて、ストレージ装置1、より詳しくはデータベース処理部20は、受信した要求(INSERT文、或いはUPDATE文)を解釈し、書き込み先論理アドレスを決定する(S220)。   Subsequent to step S210, the storage apparatus 1, more specifically, the database processing unit 20, interprets the received request (INSERT statement or UPDATE statement) and determines a write destination logical address (S220).

ステップS220に続いて、ストレージ装置1、より詳しくはデータベース処理部20は、キャッシュメモリ31上に展開されたデータベースに、ステップS210で受信した要求に対応する登録データ、若しくは更新データを書き込む(S230)。なお、後に、不揮発性メモリ40の物理ページにキャッシュメモリ31上のデータがデータ管理部60によって書き込まれる。   Subsequent to step S220, the storage apparatus 1, more specifically, the database processing unit 20, writes registration data or update data corresponding to the request received in step S210 into the database developed on the cache memory 31 (S230). . Note that data on the cache memory 31 is written to the physical page of the nonvolatile memory 40 later by the data management unit 60.

ステップS230に続いて、ストレージ装置1、より詳しくはデータベース処理部20は、消去済ページリスト32の先頭から書き込み先物理ページを取得する(S240)。
ステップS240に続いて、ストレージ装置1、より詳しくはデータベース処理部20は、トランザクション状態であるか否かを判定する(S250)。
Subsequent to step S230, the storage apparatus 1, more specifically, the database processing unit 20, acquires a write destination physical page from the top of the erased page list 32 (S240).
Subsequent to step S24O, the storage apparatus 1, more specifically, the database processing unit 20, determines whether or not it is in a transaction state (S250).

トランザクション状態であると判定した場合(S250, Yes)、ストレージ装置1、より詳しくはデータベース処理部20は、ステップS220で決定した当該論理アドレスと、この論理アドレスに対応する物理アドレスを対応付けて、トランザクション用論物変換テーブル35に登録する(S260)。ステップS260に続いて、ストレージ装置1、より詳しくはデータベース処理部20は、ブロック状態テーブル33において、ステップS240で取得した物理ページの状態を「消去済」から「有効」に変更する(S270)。ステップS270の後、ストレージ装置1、より詳しくはデータベース処理部20はコマンド文処理を終了する。   When it is determined that the transaction state is established (S250, Yes), the storage apparatus 1, more specifically, the database processing unit 20, associates the logical address determined in step S220 with the physical address corresponding to the logical address, and It is registered in the transaction logical-physical conversion table 35 (S260). Subsequent to step S260, the storage apparatus 1, more specifically, the database processing unit 20, changes the state of the physical page acquired in step S240 from “erased” to “valid” in the block state table 33 (S270). After step S270, the storage device 1, more specifically the database processing unit 20, ends the command statement processing.

一方、ステップS250においてトランザクション状態ではないと判定した場合(S250, No)、ストレージ装置1、より詳しくはデータベース処理部20は、論物変換テーブル34にステップS220で決定した当該論理アドレスに対応する物理アドレスを登録する(S280)。   On the other hand, if it is determined in step S250 that the transaction state is not established (S250, No), the storage apparatus 1, more specifically, the database processing unit 20, stores the physical corresponding to the logical address determined in step S220 in the logical-physical conversion table 34. Register the address (S280).

ステップS280に続いて、ストレージ装置1、より詳しくはデータベース処理部20は、論物変換テーブル34に、以前登録されていた物理アドレスに対応するブロック状態テーブル33のページの状態情報を「有効」から「無効」に変更する(S290)。なお、ページの状態情報を「有効」から「無効」に変更するのは、以前登録されていた物理アドレスが有効値の場合のみである。   Subsequent to step S280, the storage apparatus 1, more specifically, the database processing unit 20, changes the status information of the page of the block status table 33 corresponding to the physical address previously registered in the logical-physical conversion table 34 from “valid”. Change to “Invalid” (S290). The page status information is changed from “valid” to “invalid” only when the previously registered physical address is a valid value.

ステップS290に続いて、ストレージ装置1、より詳しくはデータベース処理部20は前述のステップS270に進みコマンド文処理を続行する。
以上でコマンド文処理の説明を終了する。
Subsequent to step S290, the storage apparatus 1, more specifically the database processing unit 20, proceeds to the above-described step S270 and continues command statement processing.
This is the end of the description of command statement processing.

図4に戻りトランザクション処理の説明を続る。ステップS20に続いて、ストレージ装置1、より詳しくはデータベース処理部20及びデータ管理部60は、コマンド入力が完了したか否かを判定する(S30)。具体的には、直近に受信したコマンド文がCOMMIT文若しくはROLLBACK文であるか否かを判定する。   Returning to FIG. 4, the description of the transaction processing will be continued. Subsequent to step S20, the storage apparatus 1, more specifically, the database processing unit 20 and the data management unit 60, determines whether or not the command input is completed (S30). Specifically, it is determined whether the most recently received command statement is a COMMIT statement or a ROLLBACK statement.

ステップS30において、コマンド入力が完了していないと判定した場合(S30, No)、ストレージ装置1、より詳しくはデータベース処理部20及びデータ管理部60は、ステップS20に戻り、次のコマンド文入力を待ち受ける。   If it is determined in step S30 that the command input has not been completed (S30, No), the storage apparatus 1, more specifically, the database processing unit 20 and the data management unit 60 return to step S20 and input the next command statement. I wait.

一方、ステップS30において、コマンド入力は完了したと判定した場合(S30, Yes)、ストレージ装置1、より詳しくはデータベース処理部20及びデータ管理部60は、トランザクション開始後の一連のコマンド文入力の内容に応じて、データベースに反映させるか否かを判定する(S40)。具体的には、直近に入力されたコマンド文がCOMMIT文である場合、ストレージ装置1、より詳しくはデータベース処理部20及びデータ管理部60は、データベースに反映させると判定する。一方、直近に入力されたコマンド文がROLLBACK文である場合、ストレージ装置1、より詳しくはデータベース処理部20及びデータ管理部60は、データベースに反映させないと判定する。   On the other hand, if it is determined in step S30 that the command input has been completed (S30, Yes), the storage apparatus 1, more specifically, the database processing unit 20 and the data management unit 60, describe the contents of a series of command statement input after the transaction starts. Accordingly, it is determined whether or not to reflect in the database (S40). Specifically, when the command sentence that has been input most recently is a COMMIT sentence, the storage apparatus 1, more specifically, the database processing unit 20 and the data management unit 60, determines that it is reflected in the database. On the other hand, when the most recently entered command statement is a ROLLBACK statement, the storage device 1, more specifically, the database processing unit 20 and the data management unit 60, determines that the command statement is not reflected in the database.

ステップS40においてデータベースに反映させると判定した場合(S40, Yes)、ストレージ装置1、より詳しくはデータベース処理部20は、COMMIT処理を実行する。図7に、COMMIT処理の一例を示すフローチャートを掲げる。COMMIT処理において、ストレージ装置1、より詳しくはデータベース処理部20は、論物変換テーブル34に、トランザクション用論物変換テーブル35の内容を反映(転記)し、その後トランザクション用論物変換テーブル35の内容を空 (削除)にする(S310)。   When it is determined in step S40 that the data is to be reflected in the database (S40, Yes), the storage apparatus 1, more specifically, the database processing unit 20, executes COMMIT processing. FIG. 7 is a flowchart showing an example of the COMMIT process. In the COMMIT process, the storage device 1, more specifically, the database processing unit 20 reflects (transcribes) the contents of the transaction-physical-physical conversion table 35 in the logical-physical conversion table 34, and then the contents of the transaction-logical-physical conversion table 35 Is empty (deleted) (S310).

ステップS310に続いて、ストレージ装置1、より詳しくはデータベース処理部20は、論物変換テーブル34に以前登録されていた物理アドレスに対応する、ブロック状態テーブル33のページの状態を、「有効」から「無効」に変更する(S320;以前登録されていた物理アドレスが有効な値の場合)。
ステップS320に続いて、ストレージ装置1、より詳しくはデータベース処理部20は、トランザクション状態を終了する(S330)。
以上で、COMMIT処理は終了する。
Subsequent to step S310, the storage apparatus 1, more specifically, the database processing unit 20, changes the page status of the block status table 33 corresponding to the physical address previously registered in the logical-physical conversion table 34 from “valid”. Change to “Invalid” (S320; if the previously registered physical address is a valid value).
Subsequent to step S320, the storage apparatus 1, more specifically, the database processing unit 20, ends the transaction state (S330).
This completes the COMMIT process.

図4に戻り、トランザクション処理の説明を続る。ステップS40においてデータベースに反映させないと判定した場合(S40, No)、ストレージ装置1、より詳しくはデータベース処理部20及びデータ管理部60は、ROLLBACK処理を実行する(S50)。図8に、ROLLBACK処理の一例を示すフローチャートを掲げる。ROLLBACK処理において、ストレージ装置1、より詳しくはデータベース処理部20は、トランザクション用論物変換テーブル35を空にする(S410)。   Returning to FIG. 4, the description of the transaction processing will be continued. When it is determined in step S40 that the data is not reflected in the database (S40, No), the storage device 1, more specifically, the database processing unit 20 and the data management unit 60 execute ROLLBACK processing (S50). FIG. 8 is a flowchart showing an example of the ROLLBACK process. In the ROLLBACK process, the storage apparatus 1, more specifically, the database processing unit 20, empties the transaction logical-physical conversion table 35 (S410).

ステップS410に続いて、ストレージ装置1、より詳しくはデータベース処理部20は、トランザクション用論物変換テーブル35に登録されていた物理アドレスに対応する、ブロック状態テーブル33のページの状態を、「有効」から「無効」に変更する(S420)。
ステップS420に続いて、ストレージ装置1、より詳しくはデータベース処理部20は、トランザクション状態を終了する(S430)。
以上で、ROLLBACK処理は終了する。
Subsequent to step S410, the storage apparatus 1, more specifically, the database processing unit 20, sets the page status of the block status table 33 corresponding to the physical address registered in the transaction logical-physical conversion table 35 to “valid”. Is changed to “invalid” (S420).
Subsequent to step S420, the storage apparatus 1, more specifically, the database processing unit 20, ends the transaction state (S430).
This completes the ROLLBACK process.

図4に戻り、トランザクション処理の説明を続る。ステップS50のCOMMIT処理、又はステップS60のROLLBACK処理を実行した後、ストレージ装置1、より詳しくはデータベース処理部20はトランザクション処理を終了する。
以上でトランザクション処理の説明を終了する。
Returning to FIG. 4, the description of the transaction processing will be continued. After executing the COMMIT process in step S50 or the ROLLBACK process in step S60, the storage apparatus 1, more specifically, the database processing unit 20, ends the transaction process.
This is the end of the description of the transaction process.

[2.4.トランザクション処理におけるトランザクション用論物変換テーブル等の書き換え]
上述したトランザクション処理(S10〜S60)におけるトランザクション用論物変換テーブル35、論物変換テーブル34、不揮発性メモリの記憶内容の書き換えの例を述べる。
[2.4. Rewrite transaction logical / physical conversion table in transaction processing]
An example of rewriting the storage contents of the transaction logical / physical conversion table 35, logical / physical conversion table 34, and nonvolatile memory in the transaction processing (S10 to S60) described above will be described.

[2.4.1.トランザクション処理前]
図9に、トランザクション処理前のトランザクション用論物変換テーブル35、論物変換テーブル34、不揮発性メモリ40の記憶内容例を示す。トランザクション処理前において、図9に示す論物変換テーブル34は、論理アドレス「0」、論理アドレス「1」、論理アドレス「2」、論理アドレス「3」のそれぞれに対応するレコードを有している。論理アドレス「0」に対応するレコードは、対応する物理アドレスとして、不揮発性メモリ40のブロック「1」のページ「0」を記憶している。また、論理アドレス「1」に対応するレコードは、対応する物理アドレスとして、不揮発性メモリ40のブロック「2」のページ「1」を記憶している。論理アドレス「2」に対応するレコードは、対応する物理アドレスとして、不揮発性メモリ40のブロック「1」のページ「2」を記憶している。論理アドレス「3」に対応するレコードは、対応する物理アドレスとしてブロック「4」のページ「0」を記憶している。論物変換テーブル34の各レコードと、不揮発性メモリ40のブロック及びページとの対応関係を図中の矢印線で示す。
[2.4.1. Before transaction processing]
FIG. 9 shows an example of storage contents of the transaction logical-physical conversion table 35, the logical / physical conversion table 34, and the nonvolatile memory 40 before the transaction processing. Before transaction processing, the logical-physical conversion table 34 shown in FIG. 9 has records corresponding to the logical address “0”, the logical address “1”, the logical address “2”, and the logical address “3”. . The record corresponding to the logical address “0” stores the page “0” of the block “1” of the nonvolatile memory 40 as the corresponding physical address. The record corresponding to the logical address “1” stores the page “1” of the block “2” of the nonvolatile memory 40 as the corresponding physical address. The record corresponding to the logical address “2” stores the page “2” of the block “1” of the nonvolatile memory 40 as the corresponding physical address. The record corresponding to the logical address “3” stores the page “0” of the block “4” as the corresponding physical address. Correspondence between each record of the logical-physical conversion table 34 and the block and page of the nonvolatile memory 40 is indicated by an arrow line in the figure.

トランザクション処理前の時点では、トランザクション用論物変換テーブル35は、論理アドレスと物理アドレスとの対応関係はまだ記憶されていない。   At the time before the transaction processing, the transaction logical-physical conversion table 35 has not yet stored the correspondence between the logical address and the physical address.

[2.4.2.トランザクション処理開始後(1)]
図9に示した状態の後、ストレージ装置1が以下のコマンド文(SQL文)を受け取ったものとする。
BEGIN;
UPDATE table1 SET x1=n WHERE id=m;
[2.4.2. After starting transaction processing (1)]
Assume that the storage apparatus 1 receives the following command statement (SQL statement) after the state shown in FIG. 9.
BEGIN;
UPDATE table1 SET x1 = n WHERE id = m;

上記BEGIN文を受け取ったストレージ装置1、より詳しくはデータベース処理部20は、トランザクション状態を開始するとともに、これに続くUPDATE文の内容を解釈して、書込み先論理アドレスを決定し、キャッシュメモリ31に更新データを書き込む。この例では、書込み先論理アドレスは「1」であるものとする。   The storage apparatus 1 that has received the BEGIN statement, more specifically, the database processing unit 20 starts a transaction state, interprets the contents of the UPDATE statement that follows this, determines a write destination logical address, and stores it in the cache memory 31. Write update data. In this example, it is assumed that the write destination logical address is “1”.

次にストレージ装置1、より詳しくはデータベース処理部20は、消去済ページリスト32の先頭から書き込み先物理ページを取得する。この例では、消去済ページリスト32の先頭には、ブロック「3」のページ「0」が記述されているものとする。   Next, the storage apparatus 1, more specifically, the database processing unit 20, acquires a write destination physical page from the top of the erased page list 32. In this example, it is assumed that page “0” of block “3” is described at the top of the erased page list 32.

上記に続いてストレージ装置1、より詳しくはデータベース処理部20は、トランザクション用論物変換テーブル35に前記書込み先論理アドレス「1」と、これに対応する物理アドレスである不揮発性メモリ40のブロック「3」のページ「0」を登録する。図10にこの時点の状態のトランザクション用論物変換テーブル35、論物変換テーブル34、不揮発性メモリの記憶内容例を示す。   Subsequent to the above, the storage apparatus 1, more specifically, the database processing unit 20 stores the write destination logical address “1” in the transaction logical-physical conversion table 35 and the block “of the nonvolatile memory 40 corresponding to the physical address corresponding thereto. 3 ”page“ 0 ”is registered. FIG. 10 shows an example of the contents stored in the transaction logical-physical conversion table 35, logical-physical conversion table 34, and nonvolatile memory in this state.

ストレージ装置1、より詳しくはデータ管理部60は、上記処理のバックグラウンドで不揮発性メモリ40のブロック「3」のページ「0」に、論理アドレス「1」に対応するキャッシュメモリ31の更新データを書き込む処理を行う。   The storage device 1, more specifically the data management unit 60, updates the cache memory 31 corresponding to the logical address “1” to the page “0” of the block “3” of the nonvolatile memory 40 in the background of the above processing. Perform the writing process.

[2.4.3.トランザクション処理開始後(2)]
図10に示した状態の後、ストレージ装置1がさらに以下のコマンド文(SQL文)を受け取ったものとする。
UPDATE table1 SET x2=n WHERE id=b;
[2.4.3. After transaction processing starts (2)]
Assume that the storage apparatus 1 further receives the following command statement (SQL statement) after the state shown in FIG.
UPDATE table1 SET x2 = n WHERE id = b;

上記UPDATE文を受け取ったストレージ装置1、より詳しくはデータベース処理部20は、このUPDATE文の内容を解釈して、書込み先論理アドレスを決定し、キャッシュメモリ31に更新データを書き込む。この例では、書込み先論理アドレスは「2」であるものとする。   The storage device 1 that has received the UPDATE statement, more specifically, the database processing unit 20 interprets the contents of the UPDATE statement, determines the write destination logical address, and writes the update data to the cache memory 31. In this example, it is assumed that the write destination logical address is “2”.

次にストレージ装置1、より詳しくはデータベース処理部20は、消去済ページリスト32の先頭から書き込み先物理ページを取得する。この例では、消去済ページリスト32の先頭には、ブロック「4」のページ「2」が記述されているものとする。   Next, the storage apparatus 1, more specifically, the database processing unit 20, acquires a write destination physical page from the top of the erased page list 32. In this example, it is assumed that page “2” of block “4” is described at the top of erased page list 32.

上記に続いてストレージ装置1、より詳しくはデータベース処理部20は、トランザクション用論物変換テーブル35に前記書込み先論理アドレス「2」と、これに対応する物理アドレスである不揮発性メモリ40のブロック「4」のページ「2」を新たに登録する。図11にこの時点の状態のトランザクション用論物変換テーブル35、論物変換テーブル34、不揮発性メモリの記憶内容例を示す。   Following the above, the storage apparatus 1, more specifically, the database processing unit 20, writes the logical address “2” to be written to the transaction logical-physical conversion table 35 and the block “ The page “2” of “4” is newly registered. FIG. 11 shows an example of stored contents of the transaction logical-physical conversion table 35, logical-physical conversion table 34, and nonvolatile memory in this state.

ストレージ装置1、より詳しくはデータ管理部60は、上記処理のバックグラウンドで不揮発性メモリ40のブロック「4」のページ「2」に、論理アドレス「2」に対応するキャッシュメモリ31の更新データを書き込む処理を行う。   The storage device 1, more specifically, the data management unit 60, updates the cache memory 31 corresponding to the logical address “2” to the page “2” of the block “4” of the nonvolatile memory 40 in the background of the above processing. Perform the writing process.

[2.4.4.トランザクション処理開始後(3)]
図11に示した状態の後、ストレージ装置1がさらにコマンド文(SQL文)であるCOMMIT文を受け取ったものとする。
[2.4.4. After starting transaction processing (3)]
Assume that after the state shown in FIG. 11, the storage apparatus 1 further receives a COMMIT statement that is a command statement (SQL statement).

上記COMMIT文を受け取ったストレージ装置1、より詳しくはデータベース処理部20は、論物変換テーブル34へトランザクション用論物変換テーブル35の内容を書き込む。この例では、ストレージ装置1、より詳しくはデータベース処理部20は、トランザクション用論物変換テーブル35に書き込まれている論理アドレス「1」に対応するブロック「3」、ページ番号「0」を、論物変換テーブル34の論理アドレス「1」に対応するブロック番号及びページ番号として書込み、トランザクション用論物変換テーブル35に書き込まれている論理アドレス「2」に対応するブロック「4」、ページ番号「2」を論物変換テーブル34の論理アドレス「1」に対応するブロック番号及びページ番号として書込む。   The storage device 1 that has received the COMMIT statement, more specifically, the database processing unit 20 writes the contents of the transaction logical-physical conversion table 35 into the logical-physical conversion table 34. In this example, the storage device 1, more specifically, the database processing unit 20, stores the block “3” and page number “0” corresponding to the logical address “1” written in the transaction logical-physical conversion table 35. The block number and the page number corresponding to the logical address “1” of the physical conversion table 34 are written as the block number and the page number, the block “4” corresponding to the logical address “2” written in the transaction logical-physical conversion table 35 and the page number “2”. Is written as the block number and page number corresponding to the logical address “1” of the logical-physical conversion table 34.

なお、不揮発性メモリ40へのデータの書き込みは、バックグラウンドでデータ管理部60が各コマンド文受領ごとに事前に実行しているため、COMMIT文を受け取った時点で新たに開始する不揮発性メモリ40への書込みは発生しない。
ストレージ装置1、より詳しくはデータベース処理部20は、トランザクション用論物変換テーブル35に書き込まれているデータをすべて削除する。
図12にこの時点の状態のトランザクション用論物変換テーブル35、論物変換テーブル34、不揮発性メモリの記憶内容例を示す。
Note that the data writing to the non-volatile memory 40 is executed in advance by the data management unit 60 every time a command statement is received in the background. Therefore, the non-volatile memory 40 newly started when a COMMIT statement is received. Writing to does not occur.
The storage device 1, more specifically, the database processing unit 20 deletes all data written in the transaction logical-physical conversion table 35.
FIG. 12 shows an example of storage contents of the transaction logical-physical conversion table 35, logical-physical conversion table 34, and nonvolatile memory in this state.

[2.4.5.トランザクション処理開始後(4)]
図11に示した状態の後、ストレージ装置1がさらにコマンド文(SQL文)であるROLLBACK文を受け取った場合の動作を説明する。
[2.4.5. After starting transaction processing (4)]
The operation when the storage apparatus 1 further receives a ROLLBACK statement as a command statement (SQL statement) after the state shown in FIG. 11 will be described.

ROLLBACK文を受け取ったストレージ装置1、より詳しくはデータベース処理部20は、トランザクション用論物変換テーブル35に書き込まれているデータをすべて削除する。なお、不揮発性メモリ40への更新データ、追加データの書き込みは、バックグラウンドでデータ管理部60が各コマンド文受領ごとに事前に実行しているが、論物変換テーブル34が指示しているブロック番号及びページ番号は、更新データ、追加データの書き込みが行われる前の内容のブロック番号及びページ番号であるため、不揮発性メモリ40への削除・書き換えを行う必要はない。
図13にこの時点の状態のトランザクション用論物変換テーブル35、論物変換テーブル34、不揮発性メモリの記憶内容例を示す。
The storage apparatus 1 that has received the ROLLBACK statement, more specifically, the database processing unit 20, deletes all the data written in the transaction logical-physical conversion table 35. The update data and additional data are written to the non-volatile memory 40 in advance in the background by the data management unit 60 when each command statement is received, but the block indicated by the logical-physical conversion table 34 Since the number and page number are the block number and page number of the contents before the update data and additional data are written, it is not necessary to delete or rewrite the nonvolatile memory 40.
FIG. 13 shows an example of storage contents of the transaction logical-physical conversion table 35, logical-physical conversion table 34, and nonvolatile memory in this state.

[3.利点]
(1) 本実施の形態にかかるストレージ装置1によれば、トランザクション処理を、コミットおよびロールバック共、高速に実行することができる。
[3. advantage]
(1) According to the storage device 1 according to the present embodiment, transaction processing can be executed at high speed for both commit and rollback.

コミットおよびロールバック時点で、揮発性メモリの変更のみの場合、従来手法では、数百μs以上(NANDに保存する場合)が必要であるのに対して、本実施の形態にかかるストレージ装置1では、数μs以下(DRAMの場合)で完了する。   In the case of only changing the volatile memory at the time of commit and rollback, the conventional method requires several hundred μs or more (when stored in NAND), whereas the storage apparatus 1 according to the present embodiment requires Complete within a few μs (in case of DRAM).

図14(A)に従来手法によるトランザクション処理のシーケンス図を示し、図14(B)に本実施の形態にかかるストレージ装置1によるトランザクション処理のシーケンス図を示して比較する。   FIG. 14A shows a sequence diagram of transaction processing according to the conventional method, and FIG. 14B shows a sequence diagram of transaction processing by the storage apparatus 1 according to the present embodiment for comparison.

図14(A)に示すように、従来手法によるトランザクション処理では、UPDATE文、INSERT文に応じてキャッシュメモリ31を更新し、その後COMMIT文の処理開始から、不揮発性メモリ40への更新データ、追加データ等の書き込みが行われる。   As shown in FIG. 14A, in the transaction processing according to the conventional method, the cache memory 31 is updated in accordance with the UPDATE statement and the INSERT statement, and then the update data and addition to the nonvolatile memory 40 are added after the processing of the COMMIT statement starts. Data is written.

一方、図14(B)に示すように、本実施の形態にかかるストレージ装置1によるトランザクション処理では、UPDATE文、INSERT文に応じてキャッシュメモリ31を更新するとともに、不揮発性メモリ40への書き込みをバックグラウンドで実行する。また、COMMIT文の処理時ではキャッシュメモリ31上の論物変換テーブル34の書き換えのみで処理を終えることができる。すなわち、従来手法ではCOMMITまで不揮発性メモリ40への書き込みが行えなかったが、本実施の形態にかかるストレージ装置1は 裏(バックグラウンド)で不揮発性メモリ40の更新を行うため、トランザクション処理時間短縮が可能となる。   On the other hand, as shown in FIG. 14B, in the transaction processing by the storage apparatus 1 according to the present embodiment, the cache memory 31 is updated according to the UPDATE statement and the INSERT statement, and the writing to the nonvolatile memory 40 is performed. Run in the background. Further, at the time of processing the COMMIT statement, the processing can be completed only by rewriting the logical-physical conversion table 34 on the cache memory 31. That is, in the conventional method, writing to the non-volatile memory 40 could not be performed until COMMIT, but the storage apparatus 1 according to the present embodiment updates the non-volatile memory 40 behind the scenes, so that the transaction processing time is shortened. Is possible.

(2) 本実施の形態にかかるストレージ装置1によれば、揮発性メモリの使用量を少なく抑えることができるため、揮発性メモリ量に制約がある場合に有効である。   (2) According to the storage device 1 according to the present embodiment, since the amount of volatile memory used can be reduced, it is effective when the amount of volatile memory is limited.

従来手法においては、レコードサイズ×件数分のメモリ使用量が必要であるのに対して、本実施の形態にかかるストレージ装置1では、論物変換テーブルの1エントリサイズ×件数分のメモリ使用量で足りる。 In the conventional method, the memory usage corresponding to the record size × the number of cases is necessary, whereas in the storage device 1 according to the present embodiment, the memory usage corresponding to one entry size × the number of the logical-physical conversion table is used. It ’s enough.

例をあげると、100バイト×10,000件、論物変換テーブル34の1エントリサイズ=4バイトとすると、必要な揮発性メモリ量は、従来手法では100×10,000 = 1,000Kバイトとなるのに対して、本実施の形態にかかるストレージ装置1では、4×10,000 = 40Kバイトとなり、大幅にメモリ使用量を低減させることが可能である。   For example, if 100 bytes x 10,000 and 1 entry size of the logical-physical conversion table 34 = 4 bytes, the required amount of volatile memory is 100 x 10,000 = 1,000 Kbytes in the conventional method. In the storage device 1 according to the present embodiment, 4 × 10,000 = 40 Kbytes, and the memory usage can be significantly reduced.

[4.まとめ、その他]
以上、本発明の実施の形態を説明したが、本発明はこれらに限定されるものではなく、発明の趣旨を逸脱しない範囲内において、種々の変更、追加、組み合わせ等が可能である。
[4. Summary, etc.]
As mentioned above, although embodiment of this invention was described, this invention is not limited to these, A various change, addition, a combination, etc. are possible in the range which does not deviate from the meaning of invention.

1,1A・・・ストレージ装置; 10・・・入出力装置; 20・・・データベース処理部; 30、30A・・・揮発性メモリ; 40・・・不揮発性メモリ; 50・・・演算装置; 60・・・データ管理部;
1, 1A ... Storage device; 10 ... I / O device; 20 ... Database processing unit; 30, 30A ... Volatile memory; 40 ... Non-volatile memory; 60: Data management department;

Claims (2)

データベースを記憶する不揮発性メモリと、
前記データベースを一時的に記憶するキャッシュメモリと、
前記不揮発性メモリにおける書き込み可能なページの物理アドレスを記憶する消去済ページリストと、
前記不揮発性メモリにおける各ブロックのページの状態を管理するデータを保存するブロック状態テーブルと、
データの論理アドレスと、これに対応する前記不揮発性メモリの物理アドレスを対応付けて記憶する第1の変換テーブルと、
データの論理アドレスと、これに対応する前記不揮発性メモリの物理アドレスを対応付けて記憶する第2の変換テーブルと、
前記データベースを操作する命令であるコマンド文を受け取り、このコマンド文を解釈してデータベースの変更内容及び前記データの論理アドレスを決定し、前記データベースの変更内容に基づいて、前記キャッシュメモリ上のデータベースの内容を変更し、前記消去済ページリストから前記不揮発性メモリにおける書き込み先物理アドレスを取得し、前記キャッシュメモリ上のデータベースの変更された内容に対応する論理アドレスと、前記書き込み先物理アドレスとを対応付けて、前記第2の変換テーブルに書き込み、トランザクション処理の結果をデータベースに反映させること意味する命令を受け取ると、前記第2の変換テーブルの内容を前記第1の変換テーブルに反映させ、前記ブロック状態テーブルにおいて、前記書き込み先物理アドレスに対応するページの状態を有効とし、前記データベースの変更元の物理アドレスに対応するページの状態を無効とする第1の処理手段と、
前記キャッシュメモリ上のデータベースの変更された内容を、前記不揮発性メモリの前記書き込み先物理アドレスへバックグラウンドで書き込む第2の処理手段と
を有するストレージ装置。
Non-volatile memory for storing the database;
A cache memory for temporarily storing the database;
An erased page list for storing a physical address of a writable page in the nonvolatile memory;
A block state table for storing data for managing the state of the page of each block in the nonvolatile memory;
A first conversion table for storing a logical address of data and a physical address of the nonvolatile memory corresponding to the logical address;
A second conversion table for storing a logical address of data and a physical address of the nonvolatile memory corresponding to the logical address;
Receives a command statement is a command for operating the database, interprets the command statement to determine the logical address of the changes and the data in the database, based on the changes of the database, the database on the cache memory Changing the contents, obtaining a write destination physical address in the nonvolatile memory from the erased page list, and a logical address corresponding to the changed contents of the database on the cache memory, and the write destination physical address , association with, writing to the second conversion table, receives an instruction means to reflect the results of the transaction processing to the database, the contents of the second conversion table is reflected in the first conversion table, In the block state table, the write And enable the state of the page corresponding to the physical address, the first processing means shall be the disable state of the page corresponding to the change source physical address of said database,
Second processing means for writing the changed contents of the database on the cache memory in the background to the write destination physical address of the nonvolatile memory;
A storage device.
前記第1の処理手段は、トランザクション処理の結果を取り消すことを意味する命令を受け取ると、前記第2の変換テーブル内容を前記第1の変換テーブルに反映させずに、前記第2の変換テーブル内容を取り消前記ブロック状態テーブルにおいて、前記書き込み先物理アドレスに対応するページの状態を無効とする
請求項1に記載のストレージ装置。
When the first processing means receives an instruction meaning to cancel the transaction processing result, the second conversion table is not reflected in the first conversion table without reflecting the contents of the second conversion table. revoke the content, in the block state table, the disable state of the page corresponding to the write destination physical address
The storage apparatus according to claim 1.
JP2013244857A 2013-11-27 2013-11-27 Storage device Expired - Fee Related JP6289883B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013244857A JP6289883B2 (en) 2013-11-27 2013-11-27 Storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013244857A JP6289883B2 (en) 2013-11-27 2013-11-27 Storage device

Publications (2)

Publication Number Publication Date
JP2015103147A JP2015103147A (en) 2015-06-04
JP6289883B2 true JP6289883B2 (en) 2018-03-07

Family

ID=53378768

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013244857A Expired - Fee Related JP6289883B2 (en) 2013-11-27 2013-11-27 Storage device

Country Status (1)

Country Link
JP (1) JP6289883B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6293709B2 (en) * 2015-07-22 2018-03-14 株式会社東芝 Storage system and storage system program

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6957236B1 (en) * 2002-05-10 2005-10-18 Oracle International Corporation Providing a useable version of a data item
US7752382B2 (en) * 2005-09-09 2010-07-06 Sandisk Il Ltd Flash memory storage system and method
US8103822B2 (en) * 2009-04-26 2012-01-24 Sandisk Il Ltd. Method and apparatus for implementing a caching policy for non-volatile memory
US9104690B2 (en) * 2011-01-27 2015-08-11 Micron Technology, Inc. Transactional memory

Also Published As

Publication number Publication date
JP2015103147A (en) 2015-06-04

Similar Documents

Publication Publication Date Title
TWI670594B (en) Data storage device
JP4524309B2 (en) Memory controller for flash memory
US9697116B2 (en) Storage system and writing method thereof
TWI531963B (en) Data storage systems and their specific instruction enforcement methods
KR102275563B1 (en) Host-managed non-volatile memory
US20110208898A1 (en) Storage device, computing system, and data management method
JP2011253251A (en) Data storage device and data writing method
WO2017025039A1 (en) Flash storage oriented data access method and device
TW202001573A (en) Memory system
TWI671631B (en) Memory management method and storage controller
JP4745465B1 (en) Semiconductor memory device and method for controlling semiconductor memory device
KR20140094278A (en) Semiconductor apparatus and method of operating the same
JP2018504692A (en) Transaction processing method and apparatus, and computer system
WO2017113059A1 (en) Discrepant data backup method, storage system and discrepant data backup device
JP2010287049A (en) Memory system and memory system management method
KR20210050592A (en) Error checking in namespaces on storage devices
EP3385846B1 (en) Method and device for processing access request, and computer system
TWI640864B (en) Two stage command buffers to overlap iommu map and second tier memory reads
US20140219041A1 (en) Storage device and data processing method thereof
US20210026763A1 (en) Storage device for improving journal replay, operating method thereof, and electronic device including the storage device
KR20200056533A (en) Storage device for performing map scheduling and electronic device including the same
TW201734793A (en) Memory management method, memory control circuit unit and memory storage device
JP4242245B2 (en) Flash ROM control device
US20140218767A1 (en) Image forming apparatus, memory management method for image forming apparatus, and program
KR20100121389A (en) Storage device based on a flash memory and user device including the same

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160921

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170524

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170613

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170810

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180207

R151 Written notification of patent or utility model registration

Ref document number: 6289883

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees