-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql,stats: use the jobs framework for CREATE STATISTICS
Prior to this commit, CREATE STATISTICS was a regular SQL statement and followed the standard logic of AST -> planNode -> DistSQL physical plan -> execution. This commit changes CREATE STATISTICS to use the jobs framework, and as a result the createStats planNode has been removed. There are several advantages to using the jobs framework: - Now CREATE STATISTICS jobs can easily be cancelled, paused and resumed from the Admin UI. - Nodes can adopt the job if the original gateway node fails. - We will be able to use the JobID to lock creation of automatic statistics, so that only one automatic statistics job can run at a time. Job adoption will ensure that a dead node never prevents progress by holding a lock on stats creation (implementation of locking will be saved for the next PR). Release note (sql change): CREATE STATISTICS now runs as a job instead of as a regular SQL statement.
- Loading branch information
Showing
20 changed files
with
2,138 additions
and
677 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.