IP Library Granted Patent US 7,370,055
Granted Patent B1
US 7,370,055 · App. 10/453,961 · Granted May 6, 2008

Efficiently performing deletion of a range of keys in a B+ tree

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,370,055
App. No.
10/453,961
Granted
May 6, 2008
Kind
B1
Abstract

A method for efficiently performing range deletions in a B+ tree. The method operates to delete all keys within a range in a plurality of iterations. Each iteration may comprise: 1) deleting all of the keys in one or more leaf-nodes that lie within the range of keys; and 2) adjusting entries in the node and its neighbors to perform any required rebalancing of the tree after the deletion. Each iteration of the deletion may comprise a Walk phase identifies nodes in the range of keys to be deleted; a Prepare phase which determines operations (delete and/or node adjust operations) to be performed at one or more levels in the B+ tree based on the identified nodes; and a Delete phase which performs the operations to delete keys in the range of keys in the B+ tree.

Claims (101)

1. A computer-readable memory medium comprising program instructions for deleting a range of keys in a B+ tree, wherein the program instructions are executable to implement:

storing the B+ tree on a memory medium of a computer system;

receiving information regarding the range of keys to be deleted in the B+ tree; and

deleting the range of keys from the B+ tree from the memory medium;

wherein after said deleting, the B+ tree utilizes less memory space on the memory medium;

wherein said deleting comprises:

walking at least a portion of the B+ tree, wherein said walking comprises identifying nodes in the range of keys to be deleted and storing information in a delete data structure regarding the identified nodes in the range of keys to be deleted;

determining operations to be performed at one or more levels in the B+ tree based on the identified nodes, wherein the operations comprise one or more delete operations, wherein determining the operations comprises utilizing the information regarding the identified nodes from the delete data structure and storing the determined operations in the delete data structure;

performing the operations to delete one or more keys in the range of keys, wherein said performing the operations comprises traversing the delete data structure to perform the operations stored in the delete data structure; and

repeating said walking, said determining, and said performing one or more times to delete the range of keys.

2. The computer-readable memory medium of claim 1 ,

wherein said deleting is performed in a plurality of iterations, wherein, for each of at least a subset of the plurality of iterations, said deleting comprises:

deleting all of the keys in one or more leaf-nodes that lie within the range of keys; and

adjusting one or more nodes as required after said deleting.

3. The computer-readable memory medium of claim 2 ,

wherein said adjusting comprises adjusting entries from one or more nodes and neighboring nodes at two or more levels to rebalance the B+ tree after the deleting.

4. The computer-readable memory medium of claim 2 ,

wherein said adjusting comprises performing one or more of deleting, shifting and/or rotating entries from one or more nodes and neighboring nodes at two or more levels to rebalance the B+ tree after the deleting.

5. The computer-readable memory medium of claim 1 ,

wherein said deleting comprises deleting the range of keys in a plurality of iterations;

wherein the plurality of iterations is substantially less than the total number of keys in the range of keys.

6. The computer-readable memory medium of claim 1 ,

wherein the information regarding the range of keys to be deleted comprises a starting key and an ending key.

7. The computer-readable memory medium of claim 6 ,

wherein at least one of the starting key and the ending key is an entry in the B+ tree.

8. The computer-readable memory medium of claim 1 ,

wherein the range of keys spans multiple nodes.

9. The computer-readable memory medium of claim 1 ,

wherein the B+ tree comprises a root node and a plurality of leaf nodes;

wherein said walking comprises walking the at least a portion of the B+ tree starting from the root node;

wherein said determining operations comprises walking the delete data structure starting from a leaf node;

wherein said performing the operations comprises walking the delete data structure starting from a leaf node.

10. The computer-readable memory medium of claim 1 ,

wherein the information regarding the range of keys to be deleted comprises a starting key and an ending key;

wherein said walking comprises using the starting key as a search key in said walking.

11. The computer-readable memory medium of claim 1 ,

wherein said walking comprises, at each level, locking a search node, a left node of the search node, if present, and a right node of the search node, if present.

12. The computer-readable memory medium of claim 1 ,

wherein the operations further comprise one or more node adjustment operations.

13. The computer-readable memory medium of claim 1 ,

wherein said determining operations comprises determining at least one operation to be performed on each level that is affected by the deletion.

14. The computer-readable memory medium of claim 1 ,

wherein said operations comprise two or more of:

