US 12,487,969 B1
Fast truncation of large files
Zhihuan Qiu, Lake Oswego, OR (US); Nandan Paramashiva, San Jose, CA (US); Siming Liu, San Jose, CA (US); and Siddesh Shinde, San Jose, CA (US)
Assigned to Cohesity, Inc., Santa Clara, CA (US)
Filed by Cohesity, Inc., San Jose, CA (US)
Filed on Dec. 26, 2024, as Appl. No. 19/002,050.
Int. Cl. G06F 16/16 (2019.01); G06F 16/17 (2019.01); G06F 16/31 (2019.01)
CPC G06F 16/162 (2019.01) [G06F 16/1727 (2019.01); G06F 16/322 (2019.01)] 20 Claims
OG exemplary drawing
 
1. A method comprising:
receiving, by a data platform implemented by a computing system, a request to remove a portion of a file, wherein data of the file is stored in a tree data structure including a plurality of nodes, wherein a plurality of leaf nodes of the plurality of nodes include one or more indications of the data of the file;
determining, by the data platform, a first node of the plurality of nodes, the first node including a plurality of child nodes;
determining, by the data platform and based on a maximum key, the maximum key determined based on the request to remove a portion of the file, a subset of the child nodes corresponding to a portion of the data that is to be retained;
determining, by the data platform, whether to traverse the first node based on a level of the first node and a number of nodes in the subset of child nodes;
based on determining not to traverse the first node, updating, by the data platform, a second node of the plurality of nodes that is a parent of the first node to include a pointer to each child node of the subset of child nodes; and
moving, by the data platform and from a subset of the plurality of leaf nodes referenced by the subset of child nodes, at least one leaf node between a first child node of the subset of child nodes and a second child node of the subset of child nodes to rebalance the tree data structure.