Database Snapshot Dropping via Linked Converter Streams
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Dropping database snapshots in an in-memory database system results in a high volume of read input/output operations, leading to negative impacts on other online operations and prolonged completion times due to the need to iterate over multiple converter streams in parallel.
Innovation Solution
A method is implemented to improve performance by linking converter streams associated with adjacent snapshots, involving steps such as iterating converter trees, loading physical pages, querying iterators, and determining whether physical pages can be freed based on their presence in main memory or disk.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If multiple converter streams are iterated in parallel to determine physical block usage, then snapshot dropping correctness is ensured, but read I/O operations increase and performance deteriorates
Solution Approach 1:
The patent creates index structures (hash tables or B-trees) beforehand that map logical block numbers to physical block numbers for each snapshot. When dropping a snapshot, the system queries these pre-built indexes directly instead of iterating through converter streams, significantly reducing read I/O operations while ensuring correctness through the pre-computed mappings.
Solution Approach 2:
The patent creates copy structures (indexes) that replicate the mapping information from the original converter streams. These indexes are built in advance and stored separately, allowing the system to query snapshot physical block usage by accessing the copied index data rather than reading through the original converter streams during the drop operation.
2Measurement precision
If converter streams are iterated in parallel, then physical block number comparison is complete, but the iteration process takes a long time to complete
Solution Approach 1:
Index structures are constructed in advance during snapshot creation or idle periods, organizing converter stream data into searchable formats. When a snapshot needs to be dropped, the system performs quick queries on these pre-organized indexes rather than time-consuming parallel iterations, completing physical block number comparisons in minimal time while maintaining completeness.
Solution Approach 2:
The patent changes the data organization parameter from sequential converter stream format to indexed format (hash table or B-tree). This parameter change transforms the query operation from O(n) linear iteration to O(1) or O(log n) index lookup, dramatically reducing the time required for physical block number comparisons while preserving measurement precision.
Data Source
AI summary
Computer-readable media, methods, and systems are disclosed for improving performance when dropping database snapshots by linking converter streams associated with adjacent snapshots in a database system. A request is received to drop a snapshot. The database system iterates a first converter tree associated with a first converter stream to identify a first physical page number to be loaded. A physical page corresponding to the first physical page number is loaded. The database system iterates a second converter tree associated with a second converter stream to identify a second physical page number to be loaded. The second physical page number is queried from an iterator associated with the first converter tree. Responsive to determining that the physical page associated with the second physical page number is not present in main memory, the in-memory database system loads from disk, the physical page associated with the second physical page number.


