Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

[Backport 5.3] Check for scheduled or processing jobs when scheduling permission syncs#61212

Merged
BolajiOlajide merged 2 commits into
5.3from
backport-61024-to-5.3
Mar 18, 2024
Merged

[Backport 5.3] Check for scheduled or processing jobs when scheduling permission syncs#61212
BolajiOlajide merged 2 commits into
5.3from
backport-61024-to-5.3

Conversation

@sourcegraph-release-bot

Copy link
Copy Markdown
Collaborator

Closes #61023

Fixes an issue where multiple permission sync jobs are scheduled for users and repositories at the same time.

The existing SQL queries don't take into account that a permissions sync could be in progress or queued when checking for users/repos with the oldest permissions, which leads to a lot of overlapping permission syncs being scheduled. This could cause significant delays in the permissions sync system as a whole, since a single permissions sync now turns into 5+ consecutive syncs for the same user.

Test plan

Verified on my local machine that multiple permission jobs are no longer scheduled for the same user/repo.


Backport 810289a from #61024

@sourcegraph-release-bot sourcegraph-release-bot requested review from a team and pjlast March 18, 2024 10:23
@sourcegraph-release-bot sourcegraph-release-bot added cla-signed backports team/source Tickets under the purview of Source - the one Source to graph it all backported-to-5.3 labels Mar 18, 2024
Comment thread CHANGELOG.md Outdated
@BolajiOlajide BolajiOlajide merged commit 6a1bb7c into 5.3 Mar 18, 2024
@BolajiOlajide BolajiOlajide deleted the backport-61024-to-5.3 branch March 18, 2024 11:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

backported-to-5.3 backports cla-signed team/source Tickets under the purview of Source - the one Source to graph it all

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants