Skip to content

Conversation

@tsukasa-au
Copy link

The previous implementation of the sync untracked feature would attempt to run multiple queries in parallel. The knex framework appears to use a separate connection for each query by default (unless the queries are tied together by a transaction). When using sqlite, there is only a single connection available in the knex database pool, causing this feature to deadlock (when the initial query can not return all results immediatly).

In this change, we switch to doing all of these queries in a transaction, which causes all quries to occur on a single connection.

The previous implementation of the sync untracked feature would attempt
to run multiple queries in parallel. The `knex` framework appears to use
a separate connection for each query by default (unless the queries are
tied together by a transaction). When using sqlite, there is only a
single connection available in the knex database pool, causing this
feature to deadlock (when the initial query can not return all results
immediatly).

In this change, we switch to doing all of these queries in a
transaction, which causes all quries to occur on a single connection.
@auto-assign auto-assign bot requested a review from NGPixel October 17, 2025 02:34
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.

2 participants