IP Library Granted Patent US 11,809,451
Granted Patent B2
US 11,809,451 · App. 14/518,971 · Granted Nov 7, 2023

Caching systems and methods

Inventors: Benoit Dageville (Foster City, CA); Thierry Cruanes (San Mateo, CA); Marcin Zukowski (San Mateo, CA)
Assignee: Snowflake Inc.
G06F16/273A61F5/566G06F9/4881G06F9/5016G06F9/5044G06F9/5083G06F9/5088G06F16/148G06F16/1827G06F16/211G06F16/221G06F16/2365G06F16/2456G06F16/2471G06F16/24532G06F16/24545G06F16/24552G06F16/254G06F16/27G06F16/283G06F16/951G06F16/9535G06F16/9538H04L67/1095H04L67/1097H04L67/568
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 11,809,451
App. No.
14/518,971
Granted
Nov 7, 2023
Kind
B2
Abstract

Example caching systems and methods are described. In one implementation, a method identifies multiple files used to process a query and distributes each of the multiple files to a particular execution node to execute the query. Each execution node determines whether the distributed file is stored in the execution node's cache. If the execution node determines that the file is stored in the cache, it processes the query using the cached file. If the file is not stored in the cache, the execution node retrieves the file from a remote storage device, stores the file in the execution node's cache, and processes the query using the file.

Claims (73)

1. A method comprising:

receiving a query directed to database data stored across a plurality of shared storage devices;

referencing a metadata store to locate a set of files that comprises data that needs to be processed to respond to the query;

referencing the metadata store to determine whether the set of files is cached among execution nodes of an execution platform comprising a plurality of execution nodes, wherein the execution platform is separate from the metadata store and the plurality of shared storage devices;

in response to determining that at least a portion of the set of files is cached among the plurality of execution nodes, assigning by one or more processors, processing of one or more of the set of files to each of one or more execution nodes that have cached at least a portion of the set of files;

for each of the one or more assigned execution nodes:

determining, by the assigned execution node, whether the assigned one or more files is stored at least in part in a cache of the assigned execution node; and

in response to the assigned execution node determining the assigned one or more files is not entirely stored in the cache of the assigned execution node:

retrieving a missing portion of the assigned one or more files from one or more remote storage devices of the plurality of remote storage devices including the missing portion of the assigned one or more files, wherein the plurality of execution nodes are organized into one or more virtual warehouses having one or more logical mappings between them, and a virtual warehouse including the assigned execution node dynamically establishes a communication link with each of the one or more of the plurality of remote storage devices based at least in part on the query so that the assigned execution node may retrieve the missing portion;

storing, by the assigned execution node, the missing portion of the assigned one or more files in the cache of the assigned execution node so that the entire one or more files is stored in the cache of the assigned execution node, wherein a size and composition of the cache is adjusted to accommodate the missing portion of the assigned one or more files;

processing the query using the assigned one or more files stored in the cache of the assigned execution node; and

updating the metadata store to indicate the entire assigned one or more files is now cached in the cache of the assigned execution node;

wherein any of the set of files stored in the plurality of shared storage devices may be accessed by any of a plurality of execution nodes of the execution platform;

wherein any of the set of files stored in the plurality of shared storage devices may be stored in a cache of any of the plurality of execution nodes of the execution platform; and

wherein any of the set of files stored in the plurality of shared storage devices may be stored in a cache of multiple execution nodes of the plurality of execution nodes of the execution platform at one point in time; and

in response to a determination of a change in the number of execution nodes of the execution platform, wherein the change is creating a new execution node, the new execution node comprising a plurality of processors, wherein the cache varies among the plurality of processors, wherein a first subset of the plurality of processors comprises a minimal cache and a second subset of the plurality of processors comprises a cache providing faster input-output operations, reassign processing, among the changed number of execution nodes of the execution platform, of the set of files comprising data that needs to be processed to respond to the query.

2. The method of claim 1 , further comprising:

in response to the assigned execution node determining the assigned one or more files is entirely stored in the cache of the assigned execution node, processing, using one or more processors of the assigned execution node, the query using the assigned one or more files stored in the cache of the assigned execution node.

3. The method of claim 1 , wherein updating the metadata store to indicate the entire assigned one or more files is now cached in the assigned execution node comprises updating the metadata store to identify all files that are duplicated in the cache of the assigned execution node.

