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

Remove support for prefix matching in queues assigned to a worker #45

Merged
merged 1 commit into from
Nov 20, 2023

Conversation

rosa
Copy link
Member

@rosa rosa commented Nov 20, 2023

This would generate queries like

  WHERE `solid_queue_ready_executions.queue_name` LIKE 'prefix%'

that aren't performant enough due to the sorting by priority, so we've decided not to support these for now.

Thanks to @djmb for the assistance with this.

This would generate queries like
```
  WHERE `solid_queue_ready_executions.queue_name` LIKE 'prefix%'
```
that aren't performant enough due to the sorting by priority, so we've
decided not to support these for now.

Thanks to @djmb for the assistance with this.
@rosa rosa force-pushed the remove-prefix-wildcard-support branch from 85abb8e to 83362bd Compare November 20, 2023 20:42
@rosa rosa marked this pull request as ready for review November 20, 2023 20:43
@rosa rosa merged commit cd72097 into main Nov 20, 2023
4 checks passed
@rosa rosa deleted the remove-prefix-wildcard-support branch November 20, 2023 21:36
rosa added a commit that referenced this pull request Dec 1, 2023
This was removed in #45, as the
resulting queries for polling using `queue_name LIKE 'something%'` were very
slow as they prevented MySQL from using an index for ordering. The idea after
removing that was to support namespaces so we could combine a namespace with
a "*" for queue names, to have support for a single prefix. However, namespaces
felt a too big of a change just to accomodate for our staging and beta setups,
so I've brought this back, but this time with a different implementation,
based on fetching the list of queue names relevant for polling, filtering there
with the prefix. This query is very fast because it can use an existing index
starting with queue_name and apply the Loose Index Scan technique to examine
as many rows as distinct values there are.
rosa added a commit that referenced this pull request Dec 1, 2023
This was removed in #45, as the
resulting queries for polling using `queue_name LIKE 'something%'` were very
slow as they prevented MySQL from using an index for ordering. The idea after
removing that was to support namespaces so we could combine a namespace with
a "*" for queue names, to have support for a single prefix. However, namespaces
felt a too big of a change just to accomodate for our staging and beta setups,
so I've brought this back, but this time with a different implementation,
based on fetching the list of queue names relevant for polling, filtering there
with the prefix. This query is very fast because it can use an existing index
starting with queue_name and apply the Loose Index Scan technique to examine
as many rows as distinct values there are.
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