On 4/9/21 5:57 AM, Max Reitz wrote:

Just as a PS, in a reply to one of Vladimir’s mails (da048f58-43a6-6811-6ad2-0d7899737...@redhat.com) I was wondering whether it even makes sense for mirror to do all the stuff it does in mirror_complete() to do it there.  Aren’t all of those things that should really be done in job-finalize (i.e. mirror_exit_common())?

Max

Yes, I think so -- admittedly, when I added that finalize logic, I was just very confused about what was safe to move where in the mirror code and never got my patches off the ground to do a more vigorous refactoring.

We've got, I think, three different user-initiated "This job should finish now" mechanisms:

- Cancelling the mirror job after it reaches READY
- Issuing "complete" to the mirror job after it reaches READY
- Issuing "finalize" to a job

Maybe these could all be integrated into a single mechanism somehow. I think I just lack the knowledge of the draining/threading/aio models to do it safely myself, and we'd need some compatibility shims for a while, etc.

Would have to look at this stuff again to know for certain what we'd be able to change compatibly.

--js


Reply via email to