https://pulp.plan.io/https://pulp.plan.io/favicon.ico2017-08-08T19:29:30ZPulpPulp - Story #2965: As a user, I can use pulp_example plugin to import contenthttps://pulp.plan.io/issues/2965?journal_id=214542017-08-08T19:29:30Zmhrivnakmhrivnak@redhat.com
<ul></ul><p>Here you go! <a href="https://github.com/pulp/pulp_example" class="external">https://github.com/pulp/pulp_example</a></p> Pulp - Story #2965: As a user, I can use pulp_example plugin to import contenthttps://pulp.plan.io/issues/2965?journal_id=214552017-08-08T19:35:06Zbmbouterbmbouter@redhat.com
<ul></ul><p>Will this also include a setup.py?<br>
Will this also include an entrypoint to be installed with?</p>
<p>Also a basic README in the repo would be nice.</p> Pulp - Story #2965: As a user, I can use pulp_example plugin to import contenthttps://pulp.plan.io/issues/2965?journal_id=214622017-08-08T19:48:25Zdkliban@redhat.com
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/21462/diff?detail_id=21965">diff</a>)</li></ul> Pulp - Story #2965: As a user, I can use pulp_example plugin to import contenthttps://pulp.plan.io/issues/2965?journal_id=214632017-08-08T19:48:55Zdkliban@redhat.com
<ul></ul><p>Yes and yes. I updated the description.</p> Pulp - Story #2965: As a user, I can use pulp_example plugin to import contenthttps://pulp.plan.io/issues/2965?journal_id=214642017-08-08T20:03:26Zjortel@redhat.comjortel@redhat.com
<ul></ul><p>When using transactions, it's very important to insert in the same order to prevent deadlock (table locks).</p>
<p>The ChangeSet inserts in this order:</p>
<ul>
<li>content (base)</li>
<li>content (concrete)</li>
<li>artifact</li>
<li>content-artifact</li>
<li>deferred-artifact</li>
</ul>
<p>Suggest this plugin do the same. We can discuss the order itself (a little) but Pulp must require plugins (using transactions, and they all should) to insert in a known order.</p> Pulp - Story #2965: As a user, I can use pulp_example plugin to import contenthttps://pulp.plan.io/issues/2965?journal_id=214652017-08-08T20:12:09Zbmbouterbmbouter@redhat.com
<ul></ul><p>I think Django will fail to save if the order isn't correct because the remote objects won't have primary keys set yet. If that is true then during development this should be easy to get correct because it work otherwise.</p>
<p>Can you describe this table lock in more detail? An example would also be great.</p> Pulp - Story #2965: As a user, I can use pulp_example plugin to import contenthttps://pulp.plan.io/issues/2965?journal_id=214842017-08-10T13:06:53Zdkliban@redhat.com
<ul><li><strong>Status</strong> changed from <i>NEW</i> to <i>ASSIGNED</i></li><li><strong>Assignee</strong> set to <i>dkliban@redhat.com</i></li></ul> Pulp - Story #2965: As a user, I can use pulp_example plugin to import contenthttps://pulp.plan.io/issues/2965?journal_id=214912017-08-10T13:36:37Zjortel@redhat.comjortel@redhat.com
<ul><li><strong>Groomed</strong> changed from <i>No</i> to <i>Yes</i></li></ul> Pulp - Story #2965: As a user, I can use pulp_example plugin to import contenthttps://pulp.plan.io/issues/2965?journal_id=214942017-08-10T14:12:50Zmhrivnakmhrivnak@redhat.com
<ul><li><strong>Sprint/Milestone</strong> set to <i>43</i></li></ul> Pulp - Story #2965: As a user, I can use pulp_example plugin to import contenthttps://pulp.plan.io/issues/2965?journal_id=215002017-08-10T14:32:11Zmhrivnakmhrivnak@redhat.com
<ul><li><strong>Priority</strong> changed from <i>Normal</i> to <i>High</i></li></ul> Pulp - Story #2965: As a user, I can use pulp_example plugin to import contenthttps://pulp.plan.io/issues/2965?journal_id=215122017-08-10T14:45:34Zjortel@redhat.comjortel@redhat.com
<ul></ul><p>bmbouter wrote:</p>
<blockquote>
<p>I think Django will fail to save if the order isn't correct because the remote objects won't have primary keys set yet. If that is true then during development this should be easy to get correct because it work otherwise.</p>
<p>Can you describe this table lock in more detail? An example would also be great.</p>
</blockquote>
<p>Right, the DB will enforce referential integrity based on constraint created by django. I'm talking about something else. While in a transaction, if an insert is attempted, the RDBMS will acquire a table lock and insert the row but not commit it. That lock will be held for the duration of the transaction. Inserts are performed on 2+ tables in opposite order in different transactions results in deadlock.</p>
<p>Much of the order I mentioned in comment 5 is dictated by DB constraints. However, Content and Artifact can be inserted in any order.</p>
<p>Example:</p>
<p>T = transaction</p>
<pre><code>T-1: insert into Content
Content table lock held by T-1
T-2: insert into Artifact
Artifact table lock held by T-2
T-1: insert into Artifact
Wait on Artifact lock held by T-2
T-2: insert into Content
Wait on Content lock held by T-1
</code></pre>
<p>This is a classic RDBMS problem and the traditional solution is to ensure that operations (like insert) that results in table locks are performed in a consistent order. PostgreSQL <em>may</em> some algorithm to sort this out but I doubt it. I can run a quick test to substantiate this issue if needed.</p> Pulp - Story #2965: As a user, I can use pulp_example plugin to import contenthttps://pulp.plan.io/issues/2965?journal_id=218032017-09-05T16:04:59Zjortel@redhat.comjortel@redhat.com
<ul><li><strong>Sprint/Milestone</strong> changed from <i>43</i> to <i>44</i></li></ul> Pulp - Story #2965: As a user, I can use pulp_example plugin to import contenthttps://pulp.plan.io/issues/2965?journal_id=220272017-09-25T13:09:20Zmhrivnakmhrivnak@redhat.com
<ul><li><strong>Sprint/Milestone</strong> changed from <i>44</i> to <i>45</i></li></ul> Pulp - Story #2965: As a user, I can use pulp_example plugin to import contenthttps://pulp.plan.io/issues/2965?journal_id=220352017-09-25T15:11:39Zdkliban@redhat.com
<ul><li><strong>Status</strong> changed from <i>ASSIGNED</i> to <i>MODIFIED</i></li></ul><p><a href="https://github.com/pulp/pulp_example/pull/1" class="external">https://github.com/pulp/pulp_example/pull/1</a></p> Pulp - Story #2965: As a user, I can use pulp_example plugin to import contenthttps://pulp.plan.io/issues/2965?journal_id=234742017-12-19T15:24:08Zbmbouterbmbouter@redhat.com
<ul><li><strong>Tags</strong> deleted (<del><i>Pulp 3 Plugin Writer Alpha</i></del>)</li></ul><p>Cleaning up Redmine tags</p> Pulp - Story #2965: As a user, I can use pulp_example plugin to import contenthttps://pulp.plan.io/issues/2965?journal_id=262142018-03-08T23:24:29Zbmbouterbmbouter@redhat.com
<ul><li><strong>Sprint</strong> set to <i>Sprint 26</i></li></ul> Pulp - Story #2965: As a user, I can use pulp_example plugin to import contenthttps://pulp.plan.io/issues/2965?journal_id=262282018-03-08T23:24:51Zbmbouterbmbouter@redhat.com
<ul><li><strong>Sprint/Milestone</strong> deleted (<del><i>45</i></del>)</li></ul> Pulp - Story #2965: As a user, I can use pulp_example plugin to import contenthttps://pulp.plan.io/issues/2965?journal_id=416872019-04-25T16:46:34Zdaviddavis
<ul><li><strong>Sprint/Milestone</strong> set to <i>3.0.0</i></li></ul> Pulp - Story #2965: As a user, I can use pulp_example plugin to import contenthttps://pulp.plan.io/issues/2965?journal_id=428552019-04-26T20:38:01Zbmbouterbmbouter@redhat.com
<ul><li><strong>Tags</strong> deleted (<del><i>Pulp 3</i></del>)</li></ul> Pulp - Story #2965: As a user, I can use pulp_example plugin to import contenthttps://pulp.plan.io/issues/2965?journal_id=507112019-12-13T17:25:17Zbmbouterbmbouter@redhat.com
<ul><li><strong>Status</strong> changed from <i>MODIFIED</i> to <i>CLOSED - CURRENTRELEASE</i></li></ul>