Skip to content

Use a separate DB connection pool and execution context for task rebuilding#1252

Draft
jake-low wants to merge 1 commit into
mainfrom
jlow/separate-task-build-pools
Draft

Use a separate DB connection pool and execution context for task rebuilding#1252
jake-low wants to merge 1 commit into
mainfrom
jlow/separate-task-build-pools

Conversation

@jake-low

@jake-low jake-low commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

As discussed in Slack. This introduces a new DB connection pool called background, and a new thread pool / execution context called task-builder-dispatcher which are used for building (or rebuilding) challenge tasks. The separate DB pool means that the default pool won't be exhausted so requests can still be served, and the separate thread pool means that if a burst of rebuilds are requested at once, only a fixed number will be allowed to progress (equal to the pool size) and the rest will queue up rather than entering a fail-and-retry loop.

This should hopefully help alleviate the issue we've been seeing where API requests time out periodically during times when some user is requesting a whole bunch of challenges be rebuilt in a short burst.

@sonarqubecloud

sonarqubecloud Bot commented Jul 3, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant