IP Library › Granted Patent US 12,314,136
Granted Patent B2
US 12,314,136 · App. 18/326,471 · Granted May 27, 2025

Query retries using quiesce notifications

Inventors: Ata E. Husain Bohra (San Jose, CA); Daniel Geoffrey Karp (San Carlos, CA)
Assignee: Snowflake Inc.
G06F11/1435G06F9/5022G06F9/5038G06F9/505G06F16/245G06F16/256
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,314,136
App. No.
18/326,471
Granted
May 27, 2025
Kind
B2
Abstract

The subject technology selects a candidate compute service manager from a set of instances of compute service managers to issue a query restart by selecting an execution node, the execution node being included in a particular virtual warehouse associated with the candidate compute service manager, the selecting facilitating improving utilization of cluster resources and improving query execution on the selected candidate compute service manager. The subject technology receives a notification indicating that a particular compute service manager has been quiesced. The subject technology determines a set of jobs that are not yet scheduled for execution and eligible for query retry. The subject technology determines a second set of jobs from the set of jobs to send at least another compute service manager for execution. The subject technology sends the second set of jobs to at least another compute service manager for execution.

Claims (80)

1. A network-based database system comprising:

at least one hardware processor; and

a memory storing instructions that cause the at least one hardware processor to perform operations comprising:

determining, from a set of instances of compute service managers, a set of candidate compute service managers that are safe from quiescing, the determining based at least in part on determining that each of the set of candidate compute service managers has yet to undergo upgrading, downgrading, rebalancing for clusters, cluster scaling, or a cluster instance type change;

selecting a candidate compute service manager from the set of candidate compute service managers to issue a query restart by selecting an execution node, the execution node being included in a particular virtual warehouse associated with the candidate compute service manager;

receiving a notification indicating that a particular compute service manager has been quiesced;

determining a set of jobs that are not yet scheduled for execution and eligible for query retry;

determining a second set of jobs from the set of jobs to send at least another compute service manager for execution, the at least another compute service manager being selected based on an amount of resources that at least another compute service manager is currently utilizing;

sending the second set of jobs to the at least another compute service manager for execution, the sending enabling better utilization of cluster resources; and

executing, by the at least another compute service manager, the second set of jobs.

2. The network-based database system of claim 1 , wherein determining the set of jobs that are not yet scheduled for execution and eligible for query retry comprises:

identifying a particular job that has yet to be schedules in a particular virtual warehouse; and

ensuring that the particular job is not performed by an execution node while determining the set of jobs.

3. The network-based database system of claim 1 , wherein determining the set of jobs that are not yet scheduled for execution and eligible for query retry comprises:

filtering out at least one job that is running on a virtual warehouse based on a set of heuristics.

4. The network-based database system of claim 3 , wherein the set of heuristics comprises a percentage completion based on assigned files and scanned files details per job, wherein the percentage completion is further based on a number of step jobs executed or scheduled up to a current time.

5. The network-based database system of claim 1 , wherein the operations further comprise:

prior to selecting the candidate compute service manager, retrieving information related to the set of instances of compute service managers, each instance of a particular compute service manager being associated with a set of virtual warehouses, each virtual warehouse from the set of virtual warehouses including a particular set of execution nodes; and

sorting the set of candidate compute service managers based at least in part on each workload of each of the set of candidate compute service managers.

6. The network-based database system of claim 5 , wherein sorting the set of candidates based on the workload comprises:

determining a current workload of each instance from the set of instances of the compute service managers, the current workload comprising a number of jobs that the each instance has performed within a window of time or a number of jobs that is still in a queue to perform; and

sorting each instance based at least in part on the current workload corresponding to each instance, the sorting based on an ascending order from least loaded to most loaded.

7. The network-based database system of claim 6 , wherein the current workload comprises a number of jobs that a particular instance of the compute service manager has performed within a window of time or a number of jobs that is still in a queue to perform.

8. The network-based database system of claim 6 , wherein the current workload is based at least in part on metrics over a previous window of time that includes an average of statistics or metrics involving a single virtual warehouse.

9. The network-based database system of claim 1 , wherein selecting the candidate compute service manager to issue the query restart by selecting the execution node comprises:

selecting the execution node among a top threshold percentage of candidate nodes.

10. The network-based database system of claim 1 , wherein the operations further comprise:

requesting particular information regarding an instance identifier of a compute service manager instance to a particular job.

11. A method comprising:

determining, from a set of instances of compute service managers, a set of candidate compute service managers that are safe from quiescing, the determining based at least in part on determining that each of the set of candidate compute service managers has yet to undergo upgrading, downgrading, rebalancing for clusters, cluster scaling, or a cluster instance type change;

selecting a candidate compute service manager from the set of candidate compute service managers to issue a query restart by selecting an execution node, the execution node being included in a particular virtual warehouse associated with the candidate compute service manager;

receiving a notification indicating that a particular compute service manager has been quiesced;

determining a set of jobs that are not yet scheduled for execution and eligible for query retry;

determining a second set of jobs from the set of jobs to send at least another compute service manager for execution, the at least another compute service manager being selected based on an amount of resources that at least another compute service manager is currently utilizing;

sending the second set of jobs to at least another compute service manager for execution, the sending enabling better utilization of cluster resources; and

executing, by the at least another compute service manager, the second set of jobs.

12. The method of claim 11 , wherein determining the set of jobs that are not yet scheduled for execution and eligible for query retry comprises:

identifying a particular job that has yet to be schedules in a particular virtual warehouse; and

ensuring that the particular job is not performed by an execution node while determining the set of jobs.

13. The method of claim 11 , wherein determining the set of jobs that are not yet scheduled for execution and eligible for query retry comprises:

filtering out at least one job that is running on a virtual warehouse based on a set of heuristics.

14. The method of claim 13 , wherein the set of heuristics comprises a percentage completion based on assigned files and scanned files details per job, wherein the percentage completion is further based on a number of step jobs executed or scheduled up to a current time.

15. The method of claim 11 , further comprising:

prior to selecting the candidate compute service manager, retrieving information related to the set of instances of compute service managers, each instance of a particular compute service manager being associated with a set of virtual warehouses, each virtual warehouse from the set of virtual warehouses including a particular set of execution nodes; and

sorting the set of candidate compute service managers based at least in part on each workload of each of the set of candidate compute service managers.

16. The method of claim 15 , wherein sorting the set of candidates based on the workload comprises:

determining a current workload of each instance from the set of instances of the compute service managers, the current workload comprising a number of jobs that the each instance has performed within a window of time or a number of jobs that is still in a queue to perform; and

sorting each instance based at least in part on the current workload corresponding to each instance, the sorting based on an ascending order from least loaded to most loaded.

17. The method of claim 16 , wherein the current workload comprises a number of jobs that a particular instance of the compute service manager has performed within a window of time or a number of jobs that is still in a queue to perform.

18. The method of claim 16 , wherein the current workload is based at least in part on metrics over a previous window of time that includes an average of statistics or metrics involving a single virtual warehouse.

19. The method of claim 11 , wherein selecting the candidate compute service manager to issue the query restart by selecting the execution node comprises:

selecting the execution node among a top threshold percentage of candidate nodes.

20. The method of claim 11 , further comprising:

requesting particular information regarding an instance identifier of a compute service manager instance to a particular job.

21. A computer-storage medium comprising instructions that, when executed by a processor, configure the processor to perform operations comprising:

determining, from a set of instances of compute service managers, a set of candidate compute service managers that are safe from quiescing, the determining based at least in part on determining that each of the set of candidate compute service managers has yet to undergo upgrading, downgrading, rebalancing for clusters, cluster scaling, or a cluster instance type change;

selecting a candidate compute service manager from the set of candidate compute service managers to issue a query restart by selecting an execution node, the execution node being included in a particular virtual warehouse associated with the candidate compute service manager;

receiving a notification indicating that a particular compute service manager has been quiesced;

determining a set of jobs that are not yet scheduled for execution and eligible for query retry;

determining a second set of jobs from the set of jobs to send at least another compute service manager for execution, the at least another compute service manager being selected based on an amount of resources that at least another compute service manager is currently utilizing;

sending the second set of jobs to at least another compute service manager for execution, the sending enabling better utilization of cluster resources; and

executing, by the at least another compute service manager, the second set of jobs.

22. The computer-storage medium of claim 21 , wherein determining the set of jobs that are not yet scheduled for execution and eligible for query retry comprises:

identifying a particular job that has yet to be schedules in a particular virtual warehouse; and

ensuring that the particular job is not performed by an execution node while determining the set of jobs.

