Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jobs: we should make a single node in charge of jobs cleanup #57043

Open
andreimatei opened this issue Nov 24, 2020 · 2 comments
Open

jobs: we should make a single node in charge of jobs cleanup #57043

andreimatei opened this issue Nov 24, 2020 · 2 comments
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)

Comments

@andreimatei
Copy link
Contributor

andreimatei commented Nov 24, 2020

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

@andreimatei andreimatei added this to Triage in SQL Foundations via automation Nov 24, 2020
@blathers-crl
Copy link

blathers-crl bot commented Nov 24, 2020

Hi @andreimatei, I've guessed the C-ategory of your issue and suitably labeled it. Please re-label if inaccurate.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

@blathers-crl blathers-crl bot added the C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) label Nov 24, 2020
@thoszhang thoszhang moved this from Triage to Backlog in SQL Foundations Nov 24, 2020
@jlinder jlinder added the T-sql-schema-deprecated Use T-sql-foundations instead label Jun 16, 2021
@postamar postamar removed this from Backlog in SQL Foundations Mar 8, 2022
@postamar postamar added this to Triage in Jobs via automation Mar 8, 2022
@blathers-crl blathers-crl bot added the T-jobs label Mar 8, 2022
@miretskiy miretskiy moved this from Triage to Backlog in Jobs Mar 23, 2022
@miretskiy
Copy link
Contributor

@ajwerner do you know if we are still susceptible to this? I recall lots of changes that dropped for update clauses, etc...

@exalate-issue-sync exalate-issue-sync bot added T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) and removed T-sql-schema-deprecated Use T-sql-foundations instead T-jobs labels May 10, 2023
@blathers-crl blathers-crl bot added this to Triage in SQL Foundations May 10, 2023
@rafiss rafiss moved this from Triage [old] to Cold storage in SQL Foundations May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
SQL Foundations
  
Cold storage
Jobs
Backlog
Development

No branches or pull requests

3 participants