CPC G06F 16/2246 (2019.01) [G06F 11/1435 (2013.01); G06F 16/128 (2019.01); G06F 16/1873 (2019.01); G06F 2201/84 (2013.01)] | 16 Claims |
1. A method, comprising:
receiving, at a first storage appliance of a distributed storage system that includes a plurality of storage appliances, a request to perform an operation associated with a key-value pair in a current view of a metadata tree structure, wherein the current view of the metadata tree structure is associated with a view identifier;
traversing, by the first storage appliance, the current view of the metadata tree structure from a root node to a target node of a plurality of encountered nodes, wherein traversing the metadata tree structure from the root node to the target node includes:
obtaining a corresponding lock for each of the plurality of encountered nodes;
comparing a view identifier associated with current view of the metadata tree structure to a view identifier associated with one or more encountered nodes of the plurality of encountered nodes;
releasing the corresponding lock for a previously encountered node of the one or more encountered nodes that is a threshold number of levels above a particular node of the one or more encountered nodes, wherein the corresponding lock for the root node is maintained throughout the traversal; and
creating a local copy of the particular node of the one or more encountered nodes in response to determining that the view identifier associated with current view of the metadata tree structure does not match the view identifier associated with the encountered node, wherein creating the local copy of the particular node of the one or more encountered nodes includes determining that a degree of the particular node meets a threshold degree and adding one or more additional nodes to the metadata tree structure in response to determining that the degree of the particular node meets the threshold degree; and
performing the operation associated with the key-value pair.
|