<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 17, 2017 at 1:26 PM, Brian Bouterse <span dir="ltr"><<a href="mailto:bbouters@redhat.com" target="_blank">bbouters@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>@asmacdo, your points cause me to also think that all importer/publisher update and delete operations should be tasks that use the tasking reservations system. That will cause them to never run while a sync or publish for instance is running. I'm interested in hearing more thoughts on this from others.<br></div></div></blockquote><div><br></div><div>Doing updates and deletes in tasks keeps the Pulp 2 behavior, which is safe and reasonably well-understood. That's a fine way to go.</div><div><br></div><div>I think the delete is especially advantageous to do in a task, so the object never disappears while an import or publish related task is running.</div><div><br></div><div>Update is easier to do synchronously. If it's a task, we have to worry about saving a diff for the object (presumably as an argument to the task), then applying that diff in the running task and validating it the way the REST API would. That's doable, but we'd have to do it. :) It's very tempting to do it synchronously and let the REST API do what it does for free.</div><div><br></div><div>That said, just because it's the easy option doesn't mean it's the right one. Doing the update synchronously, as has been pointed out, allows for the possibility that the importer config will change between when the task is queued and when it runs. I think that's fine and reasonable, but it could be seen as a downside.</div><div><br></div><div>Consider that while doing an update in a task could be more predictable in one way, it could also create its own confusion. Consider an API user who sees a representation of an importer in the DB and submits changes to it, but doesn't realize there are already other changes queued as tasks.</div><div><br></div><div>Neither approach seems perfect, but I lean toward synchronous updates to avoid the diff+validation challenge and the (potentially very long) delay in changes being visible.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div>A related question... are importers or publishers ever shared with multiple repos in Pulp3?</div></blockquote><div><br></div><div>Nope. </div></div><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><p style="color:rgb(0,0,0);font-family:overpass-mono,monospace;font-size:10px;margin:0px!important;padding:0px!important"><span style="margin:0px!important;padding:0px!important">Michael</span> <span style="margin:0px!important;padding:0px!important">Hrivnak</span></p><p style="color:rgb(0,0,0);font-family:overpass-mono,monospace;font-size:10px;margin:0px!important;padding:0px!important"></p><span style="color:rgb(0,0,0);font-family:overpass-mono,monospace;font-size:10px;margin:0px!important;padding:0px!important"><span style="margin:0px!important;padding:0px!important">Principal Software Engineer</span><span style="margin:0px!important;padding:0px!important">, <span style="margin:0px!important;padding:0px!important">RHCE</span></span> </span><span style="color:rgb(0,0,0);font-family:overpass-mono,monospace;font-size:10px"></span><br style="color:rgb(0,0,0);font-family:overpass-mono,monospace;font-size:10px;margin:0px!important;padding:0px!important"><p style="color:rgb(0,0,0);font-family:overpass-mono,monospace;font-size:10px;margin:0px!important;padding:0px!important">Red Hat</p></div></div>
</div></div>