8000 jobs: we should make a single node in charge of jobs cleanup · Issue #57043 · cockroachdb/cockroach · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
jobs: we should make a single node in charge of jobs cleanup #57043
Open
@andreimatei

Description

@andreimatei

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-jobsC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0