Atomic Operation-Based Split-Supporting Index Algorithm
The algorithm is based on atomic operations and versioning of items, with minimal latching during node splitting. It allows local updates during splits and merges, and handles non-local updates using a priority queue. Sibling nodes are managed efficiently to prevent overflow.
Atomic Operation-Based Split-Supporting Index Algorithm
E N D
Presentation Transcript
Split-supporting Index • Algorithm is based on atomic operations and versioning of the items • Latching is minimal
Node Split - exclusive latch between non-local updates - marks logically deleted items p14 p14 p3 p4 p5 p14
Node Split - exclusive latch between non-local updates - marks logically deleted items R3 R4 R5 p1 p2 p6 p7 p14 R9 p3 p4 p5 p14
Node Split - exclusive latch between non-local updates - marks logically deleted items R10 p14 R3 R4 R5 R9 p2 p3 p4 p5 p14 p1 p6 p7
Local Updates • Are allowed during splits and merges R3 Secondary index N2 N3 N1 p1 p2 N1 N1’ Nil Nil 0 N1 N1’ Nil Nil 1 N2’ N2 0 R4 N2’ N1’ N3’ p3 p4 p6 p7
Non-Local Updates • Are not allowed to make changes for items which are involved into split • Updates are put into a priority queue and retried later
Merge of the node Merge underflow node with one of the sibling nodes • Sibling node have space for all entries • Sibling node would become overflow after insertion
Sibling node have space for all entries • Sibling and underflow nodes are latched • New empty node is created • Entries form sibling and underflow nodes are copied into the new node • New node is introduced into structure by atomic swap of the pointers
Sibling node would become overflow • Split of the sibling node is performed • Split function accepts all entries from the underflow node instead of one entry • Entries are distributed between two new nodes • Two new nodes are introduced into structure in two atomic operations
Summary of the algorithm Advantages Disadvantages • Local updates are permitted during node splits and merges • Queries can execute concurrently • High complexity due to avoidance of locks • Creation of artificial updates
Related Work • Logical and Physical Versioning in Main Memory Databases [Rastogi et al. 1997] • An Enhanced Concurrency Control Scheme for Multi-dimensional Index Structures [Song et al. 2004] • Main-memory indexing [Šidlauskas et al. 2009] • …
Status of the Project • A paper on presented algorithms • Theoretical foundation of the two ideas