Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem)
We found FAIR algorithm proposed in FAST'18 has a problem in correctly handling node splits to be concurrent and crash-recoverable. Original FAIR algorithm proposed blink-tree like scheme to overcome the intermediate states of B+tree's node split by adding additional next sibling pointers to each level. However, only with it, we cannot correctly address every case caused by node split operation.
In case of internal node split, the middle key is not moved to right sibling node, but only added to parent node. Therefore, when write thread A concurrently try to insert its split key to the internal node where write thread B is splitting, write thread A can insert it to an incorrect node. Please refer to below Example 1 for more detail.
Differently from internal node split, leaf node split moves the middle key not only to parent node, but also to newly allocated right sibling node. However, as this middle key can be deleted by "remove" operation, a concurrent writer thread can insert a new key into wrong node. Please refer to Example 2 for more detail.
Solution)
We have added High key (middle key) to newly allocated right sibling node when internal node split occurs. This idea was originally proposed by Sang Kyun Cha, et al. [1].
[1] Cha, Sang Kyun, Sangyong Hwang, Kihong Kim, and Keunjoo Kwon. "Cache-conscious concurrency control of main-memory indexes on shared-memory multiprocessor systems." In VLDB, vol. 1, pp. 181-190. 2001.