a simple delete;

a node delete;

a shift and delete;

an adjust parent-node after a shift and delete at the lower level;

a merge and delete;

an adjust parent-node after a merge and delete at the lower level; and

a root collapse.

15. A method for deleting a range of keys in a B+ tree, the method comprising:

storing the B+ tree on a memory medium of a computer system;

receiving information regarding the range of keys to be deleted in the B+ tree; and

deleting the range of keys from the B+ tree from the memory medium;

wherein after said deleting, the B+ tree utilizes less memory space on the memory medium;

wherein said deleting comprises:

walking at least a portion of the B+ tree, wherein said walking comprises identifying nodes in the range of keys to be deleted and storing information in a delete data structure regarding the identified nodes in the range of keys to be deleted;

determining operations to be performed at one or more levels in the B+ tree based on the identified nodes, wherein the operations comprise one or more delete operations, wherein determining the operations comprises utilizing the information regarding the identified nodes from the delete data structure and storing the determined operations in the delete data structure;

performing the operations to delete one or more keys in the range of keys, wherein said performing the operations comprises traversing the delete data structure to perform the operations stored in the delete data structure; and

repeating said walking said determining and said performing one or more times to delete the range of keys.

16. The method of claim 15 ,

wherein said deleting is performed in a plurality of iterations, wherein, for each of at least a subset of the plurality of iterations, said deleting comprises:

deleting all of the keys in one or more leaf-nodes that lie within the range of keys; and

adjusting one or more nodes as required after said deleting.

17. The method of claim 16 ,

wherein said adjusting comprises adjusting entries from one or more nodes and neighboring nodes at two or more levels to rebalance the B+ tree after the deleting.

18. The method of claim 15 ,

wherein said deleting comprises deleting the range of keys in a plurality of iterations;

wherein the plurality of iterations is substantially less than the total number of keys in the range of keys.

19. A system for deleting a range of keys in a B+ tree, the system comprising:

a memory medium which stores:

the B+ tree;

delete program instructions executable to delete the range of keys in the B+ tree;

an input device for receiving information regarding the range of keys to be deleted in the B+ tree; and

a processor coupled to the memory medium and the input device, wherein the processor is operable to execute the delete program instructions to delete the range of keys from the B+ tree from the memory medium;

wherein after said deleting, the B+ tree utilizes less memory space on the memory medium;

wherein said deleting comprises:

walking at least a portion of the B+ tree, wherein said walking comprises identifying nodes in the range of keys to be deleted and storing information in a delete data structure regarding the identified nodes in the range of keys to be deleted;

determining operations to be performed at one or more levels in the B+ tree based on the identified nodes, wherein the operations comprise one or more delete operations, wherein determining the operations comprises utilizing the information regarding the identified nodes from the delete data structure and storing the determined operations in the delete data structure;

performing the operations to delete one or more keys in the range of keys, wherein said performing the operations comprises traversing the delete data structure to perform the operations stored in the delete data structure; and

repeating said walking, said determining and said performing one or more times to delete the range of keys.

20. The system of claim 19 ,

wherein said deleting the range of keys is performed in a plurality of iterations, wherein, for each of at least a subset of the plurality of iterations, the processor is operable to execute the delete program instructions to:

delete all of the keys in one or more leaf-nodes that lie within the range of keys; and

adjust one or more nodes as required after said deleting.

21. A computer-readable memory medium comprising program instructions for deleting a range of keys in a B-tree, wherein the program instructions are executable to implement:

storing the B-tree on a memory medium of a computer system;

receiving information regarding the range of keys to be deleted in the B-tree; and

deleting the range of keys from the B-tree from the memory medium;

wherein after said deleting, the B-tree utilizes less memory space on the memory medium;

wherein said deleting comprises:

walking at least a portion of the B-tree, wherein said walking comprises identifying nodes in the range of keys to be deleted and storing information in a delete data structure regarding the identified nodes in the range of keys to be deleted;

determining operations to be performed at one or more levels in the B-tree based on the identified nodes, wherein the operations comprise one or more delete operations, wherein determining the operations comprises utilizing the information regarding the identified nodes from the delete data structure and storing the determined operations in the delete data structure;

performing the operations to delete one or more keys in the range of keys, wherein said performing the operations comprises traversing the delete data structure to perform the operations stored in the delete data structure; and

repeating said walking, said determining, and said performing one or more times to delete the range of keys.