4. The method of claim 1 , further comprising determining, by the assigned execution node, whether to store the assigned one or more files in faster or slower memory by implementing a least recently used (LRU) algorithm.

5. The method of claim 4 , wherein implementing the LRU algorithm further comprises identifying one or more copies of the assigned one or more files to be removed from the cache.

6. The method of claim 1 , wherein the metadata store is separate and independently scalable from each of the resource manager, the plurality of shared storage devices, and the execution platform, and wherein the metadata store comprises a complete metadata listing of the database data stored across the plurality of shared storage devices and a complete listing of files cached in the plurality execution nodes of the execution platform.

7. The method of claim 1 , wherein each execution node of the execution platform comprises a cache, wherein the cache includes a first storage portion and a second storage portion, wherein the first storage portion is significantly faster than the second storage portion.

8. The method of claim 1 , wherein the query directed to the database data comprises a single instruction that is applied by the execution platform to each of the set of files substantially simultaneously.

9. The method of claim 1 , wherein each execution node of the plurality of execution nodes comprises at least one processor and at least one local cache caching a copy of at least a portion of the database data.

10. The method of claim 1 , further comprising:

in response to the assigned execution node determining the assigned one or more files is not stored in the cache of the assigned execution node, modifying, by the assigned execution node a database data structure of the retrieved copy of the assigned one or more files prior to storing the retrieved copy in the cache.

11. The method of claim 10 , wherein modifying the database data structure of the retrieved copy includes decrypting the retrieved copy.

12. The method of claim 10 , wherein modifying the database data structure of the retrieved copy includes decompressing the retrieved copy.

13. A system comprising:

a plurality of shared storage devices collectively storing database data;

a metadata store separate from the plurality of shared storage devices, the metadata store comprising metadata for the database data stored across the plurality of shared storage devices; and

one or more processors operatively coupled to the metadata store, the one or more processors to:

receive a query directed to the database data stored across the plurality of shared storage devices

reference the metadata store to locate a set of files that comprises data that needs to be processed to respond to the query;

reference the metadata store to determine whether the set of files is cached among execution nodes of an execution platform comprising a plurality of execution nodes, wherein the execution platform is separate from the metadata store and the plurality of shared storage devices; and

in response to determining that at least a portion of the set of files is cached among the plurality of execution nodes, assigning processing of one or more of the set of files to each of one or more execution nodes that have cached at least a portion of the set of files;

for each of the assigned execution nodes:

determine, by the assigned execution node, whether the assigned one or more files is stored at least in part in a cache of the assigned execution node; and

in response to the assigned execution node determining the assigned one or more files is not entirely stored in the cache of the assigned execution node:

retrieve a missing portion of the assigned one or more files from one or more of the plurality of remote storage devices including the missing portion of the assigned one or more files, wherein the plurality of execution nodes are organized into one or more virtual warehouses having one or more logical mappings between them, and a virtual warehouse including the assigned execution node dynamically establishes a communication link with each of the one or more of the plurality of shared storage devices based at least in part on the query so that the assigned execution node may retrieve the missing portion;

store, by the assigned execution node, the entire assigned one or more files in the cache of the assigned execution node, wherein a size and composition of the cache of the assigned execution node is adjusted to accommodate the missing portion of the assigned one or more files;

process the query using the assigned one or more files stored in the cache of the assigned execution node; and

update the metadata store to indicate the entire assigned one or more files is now cached in the cache of the assigned execution node;

wherein any of the set of files stored in the plurality of shared storage devices may be accessed by any of the plurality of execution nodes of the execution platform;

wherein any of the set of files stored in the plurality of shared storage devices may be stored in a cache of any of the plurality of execution nodes of the execution platform; and

wherein any of the set of files stored in the plurality of shared storage devices may be stored in a cache of multiple execution nodes of the plurality of execution nodes of the execution platform at one point in time; and

in response to a determination of a change in the number of execution nodes of the execution platform, wherein the change is creating a new execution node, the new execution node comprising a plurality of processors, wherein the cache varies among the plurality of processors, wherein a first subset of the plurality of processors comprises a minimal cache and a second subset of the plurality of processors comprises a cache providing faster input-output operations, reassign processing, among the changed number of execution nodes of the execution platform, of the set of files comprising data that needs to be processed to respond to the query.

14. The system of claim 13 , wherein each execution node of the execution platform comprises at least one local processor and at least one cache, wherein the at least one cache of each execution node comprises a memory device and a disk storage device.

