-
Notifications
You must be signed in to change notification settings - Fork 4.1k
*: ban the go keyword in non-test code #58164
Copy link
Copy link
Open
Labels
C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)S-3-productivitySevere issues that impede the productivity of CockroachDB developers.Severe issues that impede the productivity of CockroachDB developers.T-server-and-securityDB Server & SecurityDB Server & SecurityT-sql-queriesSQL Queries TeamSQL Queries Teamquality-fridayA good issue to work on on Quality FridayA good issue to work on on Quality Friday
Description
Misuse of the go keyword is problematic for a server that desires to be HA like CockroachDB: a panic-causing stack on the resultant goroutine will crash the entire process without custom crash handling.
There are already several wrappers for go throughout the codebase, such as Tasks and Workers creatable by the stopper. These wrappers perform cleanup and report errors to sentry, and can be extended over time. Unfortunately, they're not used consistently, and their use is not enforced.
This ticket tracks removing the go keyword from non-test code, except for the packages that implement the wrappers, and adding a linter that bans direct use of the go keyword except for in those places.
Jira issue: CRDB-3425
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)S-3-productivitySevere issues that impede the productivity of CockroachDB developers.Severe issues that impede the productivity of CockroachDB developers.T-server-and-securityDB Server & SecurityDB Server & SecurityT-sql-queriesSQL Queries TeamSQL Queries Teamquality-fridayA good issue to work on on Quality FridayA good issue to work on on Quality Friday
Type
Projects
Status
Bugs to Fix