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

Adopt omniqueue as a queue backend and remove our own in-memory queue implementation #1188

Merged
merged 3 commits into from
Feb 12, 2024

Conversation

svix-jplatte
Copy link
Member

@svix-jplatte svix-jplatte commented Feb 6, 2024

Depends on #1185 (merged), svix/omniqueue-rs#24.

I have deleted low-level tests for the in-memory queue since its basic functionality should be tested inside omniqueue, not here. Do we have tests for higher-level functionality that uses the in-memory queue backend in some scenarios?

The redis and SQS implementation should probably be replaced by the implementations found in Omniqueue in a follow-up PR, to keep this one reasonably small.

@svix-jplatte svix-jplatte requested a review from a team February 6, 2024 10:47
Base automatically changed from jplatte/redis-queue-refactor to main February 6, 2024 13:07
@svix-jplatte svix-jplatte force-pushed the jplatte/omniqueue-adoption branch 2 times, most recently from caea783 to 74e3d76 Compare February 7, 2024 15:48
@svix-james
Copy link
Contributor

LGTM, but somebody who was a bit more invested in the development of omniqueue than me should probably chime in.

For now the state machine is only used for the implementation of
run_with_retries, but it will be used directly in the next commit, to
get around limitations of run_with_retries.
@svix-jplatte svix-jplatte force-pushed the jplatte/omniqueue-adoption branch from dd732ce to 567657e Compare February 8, 2024 15:57
@svix-jplatte

This comment was marked as resolved.

@svix-jplatte svix-jplatte force-pushed the jplatte/omniqueue-adoption branch from 567657e to 2afa485 Compare February 8, 2024 16:12
@svix-jplatte svix-jplatte force-pushed the jplatte/omniqueue-adoption branch from 2afa485 to 39e16bb Compare February 8, 2024 16:12
@svix-jplatte svix-jplatte marked this pull request as ready for review February 12, 2024 10:19
@svix-onelson
Copy link
Contributor

Hm, even with the unbounded mpsc channel that the builtin in-memory queue used now adopted in omniqueue, some tests are still failing consistently, and with a super weird error message:

thread 'test_uid_across_users' panicked at library/alloc/src/raw_vec.rs:570:5:
capacity overflow

Plus a connection reset that I assume comes from the panic propagating up to hyper, which subsequently terminates the connection that the panicked task was serving.

@svix-jplatte did this get solved somehow?

Copy link
Contributor

@svix-onelson svix-onelson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@svix-jplatte
Copy link
Member Author

Yes, there was one place where usize::MAX was passed as a buffer / channel capacity. I just put in a 128 instead, I doubt the exact number matters much since the in-memory queue isn't supposed to be optimized right?

@svix-onelson svix-onelson merged commit 3a78289 into main Feb 12, 2024
4 checks passed
@svix-onelson svix-onelson deleted the jplatte/omniqueue-adoption branch February 12, 2024 18:16
@svix-onelson
Copy link
Contributor

in-memory queue isn't supposed to be optimized right?

Correct. It's more of a stub than anything else. Like a dummy (no-op) cache implementation.

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.

3 participants