jobs: we should make a single node in charge of jobs cleanup #57043
Labels
A-jobs
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
T-sql-foundations
SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Projects
In cockroachlabs/support#674 we see
gc-jobs
queries contending from multiple nodes, and thrashing. It'd be much better if a single node was in charge of running this jobs deletion query, not all the nodes. #57041 makes the situation better by hopefully reducing the thrashing when contention does happen, but still.I've discussed with @ajwerner that this would be a good time to introduce a general leases table for the cluster, and use it to assign responsibility for such background processes. The leases in the table could be implemented on top of the recent instances/sessions infrastructure (see
crdb_internal.sql_liveness_is_alive(session_id)
).Jira issue: CRDB-2877
The text was updated successfully, but these errors were encountered: