https://pulp.plan.io/https://pulp.plan.io/favicon.ico2017-08-08T14:41:23ZPulpPulp - Issue #2959: Task results can be lost due to race conditionhttps://pulp.plan.io/issues/2959?journal_id=214382017-08-08T14:41:23Zttereshcttereshc@redhat.com
<ul><li><strong>Triaged</strong> changed from <i>No</i> to <i>Yes</i></li></ul> Pulp - Issue #2959: Task results can be lost due to race conditionhttps://pulp.plan.io/issues/2959?journal_id=214482017-08-08T16:05:31Zbmbouterbmbouter@redhat.com
<ul></ul><p>The reason this code exists is because in some cases (when apply_async) is called directly it is supposed to create the TaskStatus record. When apply_async is called indirectly as a result of an apply_async_with_reservation() call, it should not be adding data to the TaskStatus record at all.</p>
<p>To fix this, I recommend removing <code>save_with_set_on_insert()</code> altogether. With that removed, the save will be a normal save and not an upsert which causes the save() to overwrite data unexpectedly. In cases where apply_async() is supposed to create the record this will work correctly. In cases where apply_async() is not supposed to write that record, the save() will emit a not unique exception due to the task.id already existing and that field being required as unique. That exception can be caught and ignored. This is very similar to the pulp3 implementation <a href="https://github.com/pulp/pulp/blob/3.0-dev/platform/pulpcore/tasking/tasks.py#L233-L242" class="external">here</a>.</p> Pulp - Issue #2959: Task results can be lost due to race conditionhttps://pulp.plan.io/issues/2959?journal_id=219322017-09-20T03:26:43Zrmcgoverrmcgover@redhat.com
<ul></ul><p>Pull request: <a href="https://github.com/pulp/pulp/pull/3159" class="external">https://github.com/pulp/pulp/pull/3159</a></p> Pulp - Issue #2959: Task results can be lost due to race conditionhttps://pulp.plan.io/issues/2959?journal_id=220152017-09-25T09:26:31Zipanova@redhat.comipanova@redhat.com
<ul><li><strong>Status</strong> changed from <i>NEW</i> to <i>POST</i></li><li><strong>Assignee</strong> set to <i>rmcgover</i></li></ul> Pulp - Issue #2959: Task results can be lost due to race conditionhttps://pulp.plan.io/issues/2959?journal_id=220372017-09-25T15:21:45Zrmcgoverrmcgover@redhat.com
<ul><li><strong>Status</strong> changed from <i>POST</i> to <i>MODIFIED</i></li></ul><p>Applied in changeset <a class="changeset" title="Fix task results lost due to race condition A task might have completed or failed by the time ap..." href="https://pulp.plan.io/projects/pulp/repository/pulp/revisions/7a5a52955bd455fcbd8080d17f60380f3ba1511e">pulp|7a5a52955bd455fcbd8080d17f60380f3ba1511e</a>.</p> Pulp - Issue #2959: Task results can be lost due to race conditionhttps://pulp.plan.io/issues/2959?journal_id=220862017-09-26T20:20:18Zpcreechpcreech@redhat.com
<ul><li><strong>Platform Release</strong> set to <i>2.14.1</i></li></ul> Pulp - Issue #2959: Task results can be lost due to race conditionhttps://pulp.plan.io/issues/2959?journal_id=222702017-10-05T21:52:53Zpcreechpcreech@redhat.com
<ul><li><strong>Status</strong> changed from <i>MODIFIED</i> to <i>CLOSED - CURRENTRELEASE</i></li></ul> Pulp - Issue #2959: Task results can be lost due to race conditionhttps://pulp.plan.io/issues/2959?journal_id=381712019-04-15T20:16:23Zbmbouterbmbouter@redhat.com
<ul><li><strong>Tags</strong> <i>Pulp 2</i> added</li></ul>