IP Library › Granted Patent US 11,461,325
Granted Patent B2
US 11,461,325 · App. 17/333,358 · Granted Oct 4, 2022

Checkpoints in batch file processing

Inventors: Thierry Cruanes (San Mateo, CA); Igor Demura (San Mateo, CA); Varun Ganesh (San Mateo, CA); Prasanna Rajaperumal (San Mateo, CA); Libo Wang (Foster City, CA); Jiaqi Yan (San Mateo, CA)
Assignee: Snowflake Inc.
G06F16/24542G06F9/485G06F16/122G06F16/148G06F16/162G06F16/24539
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,461,325
App. No.
17/333,358
Granted
Oct 4, 2022
Kind
B2
Abstract

Embodiments of the present disclosure may provide a dynamic query execution model with fault tolerance and failure recovery techniques. Embodiments of the present disclosure may utilize checkpoints to map processed output files to their corresponding input files. Therefore, if an error occurs in processing one or more files, the system may only need to reschedule processing of selected file(s).

Claims (61)

1. A method comprising:

receiving, by one or more processors, an assignment of a batch from a query coordinator, the batch including a group of a set of files from a shared file queue;

storing a unique batch ID and information related to the batch in a staging area;

performing a first operator on the batch;

based on performing the first operator, generating a checkpoint signal;

determining a state condition of a second operator as being stateless;

based on the stateless condition of the second operator, performing the second operator and passing the checkpoint signal to a third operator without implementing barriers between batches;

determining a state condition of the third operator as being non-stateless;

based on the non-stateless condition of the third operator, clearing data associated with the third operator, implementing barriers between batches, and performing the third operator;

finalizing the stored information in the staging area;

generating a materialized result file as an output file associated with the batch;

uploading the materialized result file to a storage area from where the materialized result file is accessible to be scanned by the query coordinator; and

uploading a listing of the materialized result to an output shared file queue.

2. The method of claim 1 , further comprising:

generating a file registration request;

transmitting the file registration request to the query coordinator including the unique batch ID indicating that the batch has been processed; and

deleting the unique batch ID and information related to the batch stored in the staging area.

3. The method of claim 1 , wherein the first operator includes a table scan operator.

4. The method of claim 1 , wherein the third operator includes an insert operator.

5. The method of claim 1 , wherein the output file includes data corresponding only to the batch and no other batch.

6. A system comprising:

one or more processors of a machine; and

a memory storing instructions that, when executed by the one or more processors, cause the machine to perform operations comprising:

receiving an assignment of a batch an assignment of a batch from a query coordinator, the batch including a group of a set of files from a shared file queue;

storing a unique batch ID and information related to the batch in a staging area;;

performing a first operator on the batch;

based on performing the first operator, generating a checkpoint signal;

determining a state condition of a second operator as being stateless;

based on the stateless condition of the second operator, performing the second operator and passing the checkpoint signal to a third operator without implementing barriers between batches;

determining a state condition of the third operator as being non-stateless;

based on the non-stateless condition of the third operator, clearing data associated with the third operator, implementing barriers between batches, and performing the third operator;

finalizing the stored information in the staging area;

generating a materialized result file as an output file associated with the batch;

uploading the materialized result file to a storage area from where the materialized result file is accessible to be scanned by the query coordinator; and

uploading a listing of the materialized result to an output shared file queue.

7. The system of claim 6 , the operations further comprising:

transmitting the output file associated with the batch;

generating a file registration request; and

deleting the unique batch ID and information related to the batch.

8. The system of claim 6 , wherein the first operator includes a table scan operator.

9. The system of claim 6 , wherein the third operator includes an insert operator.

10. The system of claim 6 , wherein the output file includes data corresponding only to the batch and no other batch.

11. A machine-storage medium embodying instructions that, when executed by a machine, cause the machine to perform operations comprising:

receiving, by one or more processors, an assignment of a batch from a query coordinator, the batch including a group of a set of files from a shared file queue;

storing a unique batch ID and information related to the batch in a staging area;;

performing a first operator on the batch;

based on performing the first operator, generating a checkpoint signal;

determining a state condition of a second operator as being stateless;

based on the stateless condition of the second operator, performing the second operator and passing the checkpoint signal to a third operator without implementing barriers between batches;

determining a state condition of the third operator as being non-stateless;

based on the non-stateless condition of the third operator, clearing data associated with the third operator, implementing barriers between batches, and performing the third operator;

generating a materialized result file as an output file associated with the batch;

uploading the materialized result file to a storage area from where the materialized result file is accessible to be scanned by the query coordinator; and

uploading a listing of the materialized result to an output shared file queue.

12. The machine-storage medium of claim 11 , further comprising:

transmitting the output file associated with the batch;

generating a file registration request; and

deleting the unique batch ID and information related to the batch.

13. The machine-storage medium of claim 11 , wherein the first operator includes a table scan operator.

14. The machine-storage medium of claim 11 , wherein the third operator includes an insert operator.

15. The machine-storage medium of claim 11 , wherein the output file includes data corresponding only to the batch and no other batch.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 28, 2021
From: CRUANES, THIERRY; DEMURA, IGOR; GANESH, VARUN; RAJAPERUMAL, PRASANNA; WANG, LIBO; YAN, JIAQI
To: SNOWFLAKE INC.
Reel/Frame 056382/0733 →
Continuity (2)
Continuation 16889042 · Jun 1, 2020
Related Publication 20210374136A1 · Dec 2, 2021
Cited By (1)
US 12,216,656