Patentable/Patents/US-8176023
US-8176023

Hierarchical locking in B-tree indexes

PublishedMay 8, 2012
Assigneenot available in USPTO data we have
Inventorsnot available in USPTO data we have
Technical Abstract

Portions of a B-tree index in a database are locked for concurrency control. In one example, hierarchical lock modes are provided that permit locking a key, a gap between the key and the next key, and a combination of the key and the gap. In another example, key range locking may be applied to the B-tree index using locks on separator keys of index nodes. In another example, key range locking may be applied to the B-tree index using locks on key prefixes.

Patent Claims
14 claims

Legal claims defining the scope of protection, as filed with the USPTO.

1

1. A method, comprising: placing a lock on a separator key of an index node of a B-tree index, wherein the lock locks a key range from the separator key to a next separator key; and at least one additional set of features selected from the group consisting of: (a) splitting a child node of the index node, wherein splitting the child node includes inserting a new separator key in the index node; duplicating the lock on the separator key; and applying the lock to the new separator key; (b) escalating the lock on the separator key including: upgrading the lock from a first intention lock to a first absolute lock; and eliminating locks on keys in the child nodes of the index node; (c) de-escalating the lock on the separator key including downgrading the lock from a second absolute lock to a second intention lock and placing locks on keys in child nodes of the index node; and (d) locking separator keys in only a subset of index nodes within the B-tree index, wherein the index node is in the subset of index nodes; and changing the set of index nodes in which separator keys are locked.

2

2. The method of claim 1 , the additional set of features comprising: splitting the child node of the index node, wherein splitting the child node includes inserting the new separator key in the index node; duplicating the lock on the separator key; and applying the lock to the new separator key.

3

3. The method of claim 1 , the additional set of features comprising: escalating the lock on the separator key including: upgrading the lock from the first intention lock to the first absolute lock; and eliminating locks on keys in the child nodes of the index node.

4

4. The method of claim 1 , the additional set of features comprising: de-escalating the lock on the separator key including downgrading the lock from the second absolute lock to the second intention lock and placing locks on keys in child nodes of the index node.

5

5. The method of claim 1 , the additional set of features comprising: locking separator keys in only the subset of index nodes within the B-tree index, wherein the index node is in the subset of index nodes; and changing the set of index nodes in which separator keys are locked.

6

6. One or more computer readable storage media including computer readable instructions that, when executed by a computing device, perform the method of claim 1 .

7

7. A method, comprising: placing a lock on a key prefix of a B-tree index, wherein the lock locks each key in a key range having the key prefix; and at least one additional set of features selected from the group consisting of: (a) deleting a key having the key prefix from the key range, wherein deleting the key includes: marking the key as a ghost record by a user transaction, the user transaction not requiring locking of the key's neighboring objects, the user transaction not requiring locking of any of the components of the key's neighboring objects; and eliminating the ghost record by a system transaction; (b) escalating the lock on the key prefix including upgrading the lock from a first intention lock to a first absolute lock; (c) de-escalating the lock on the key prefix including downgrading the lock from a second absolute lock to a second intention lock; (d) locking a subset of key prefixes for the B-tree index, wherein the key prefix is in the subset of key prefixes; and changing the subset of key prefixes to lock.

8

8. The method of claim 7 , the additional set of features comprising: deleting the key having the key prefix from the key range, wherein deleting the key includes: marking the key as the ghost record by the user transaction, the user transaction not requiring locking of the key's neighboring objects, the user transaction not requiring locking of any of the components of the key's neighboring objects; and eliminating the ghost record by the system transaction.

9

9. The method of claim 7 , the additional set of features comprising: escalating the lock on the key prefix including upgrading the lock from the first intention lock to the first absolute lock.

10

10. The method of claim 7 , the additional set of features comprising: de-escalating the lock on the key prefix including downgrading the lock from the second absolute lock to the second intention lock.

11

11. The method of claim 7 , the additional set of features comprising: locking the subset of key prefixes for the B-tree index, wherein the key prefix is in the subset of key prefixes; and changing the subset of key prefixes to lock.

12

12. One or more computer readable storage media including computer readable instructions that, when executed by a computing device, perform the method of claim 7 .

13

13. The method of claim 11 , the changing the subset of key prefixes to lock comprising a delayed granularity change.

14

14. The method of claim 11 , the changing the subset of key prefixes to lock comprising an immediate granularity change.

Classification Codes (CPC)

Cooperative Patent Classification codes for this invention. Click any code to explore related patents in that topic.

Patent Metadata

Filing Date

May 4, 2011

Publication Date

May 8, 2012

Want to explore more patents?

Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.

Citation & reuse

Analysis on this page is generated by Patentable — an AI-powered patent intelligence platform. AI-generated summaries, explanations, and analysis may be reused with attribution and a visible link back to the canonical URL below. Patent abstracts and claims are USPTO public domain.

Cite as: Patentable. “Hierarchical locking in B-tree indexes” (US-8176023). https://patentable.app/patents/US-8176023

© 2026 Patentable. All rights reserved.

Patentable is a research and drafting-assistant tool, not a law firm, and does not provide legal advice. Documents we generate are drafts for review by a licensed patent attorney.