OLFIT Latch-Free Index Traversal for Database Concurrency
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing main memory database management systems face inefficiencies in concurrency control and cache invalidation in multiprocessing environments, leading to poor scalability and performance degradation during index updates.
Innovation Solution
The Optimistic Latch-Free Index Traversal (OLFIT) scheme, which employs atomic reads and writes, uses a concurrency control unit to manage index nodes without latches, ensuring consistent node access and reducing cache invalidation through versioning and link pointers, allowing concurrent access without lock coupling.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If lock coupling is used for concurrency control, then index traversal consistency is ensured, but coherence cache misses increase and performance degrades
Solution Approach 1:
The patent applies preliminary action by pre-fetching index nodes into cache before they are needed for traversal. The system predicts which index nodes will be accessed next and loads them into cache in advance, eliminating cache misses during actual traversal operations and improving search performance without compromising consistency
Solution Approach 2:
The patent uses copying by creating and maintaining cache copies of index nodes. Instead of directly accessing main memory or relying on lock-based synchronization, the system maintains local cache copies that can be accessed without coherence protocol interruptions, thereby improving performance while ensuring consistency through controlled copy updates
2Productivity
If physical versioning is used to enable latch-free traversal, then read concurrency is improved, but update cost increases and scalability deteriorates
Solution Approach 1:
The patent extracts the versioning overhead from individual index nodes and implements it at the cache level. Instead of versioning every node update, the system uses a single version counter in the cache that tracks overall cache state, allowing latch-free reads while dramatically reducing update complexity and improving scalability
Solution Approach 2:
The patent applies universality by using a single cache-wide version counter to serve multiple purposes: it tracks cache validity, coordinates read-write operations, and enables latch-free traversal. This universal versioning mechanism replaces complex per-node versioning, reducing update cost while maintaining high read concurrency
3Reliability
If index nodes are latched during traversal, then concurrent access safety is maintained, but cache invalidation frequency increases
Solution Approach 1:
The patent introduces a cache manager as an intermediary between index traversal and cache coherence protocols. The cache manager mediates access to index nodes by maintaining local copies and managing version counters, eliminating the need for frequent cache invalidations while ensuring concurrent access safety through controlled update propagation
Data Source
AI summary
An optimistic, latch-free index traversal (“OLFIT”) concurrency control scheme is disclosed for an index structure for managing a database system. In each node of an index tree, the OLFIT scheme maintains a latch, a version number, and a link to the next node at the same level of the index tree. Index traversal involves consistent node read operations starting from the root. To ensure the consistency of node read operations without latching, every node update operation first obtains a latch and increments the version number after update of the node contents. Every node read operation begins with reading the version number into a register and ends with verifying if the current version number is consistent with the register-stored version number. If they are the same, the read operation is consistent. Otherwise, the node read is retried until the verification succeeds. The concurrency control scheme of the present invention is applicable to many index structures such as the B+-tree and the CSB+-tree.


