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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[馃悰 BUG]: Delete all items from the priority queue on the pipeline destroy command #1382

Open
8 tasks done
rustatian opened this issue Nov 30, 2022 · 1 comment
Open
8 tasks done
Assignees
Labels
B-bug Bug: bug, exception

Comments

@rustatian
Copy link
Member

rustatian commented Nov 30, 2022

No duplicates 馃ゲ.

  • I have searched for a similar issue in our bug tracker and didn't find any solutions.

What happened?

When the user calls rpc.Destroy for the pipeline, some jobs might already be in the priority queue. Since the priority queue is global for all pipelines, jobs from the destroyed pipeline might reach the worker. RR won't be able to ACK/NACK these JOBS, but they might sometimes break user logic inside the worker.

We should delete all associated JOBS from the PQ and wait for the msgInFlight == 0 to be sure that there are no JOBS inside the PQ or currently processing by the PHP worker.

Version (rr --version)

<= 2.12.1

How to reproduce the issue?

  1. Start RR.
  2. Use a simple JOBS worker with a sleep(1).
  3. Push a lot of JOBS and call rpc.Destroy with the pipeline name simultaneously.

  1. AMQP
  2. SQS
  3. Beanstalk
  4. NATS
  5. Kafka
  6. in-memory
  7. boltdb
@rustatian rustatian added the B-bug Bug: bug, exception label Nov 30, 2022
@rustatian rustatian added this to the v2.12.2 milestone Nov 30, 2022
@rustatian rustatian self-assigned this Nov 30, 2022
@rustatian rustatian added the Y-high Priority: High label Nov 30, 2022
@rustatian rustatian modified the milestones: v2.12.2, v2023.1 Jan 10, 2023
@rustatian rustatian modified the milestones: v2023.1.0, v2023.2.0 Apr 13, 2023
@rustatian rustatian added Y-Release blocker Priority: Release blocker and removed Y-high Priority: High labels Jun 12, 2023
@rustatian rustatian mentioned this issue Jul 6, 2023
6 tasks
@rustatian
Copy link
Member Author

The second part of this bug is to introduce an option to wait for the jobs currently being processed by a worker.

@rustatian rustatian modified the milestones: v2023.2.0, v2023.3.0 Jul 6, 2023
@rustatian rustatian removed the Y-Release blocker Priority: Release blocker label Sep 10, 2023
@rustatian rustatian removed this from the v2023.3.0 milestone Oct 9, 2023
@rustatian rustatian added this to the v2024 milestone Oct 9, 2023
@rustatian rustatian removed this from the v2024.1.0 milestone Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-bug Bug: bug, exception
Projects
Status: 馃搵 Backlog
Development

No branches or pull requests

1 participant