Top-Down B+Tree Node Merging for Concurrency
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Concurrent access to B-trees during insertion and deletion operations can lead to concurrency issues and deadlocks due to the need for upward traversal and locking of nodes, which restricts data access and efficiency.
Innovation Solution
Implementing a top-down B+tree approach that proactively merges and splits nodes during downward traversal, allowing for locking only a portion of the tree and avoiding upward traversal, thus enabling improved concurrency and reducing deadlocks.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If upward traversal and locking of nodes is used during insertion and deletion operations, then data consistency is maintained, but concurrency is restricted and deadlocks occur
Solution Approach 1:
The patent inverts the traditional bottom-up node locking and traversal approach by implementing top-down traversal and locking. Instead of starting from leaf nodes and moving upward to lock parent nodes after operations, the system locks parent nodes first and traverses downward to leaf nodes, allowing concurrent access to different parts of the tree and eliminating deadlocks while maintaining data consistency.
Solution Approach 2:
The patent applies preliminary action by locking parent nodes before performing insertion or deletion operations on child nodes. This preemptive locking strategy ensures that the locking sequence is consistent across all operations, preventing circular wait conditions that cause deadlocks, while still guaranteeing data consistency through proper synchronization.
2Device complexity
If traditional B-tree operations are used, then data structure simplicity is maintained, but operation efficiency decreases due to recursive upward traversal
Solution Approach 1:
The patent inverts the traditional B-tree operation direction by implementing top-down traversal from root to leaf nodes, replacing the conventional bottom-up approach. This inversion eliminates recursive upward traversal, reducing the number of node accesses and improving operation efficiency while maintaining the fundamental B-tree structure and data consistency.
3Reliability
If node locking is applied during B-tree operations, then data consistency is ensured, but access speed decreases due to lock acquisition overhead
Solution Approach 1:
The patent applies preliminary locking action at the root and parent nodes before traversing to leaf nodes, allowing the locking sequence to be established once at the beginning of the operation. This approach ensures data consistency through proper synchronization while minimizing lock acquisition overhead by avoiding repeated locking and unlocking during recursive upward traversal.
Data Source
AI summary
In some implementations, a B+tree (b plus tree) can provide concurrent access to data while modifying nodes of the B+tree. In some implementations, a top-down B+tree can be provided where nodes of the B+tree can be proactively merged, rebalanced and split to prevent recursive operations moving up the B+tree. In some implementations, node (or page) record data can be merged to consolidate record entries within nodes of the B+tree while only locking 1-3 nodes of the tree at the same time. In some implementations, record data can be merged across multiple nodes of the B+tree. In some implementations, ranges of data can be removed from the tree while only locking 1-3 nodes of the tree at the same time. In some implementations, range of data can be replaced with new data while only locking 1-3 nodes of the tree at the same time.