23. The computer-storage medium of claim 21 , wherein determining the set of jobs that are not yet scheduled for execution and eligible for query retry comprises:

filtering out at least one job that is running on a virtual warehouse based on a set of heuristics.

24. The computer-storage medium of claim 23 , wherein the set of heuristics comprises a percentage completion based on assigned files and scanned files details per job, wherein the percentage completion is further based on a number of step jobs executed or scheduled up to a current time.

25. The computer-storage medium of claim 21 , wherein the operations further comprise:

prior to selecting the candidate compute service manager, retrieving information related to the set of instances of compute service managers, each instance of a particular compute service manager being associated with a set of virtual warehouses, each virtual warehouse from the set of virtual warehouses including a particular set of execution nodes; and

sorting the set of candidate compute service managers based at least in part on each workload of each of the set of candidate compute service managers.

26. The computer-storage medium of claim 25 , wherein sorting the set of candidates based on the workload comprises:

determining a current workload of each instance from the set of instances of the compute service managers, the current workload comprising a number of jobs that the each instance has performed within a window of time or a number of jobs that is still in a queue to perform; and

sorting each instance based at least in part on the current workload corresponding to each instance, the sorting based on an ascending order from least loaded to most loaded.

27. The computer-storage medium of claim 26 , wherein the current workload comprises a number of jobs that a particular instance of the compute service manager has performed within a window of time or a number of jobs that is still in a queue to perform.

28. The computer-storage medium of claim 26 , wherein the current workload is based at least in part on metrics over a previous window of time that includes an average of statistics or metrics involving a single virtual warehouse.

29. The computer-storage medium of claim 21 , wherein selecting the candidate compute service manager to issue the query restart by selecting the execution node comprises:

selecting the execution node among a top threshold percentage of candidate nodes.

30. The computer-storage medium of claim 21 , wherein the operations further comprise:

requesting particular information regarding an instance identifier of a compute service manager instance to a particular job.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 31, 2023
From: BOHRA, ATA E. HUSAIN; KARP, DANIEL GEOFFREY
To: SNOWFLAKE INC.
Reel/Frame 063811/0051 →
Continuity (4)
Continuation 17823877 · Aug 31, 2022
Continuation 17647687 · Jan 11, 2022
Provisional Application 63228075 · Jul 31, 2021
Related Publication 20230305928A1 · Sep 28, 2023
References Cited (16)
US 10860450B1 · Dageville et al. · 2020 [cited by applicant]
US 11507465B1 · Husain Bohra et al. · 2022 [cited by applicant]
US 11704200B2 · Husain Bohra et al. · 2023 [cited by applicant]
US 20050047420A1 · Tanabe et al. · 2005 [cited by applicant]
US 20090300210A1 · Ferris · 2009 [cited by examiner]
US 20160026952A1 · Cancilla et al. · 2016 [cited by applicant]
US 20220050714A1 · Grimshaw et al. · 2022 [cited by applicant]
US 20230030636A1 · Husain Bohra et al. · 2023 [cited by applicant]
U.S. Appl. No. 17/647,687, now U.S. Pat. No. 11,507,465, filed Jan. 11, 2022, Query Retry Using Quiesce Notification. [cited by applicant]
U.S. Appl. No. 17/823,877, now U.S. Pat. No. 11,704,200, filed Aug. 31, 2022, Quiesce Notifications for Query Retries. [cited by applicant]
“U.S. Appl. No. 17/647,687, Non Final Office Action mailed Mar. 30, 2022”, 17 pages. [cited by applicant]
“U.S. Appl. No. 17/647,687, Response filed Jun. 29, 2022 to Non Final Office Action mailed Mar. 30, 2022”, 16 pages. [cited by applicant]
“U.S. Appl. No. 17/647,687, Notice of Allowance mailed Aug. 10, 2022”, 5 pages. [cited by applicant]
“U.S. Appl. No. 17/823,877, Non Final Office Action mailed Nov. 10, 2022”, 7 pages. [cited by applicant]
“U.S. Appl. No. 17/823,877, Response filed Feb. 9, 2023 to Non Final Office Action mailed Nov. 10, 2022”, 11 pages. [cited by applicant]
“U.S. Appl. No. 17/823,877, Notice of Allowance mailed Mar. 3, 2023”, 5 pages. [cited by applicant]