CPC G06F 16/24547 (2019.01) [G06F 9/544 (2013.01); G06F 16/17 (2019.01); G06F 16/2246 (2019.01); G06F 16/27 (2019.01)] | 20 Claims |
1. A computer-implemented method, comprising:
providing a file system stored on one or more data storage devices as a Bε-tree structure comprising a plurality of leaf nodes and a plurality of non-leaf nodes, wherein the plurality of non-leaf nodes store pivot keys and child node pointers and the plurality of leaf nodes store key-value pairs, and wherein each non-leaf node of the plurality of non-leaf nodes further comprises a buffer, each buffer storing pending insert messages to a subtree rooted at that non-leaf node;
determining that a first buffer of a second node of the plurality of non-leaf nodes is to be flushed;
in response to determining that the first buffer of the second node of the plurality of non-leaf nodes is to be flushed:
obtaining a first lock on a first node of the plurality of non-leaf nodes in the Bε-tree structure;
obtaining a second lock on the second node, wherein the second node is a child node of the first node;
determining a quantity of child nodes of the second node;
in response to determining that the quantity of child nodes is any number within a first range, performing a splitting operation on the second node while holding the first lock and the second lock, wherein the first range is between a maximum number of child nodes and one half of the maximum number of child nodes; and
in response to determining that the quantity of child nodes is any number within a second range, performing a merging operation on the second node while holding the first lock and the second lock, wherein the second range is between one quarter of the maximum number of child nodes and one eighth of the maximum number of child nodes.
|