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

Start mission queue check gets stuck if two requests received at the same time #693

Open
andchiind opened this issue Jan 14, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@andchiind
Copy link
Contributor

Describe the bug
If two requests to start a mission are received at the same time then the first will succeed but the second one will be trying to wait for a response on the queue that will never arrive.

To Reproduce
Run two missions within a couple of milliseconds.

Expected behavior
Thread number two should detect that an attempt to start a mission has already been made. This can be done in several ways, but the important thing is that a thread safe object should represent if the statemachine is trying to initiate a mission. In the worst case, if the queue times out then we can at least return a 408 instead of an internal server error.

Screenshots

Image

@andchiind andchiind added the bug Something isn't working label Jan 14, 2025
@andchiind
Copy link
Contributor Author

A solution could be to put the response on a different queue than the one we use for start_mission. Then we could put several start mission requests on the queue and ISAR could handle them in order, and respond in order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant