Block-Level Fail Atomicity on Byte-Level Non-Volatile Media
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The mismatch between database atomicity requirements and the power-fail atomicity provided by persistent memory devices leads to corruption of database files during failure scenarios, as persistent memory devices often offer atomicity at a cache line granularity lower than the expected 512 bytes or higher, preventing direct hosting of database files on such media.
Innovation Solution
A system and method that utilize metadata structures like an offset table and a free space log to ensure out-of-place writes for file updates, allowing for recovery from crashes without modifying the database or requiring extra storage copies, thereby maintaining power-fail write atomicity across any file size while leveraging the performance of persistent memory.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If persistent memory devices are used to host database files directly, then performance is improved due to lower latency, but atomicity coverage is insufficient causing file corruption
Solution Approach 1:
The patent introduces a filesystem layer as an intermediary between the database and persistent memory. This filesystem layer manages the mapping between logical block addresses and physical cache line addresses, ensuring that database blocks are written atomically even though the underlying persistent memory operates at a finer cache line granularity. The filesystem coordinator and block manager act as mediators that coordinate write operations and maintain atomicity guarantees.
Solution Approach 2:
The patent segments the filesystem into manageable components including a filesystem coordinator, block manager, and inode manager. Each component handles specific aspects of data management, allowing the system to maintain atomicity at the database block level while leveraging the high-speed persistent memory at the cache line level. This segmentation enables independent optimization of performance and reliability functions.
2Quantity of substance
If traditional in-place block writes are used on persistent memory, then storage space is saved, but atomicity cannot be guaranteed at the required granularity
Solution Approach 1:
The patent performs preliminary actions by pre-allocating blocks and maintaining a free block list before writes occur. The filesystem coordinator prepares write operations in advance and coordinates them to ensure atomicity. By planning and preparing the write sequence beforehand, the system can guarantee that either the complete old block or complete new block is written, preventing mixed states without requiring additional storage for rollback copies.
Data Source
AI summary
Techniques are provided for block-level fail atomicity on byte-level non-volatile media. In one technique, an offset table and application data that stores content of a file are stored for a file. The offset table includes multiple entries, each entry being associated with a different offset value and storing a logical block address (LBA) that references a location in the application data. In response to receiving a request, that includes an input buffer and an offset value, to update the file: (a) an entry, in the offset table, that corresponds to the offset value and comprises a first LBA is identified; (b) a second LBA that is considered free is identified; (c) the second LBA is replaced with the first LBA; (d) the input buffer is written to a location, in the application data, that the second LBA references; and (e) the second LBA is added in the entry.