22. The computer-readable memory medium of claim 21 ,

wherein said deleting is performed in a plurality of iterations, wherein, for each of at least a subset of the plurality of iterations, said deleting comprises:

deleting all of the keys in one or more nodes that lie within the range of keys; and

adjusting one or more nodes as required after said deleting.

23. The computer-readable memory medium of claim 22 ,

wherein said adjusting comprises adjusting entries from one or more nodes and neighboring nodes at two or more levels to rebalance the B-tree after the deleting.

Assignments (15)
AMENDMENT NO. 1 TO PATENT SECURITY AGREEMENT Recorded Apr 8, 2025
From: VERITAS TECHNOLOGIES LLC; COHESITY, INC.
To: JPMORGAN CHASE BANK, N.A.
Reel/Frame 070779/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 26, 2025
From: VERITAS TECHNOLOGIES LLC
To: COHESITY, INC.
Reel/Frame 070335/0013 →
RELEASE OF SECURITY INTEREST Recorded Dec 16, 2024
From: ACQUIOM AGENCY SERVICES LLC, AS COLLATERAL AGENT
To: VERITAS TECHNOLOGIES LLC (F/K/A VERITAS US IP HOLDINGS LLC)
Reel/Frame 069712/0090 →
RELEASE OF SECURITY INTEREST Recorded Dec 13, 2024
From: WILMINGTON TRUST, NATIONAL ASSOCIATION, AS NOTES COLLATERAL AGENT
To: VERITAS TECHNOLOGIES LLC
Reel/Frame 069634/0584 →
SECURITY INTEREST Recorded Dec 9, 2024
From: VERITAS TECHNOLOGIES LLC; COHESITY, INC.
To: JPMORGAN CHASE BANK. N.A.
Reel/Frame 069890/0001 →
ASSIGNMENT OF SECURITY INTEREST IN PATENT COLLATERAL Recorded Nov 25, 2024
From: BANK OF AMERICA, N.A., AS ASSIGNOR
To: ACQUIOM AGENCY SERVICES LLC, AS ASSIGNEE
Reel/Frame 069440/0084 →
TERMINATION AND RELEASE OF SECURITY IN PATENTS AT R/F 037891/0726 Recorded Nov 30, 2020
From: WILMINGTON TRUST, NATIONAL ASSOCIATION, AS COLLATERAL AGENT
To: VERITAS US IP HOLDINGS, LLC
Reel/Frame 054535/0814 →
SECURITY INTEREST Recorded Aug 20, 2020
From: VERITAS TECHNOLOGIES LLC
To: WILMINGTON TRUST, NATIONAL ASSOCIATION, AS NOTES COLLATERAL AGENT
Reel/Frame 054370/0134 →
MERGER AND CHANGE OF NAME Recorded Apr 18, 2016
From: VERITAS US IP HOLDINGS LLC; VERITAS TECHNOLOGIES LLC
To: VERITAS TECHNOLOGIES LLC
Reel/Frame 038455/0752 →
SECURITY INTEREST Recorded Feb 23, 2016
From: VERITAS US IP HOLDINGS LLC
To: WILMINGTON TRUST, NATIONAL ASSOCIATION, AS COLLATERAL AGENT
Reel/Frame 037891/0726 →
SECURITY INTEREST Recorded Feb 23, 2016
From: VERITAS US IP HOLDINGS LLC
To: BANK OF AMERICA, N.A., AS COLLATERAL AGENT
Reel/Frame 037891/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 4, 2016
From: SYMANTEC CORPORATION
To: VERITAS US IP HOLDINGS LLC
Reel/Frame 037697/0412 →
CORRECTIVE ASSIGNMENT TO CORRECT THE ASSIGNEE PREVIOUSLY RECORDED ON REEL 019872 FRAME 979. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNEE IS SYMANTEC OPERATING CORPORATION. Recorded Mar 5, 2012
From: VERITAS OPERATING CORPORATION
To: SYMANTEC OPERATING CORPORATION
Reel/Frame 027819/0462 →
CHANGE OF NAME Recorded Sep 26, 2007
From: VERITAS OPERATING CORPORATION
To: SYMANTEC CORPORATION
Reel/Frame 019872/0979 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 4, 2003
From: PANDE, ARVIND ARUN
To: VERITAS OPERATING CORPORATION
Reel/Frame 014156/0683 →