15. The system of claim 14 , wherein the one or more processors are further to:

in response to the assigned execution node determining the entire assigned one or more files is stored in the cache of the assigned execution node, processing the query using the assigned one or more files stored in the cache of the assigned execution node.

16. The system of claim 13 , wherein each execution node of the execution platform is programmed to modify a data structure associated with a copy of a particular file assigned thereto prior to storing the copy in a cache thereof.

17. A non-transitory computer readable storage medium having instructions stored thereon that, when executed by one or more processors, cause the one or more processors to:

receive a query directed to database data stored across a plurality of shared storage devices;

reference a metadata store to locate a set of files that comprises data that needs to be processed to respond to the query;

reference the metadata store to determine whether the set of files is cached among execution nodes of an execution platform comprising a plurality of execution nodes, wherein the execution platform is separate from the metadata store and the plurality of shared storage devices;

in response to determining that at least a portion of the set of files is cached among the plurality of execution nodes, assigning by the one or more processors, processing of one or more of the set of files to each of one or more execution nodes that have cached at least a portion of the set of files;

for each of the assigned execution nodes:

determining, by the assigned execution node, whether the assigned one or more files is stored at least in part in a cache of the assigned execution node; and

in response to the assigned execution node determining the assigned one or more files is not entirely stored in the cache of the assigned execution node:

retrieving a missing portion of the assigned one or more files from one or more remote storage devices of the plurality of remote storage devices that include the missing portion, wherein the plurality of execution nodes are organized into one or more virtual warehouses having one or more logical mappings between them, and a virtual warehouse that includes the assigned execution node dynamically establishes a communication link with each of the one or more of the plurality of shared storage devices based at least in part on the query so that the assigned execution node may retrieve the missing portion;

storing, by the assigned execution node, the entire assigned one or more files in the cache of the assigned execution node, wherein a size and composition of the cache of the assigned execution node is adjusted to accommodate the missing portion of the assigned one or more files;

processing the query using the assigned one or more files stored in the cache of the assigned execution node; and

updating the metadata store to indicate the entire assigned one or more files is now cached in the cache of the assigned execution node;

wherein any of the set of files stored in the plurality of shared storage devices may be accessed by any of a plurality of execution nodes of the execution platform;

wherein any of the set of files stored in the plurality of shared storage devices may be stored in a cache of any of the plurality of execution nodes of the execution platform; and

wherein any of the set of files stored in the plurality of shared storage devices may be stored in a cache of multiple execution nodes of the plurality of execution nodes of the execution platform at one point in time; and

in response to a determination of a change in the number of execution nodes of the execution platform, wherein the change is creating a new execution node, the new execution node comprising a plurality of processors, wherein the cache varies among the plurality of processors, wherein a first subset of the plurality of processors comprises a minimal cache and a second subset of the plurality of processors comprises a cache providing faster input-output operations, reassign processing, among the changed number of execution nodes of the execution platform, of the set of files comprising data that needs to be processed to respond to the query.

18. The non-transitory computer readable storage media of claim 17 , wherein the database query statement comprises a single instruction that is applied by the plurality of execution nodes to applicable files of database data substantially simultaneously.

19. The non-transitory computer readable storage media of claim 18 , wherein the one or more processors are further to:

in response to the assigned execution node determining the assigned one or more files is entirely stored in the cache of the assigned execution node, process the query using the assigned one or more files stored in the cache of the assigned execution node.

20. The non-transitory computer readable storage media of claim 17 , wherein each execution node of the execution platform comprises at least one local processor and at least one cache, wherein the at least one cache of each execution node comprises a memory device and a disk storage device.

21. The non-transitory computer readable storage media of claim 17 , wherein each execution node of the execution platform is programmed to modify a data structure associated with a copy of a particular file assigned thereto prior to storing the copy in a cache thereof.

Assignments (2)
CHANGE OF NAME Recorded Apr 11, 2019
From: SNOWFLAKE COMPUTING, INC.
To: SNOWFLAKE INC.
Reel/Frame 049127/0027 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 22, 2014
From: DAGEVILLE, BENOIT; CRUANES, THIERRY; ZUKOWSKI, MARCIN
To: SNOWFLAKE COMPUTING INC.
Reel/Frame 034009/0077 →
Continuity (2)
Provisional Application 61941986 · Feb 19, 2014
Related Publication 20150234922A1 · Aug 20, 2015