Making parallel execution of structured query language statements fault-tolerant
First Claim
1. A method comprising:
- a particular consumer slave, which receives input rows from producer slaves during parallel processing of a query, processing said input rows as said particular consumer slave receives said input rows;
said particular consumer slave storing output rows, which said particular consumer slave produces by processing said input rows, into a buffer maintained in volatile memory;
determining that all the producer slaves from which the particular consumer slave receives said input rows have finished sending rows to the particular consumer slave;
in response to determining that all the producer slaves from which the particular consumer slave receives said input rows have finished sending rows to the particular consumer slave, storing a copy of rows from the buffer that were stored in the buffer by the particular consumer slave;
wherein said processing comprises performing one or more query operations from a single data flow operator that specifies a set of query operations that are executable on a set of consumer slaves, including the particular consumer slave, without redistributing rows processed by said set of consumer slaves to an other consumer slave to perform said set of one or more query operations; and
wherein said method is performed in a system in which output rows are stored into buffers by consumer slaves at outputs of data flow operators.
1 Assignment
0 Petitions
Accused Products
Abstract
Parallel execution of SQL statements is made fault-tolerant. Specifically, during parallel query processing, a new row source is created that allows checkpoints to be stored at certain points in the query processing. If a failure occurs, then the query can be restarted from the most recent checkpoint (rather than from the very beginning of the query). The checkpoints are implemented at operation boundaries where rows need to be redistributed among processes. These are natural checkpoint locations because (1) each subsequent operation can proceed from the output of the previous operation, which is stored as a checkpoint, and (2) these operation completions tend to be points in the computation where the query state is minimized, thus minimizing checkpoint storage requirements.
-
Citations
18 Claims
-
1. A method comprising:
-
a particular consumer slave, which receives input rows from producer slaves during parallel processing of a query, processing said input rows as said particular consumer slave receives said input rows; said particular consumer slave storing output rows, which said particular consumer slave produces by processing said input rows, into a buffer maintained in volatile memory; determining that all the producer slaves from which the particular consumer slave receives said input rows have finished sending rows to the particular consumer slave; in response to determining that all the producer slaves from which the particular consumer slave receives said input rows have finished sending rows to the particular consumer slave, storing a copy of rows from the buffer that were stored in the buffer by the particular consumer slave; wherein said processing comprises performing one or more query operations from a single data flow operator that specifies a set of query operations that are executable on a set of consumer slaves, including the particular consumer slave, without redistributing rows processed by said set of consumer slaves to an other consumer slave to perform said set of one or more query operations; and wherein said method is performed in a system in which output rows are stored into buffers by consumer slaves at outputs of data flow operators. - View Dependent Claims (2, 3, 4)
-
-
5. A method comprising:
-
creating a query execution plan for a query; wherein creating the query execution plan comprises creating two or more data flow operators that each specify a set of query operations that are executable on a set of consumer slaves without redistributing rows processed by said set of consumer slaves to any other consumer slave to perform said set of one or more query operations; selecting one or more outputs of the two or more data flow operators at which to place fault-tolerance buffers; placing fault-tolerance buffers only at each of the said one or more outputs of the data flow operators without placing any fault-tolerance buffers at any operator output that is not a data flow operator output; in response to detecting a fault during processing of the query, determining a most recent checkpoint stored to non-volatile storage from a fault-tolerance buffer of said fault-tolerance buffers; restoring a query state based on information contained in said checkpoint; sending, to a plurality of producer slaves, rows that are contained in said checkpoint; and said producer slaves processing said rows and sending results of said processing to a plurality of consumer slaves that process said results while said producer slaves are processing said rows, thereby restarting execution said query execution plan from a point after completion of a last data flow operator at which a checkpoint was made without re-performing work performed for any data flow operators preceding or including said last data flow operator. - View Dependent Claims (6, 7, 8, 9)
-
-
10. A non-transitory computer-readable medium storing instructions which, when executed by one or more processors, cause performance of a method comprising steps of:
-
a particular consumer slave, which receives input rows from producer slaves during parallel processing of a query, processing said input rows as said particular consumer slave receives said input rows; said particular consumer slave storing output rows, which said particular consumer slave produces by processing said input rows, into a buffer maintained in volatile memory; determining that all the producer slaves from which the particular consumer slave receives said input rows have finished sending rows to the particular consumer slave; in response to determining that all the producer slaves from which the particular consumer slave receives said input rows have finished sending rows to the particular consumer slave, storing a copy of rows from the buffer that were stored in the buffer by the particular consumer slave; wherein said processing comprises performing one or more query operations from a single data flow operator that specifies a set of query operations that are executable on a set of consumer slaves, including the particular consumer slave, without redistributing rows processed by said set of consumer slaves to any other consumer slave to perform said set of one or more query operations; and wherein said method is performed in a system in which output rows are stored into buffers by consumer slaves at outputs of data flow operators. - View Dependent Claims (11, 12, 13)
-
-
14. A non-transitory computer-readable medium storing instructions which, when executed by one or more processors, cause performance of a method comprising steps of:
-
creating a query execution plan for a query; wherein creating the query execution plan comprises creating two or more data flow operators that each specify a set of query operations that are executable on a set of consumer slaves without redistributing rows processed by said set of consumer slaves to any other consumer slave to perform said set of one or more query operations; selecting one or more outputs of the two or more data flow operators at which to place fault-tolerance buffers; placing fault-tolerance buffers only at each of the said one or more outputs of the data flow operators without placing any fault-tolerance buffers at any operator output that is not a data flow operator output; in response to detecting a fault during processing of the query, determining a most recent checkpoint stored to non-volatile storage from a fault-tolerance buffer of said fault-tolerance buffers; restoring a query state based on information contained in said checkpoint; sending, to a plurality of producer slaves, rows that are contained in said checkpoint; and said producer slaves processing said rows and sending results of said processing to a plurality of consumer slaves that process said results while said producer slaves are processing said rows, thereby restarting execution said query execution plan from a point after completion of a last data flow operator at which a checkpoint was made without re-performing work performed for an data flow a operators preceding or including said last data flow operator. - View Dependent Claims (15, 16, 17, 18)
-
Specification