-
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.
server: clean up sql session and instance on shutdown
Remove the sql server's system.sql_instance and sqlliveness.sqlliveness rows on sql server shut down. The original motivation for this change is it improves the behavior of DistSQL for serverless tenants. SQL servers would attempt to schedule DistSQL flows on sql_instance rows that belonged to shutdown servers. Cleaning up the session and instance have a hand full of small benefits. - The sql_instances pre-allocated in a region are less likely to run out and trigger the slow cold start path. - Resources leased by the session, like jobs, may be re-claimed more quickly after the server shuts down. Fixes: CC-9095 Release note: none
- Loading branch information
1 parent
cc9e0c6
commit ab2a286
Showing
12 changed files
with
325 additions
and
182 deletions.
There are no files selected for viewing
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
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
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.