-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Clean Expired Messages before Experiments Start #10578
Comments
Just a quick heads up in case someone lands in this issue and thinks that it's unattended, I'm working on it and I will put an update soon 🐌. Thanks for the patience |
ContextLet's do a bit of backup on this to make sure it still makes sense
What I Have Discovered
Unknowns
What do you think @shcheklein, is there a strong case to clean upfront? |
@nablabits could you give a little bit more details please? From you description it seems to be a problem that the first worker is cleaning up too early, not that there are files left? Or am I missing something?
don't know yet, it well might be we don't need it. It would be great to get a bit more details. |
Just a tiny update, I'm trying to figure out the message lifecycle which will shed light on the two issues, namely, the impact of remaining files in subsequent runs and cleaning files while the second worker is still active. The process is quite involved as Celery and Kombu are deeply intertwined and poorly documented/annotated so one has to reverse engineer the methods to fully make sense of the data structures. The fact that they operate in different threads of the processor is making the debugging awkward as I can't just put breakpoints —I'd really appreciate if anyone has a clever solution to this 🙂 —. With all, I'm enjoying the learning experience so far |
Hi @shcheklein, hope you are doing great! TL;DRSo, there were a couple of unknowns that I'm now in a solid position to reply:
Now I can confidently say that for the first there's a marginal chance to have some effect whereas for the second, there's no chance whatsoever. See details below from background onwards. There are a number of options now that come to my mind:
What do you think? BackgroundWe need to lay some ground first of all so as to be clear in the terms. Exchanges:
Pidbox Message Lifecycle: flowchart LR
a[Mailbox._publish] --> b[Channel.queue_bind] --> c[celery.worker.control.meth] --> d[Mailbox._publish_reply] --> e[Channel.queue_delete] --> a
1. Implications of Triggering Clean Ahead of TimeOf course, @pmrowla knew what he was doing and wisely defined these two cleaning processes:
2. Implications of Remaining Files in Subsequent RunsThe files that remain in 😅 Phew! |
This is a follow up from:
where a minimal fix was shipped. As discussed in this comment, it may be a good idea to explore the possibility and implications of cleaning the expired messages before an experiment starts.
The text was updated successfully, but these errors were encountered: