IP Library Granted Patent US 12,271,361
Granted Patent B2
US 12,271,361 · App. 17/407,993 · Granted Apr 8, 2025

Multi-tenant partitioned data store using key/value buckets

Inventors: Igor Fedorenko (Toronto, CA); Helen Kwong (Danville, CA); Benjamin Busjaeger (San Carlos, CA)
Assignee: Salesforce, Inc.
G06F16/2255
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 12,271,361
App. No.
17/407,993
Filed
Aug 20, 2021
Granted
Apr 8, 2025
Kind
B2
Art Unit
2165
USPC
707/747
Abstract

Techniques are disclosed relating to multi-tenant database systems with underlying key/value storage. In some embodiments, a computing system generates first logical table information for a first portion of a multi-tenant dataset corresponding to a first tenant and second logical table information for a second portion of the dataset corresponding to a second tenant. The system may store the first and second logical tables using non-relational key/value data structures in one or more storage elements, including: storing entries from the first logical table across a first set of multiple key/value store buckets and storing entries from the second logical table across a second set of multiple key/value store buckets. Disclosed techniques may reduce performance issues due to hotspots while allowing efficient data access for a given tenant by limiting the number of buckets per tenant, relative to traditional techniques.

Claims (54)

1. A method, comprising:

accessing, by a computing system, a multi-tenant dataset that includes a relational database table in which multiple tenants share one or more columns and a first tenant implements at least one added custom column;

processing, by the computing system, the multi-tenant dataset to migrate the relational database table to non-relational underlying storage and divide the database table, including:

generating first logical table information that specifies a first logical table for a first portion of the dataset corresponding to the first tenant including the at least one added custom column;

generating second logical table information that specifies a second logical table for a second portion of the dataset corresponding to a second tenant; and

storing the first and second logical tables using non-relational key/value data structures in one or more storage elements, including:

storing entries from the first logical table for the first tenant across a first set of multiple key/value store buckets;

storing entries from the second logical table for the second tenant across a second set of multiple key/value store buckets; and

generating internal identifiers for key/value storage for names associated with the first and second logical tables according to a mapping function, wherein:

a given internal identifier uses a smaller number of bits than its corresponding name, thereby reducing storage size relative to utilizing the names for key/value storage; and

the mapping function preserves ordering among keys for a given bucket; and

retrieving, by the computing system, values from the first set of multiple key/value store buckets based on a query from the first tenant that specifies one or more keys.

2. The method of claim 1 , wherein entries in respective key/value store buckets are sortable.

3. The method of claim 1 , wherein the first and second sets of multiple key/value store buckets at least partially overlap.

4. The method of claim 1 , wherein the storing uses partition keys to spread entries from the first and second logical tables across multiple key/value store buckets.

5. The method of claim 4 , wherein the partition keys include a logical table identifier and a bucket number.

6. The method of claim 5 , further comprising generating bucket numbers using a stable hash function.

7. The method of claim 1 , wherein the mapping function provides consistency such that a first name value used during a first time interval and re-used during a second time interval is mapped to two different internal identifiers during the different first and second time intervals.

8. The method of claim 1 , further comprising:

wherein the mapping function encodes output values using a classification field that indicates a size and range of the output value.

9. A system, comprising:

one or more processors; and

one or more storage elements having program instructions stored thereon that are capable of being executed by the one or more processors to cause operations comprising:

accessing a multi-tenant dataset that includes a relational database table in which multiple tenants share one or more columns and a first tenant implements at least one added custom column;

processing the multi-tenant dataset to migrate the relational database table to non-relational underlying storage and divide the database table, including:

generating first logical table information that specifies a first logical table for a first portion of the dataset corresponding to the first tenant including the at least one added custom column;

generating second logical table information that specifies a second logical table for a second portion of the dataset corresponding to a second tenant; and

storing the first and second logical tables using non-relational key/value data structures in one or more storage elements, including:

storing entries from the first logical table for the first tenant across a first set of multiple key/value store buckets;

storing entries from the second logical table for the second tenant across a second set of multiple key/value store buckets; and

generating internal identifiers for key/value storage for names associated with the first and second logical tables according to a mapping function, wherein:

a given internal identifier uses a smaller number of bits than its corresponding name, thereby reducing storage size relative to utilizing the names for key/value storage; and

the mapping function preserves ordering among keys for a given bucket; and

retrieving values from the first set of multiple key/value store buckets based on a query from the first tenant that specifies one or more keys.

10. The system of claim 9 , wherein entries in respective key/value store buckets are sortable.

11. The system of claim 9 , wherein the storing uses partition keys to spread entries from the first and second logical tables across multiple key/value store buckets.

12. A non-transitory computer-readable medium having computer instructions stored thereon that are capable of being executed by a computer system to cause operations comprising:

accessing a multi-tenant dataset that includes a relational database table in which multiple tenants share one or more columns and a first tenant implements at least one added custom column;

processing the multi-tenant dataset to migrate the relational database table to non-relational underlying storage and divide the database table, including:

generating first logical table information that specifies a first logical table for a first portion of the dataset corresponding to the first tenant including the at least one added custom column;

generating second logical table information that specifies a second logical table for a second portion of the dataset corresponding to a second tenant; and

storing the first and second logical tables using non-relational key/value data structures in one or more storage elements, including:

storing entries from the first logical table for the first tenant across a first set of multiple key/value store buckets;

storing entries from the second logical table for the second tenant across a second set of multiple key/value store buckets; and

generating internal identifiers for key/value storage for names associated with the first and second logical tables according to a mapping function, wherein:

a given internal identifier uses a smaller number of bits than its corresponding name, thereby reducing storage size relative to utilizing the names for key/value storage; and

the mapping function preserves ordering among keys for a given bucket; and

retrieving, by the computing system, values from the first set of multiple key/value store buckets based on a query from the first tenant that specifies one or more keys.

13. The non-transitory computer-readable medium of claim 12 , wherein entries in respective key/value store buckets are sortable.

14. The non-transitory computer-readable medium of claim 12 , wherein the first and second sets of multiple key/value store buckets at least partially overlap.

15. The non-transitory computer-readable medium of claim 12 , wherein the storing uses partition keys to spread entries from the first and second logical tables across multiple key/value store buckets.

16. The non-transitory computer-readable medium of claim 15 , wherein the partition keys include a logical table identifier and a bucket number.

17. The non-transitory computer-readable medium of claim 16 , wherein the operations further comprise generating bucket numbers using a stable hash function.

18. The non-transitory computer-readable medium of claim 12 , wherein the mapping function provides consistency such that a first name value used during a first time interval and re-used during a second time interval is mapped to two different internal identifiers during the different first and second time intervals.

Assignments (2)
CHANGE OF NAME Recorded Mar 7, 2025
From: SALESFORCE.COM, INC.
To: SALESFORCE, INC.
Reel/Frame 070441/0183 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 20, 2021
From: FEDORENKO, IGOR; KWONG, HELEN; BUSJAEGER, BENJAMIN
To: SALESFORCE.COM, INC.
Reel/Frame 057243/0817 →
Continuity (1)
Related Publication 20230067776A1 · Mar 2, 2023
References Cited (9)
US 9734180B1 · Graham · 2017 [cited by examiner]
US 10042876B2 · Derby · 2018 [cited by examiner]
US 10318491B1 · Graham · 2019 [cited by examiner]
US 11061930B1 · Golding · 2021 [cited by examiner]
US 20100030995A1 · Wang · 2010 [cited by examiner]
US 20110282864A1 · Collins · 2011 [cited by examiner]
US 20190004863A1 · Mainali · 2019 [cited by examiner]
US 20190392047A1 · Sorenson, III · 2019 [cited by examiner]
US 20200042538A1 · Stewart · 2020 [cited by examiner]