https://dev.entrouvert.org/https://dev.entrouvert.org/favicon.ico?15861920342015-06-17T08:03:35ZRedmine Entr’ouvertAuthentic 2 - Bug #7559: MultipleObjectsReturned: get() returned more than one LibertySessionDump -- it returned 2!https://dev.entrouvert.org/issues/7559?journal_id=298572015-06-17T08:03:35ZBenjamin Dauvergne
<ul></ul><p>Bug is really difficult, <code>get_or_create()</code> which used to save LibertySessionDump is not safe without a postgresql configured with the serializable isolation level, default level being read commited, as read commited cannot prevent the phantom read problem (the two transactions check if a given row, the two returns none, but in fact after the first transaction commit the second transaction pre-state has changed, there is now a row matching the query but it won't see it, see<sup><a href="#fn1">1</a></sup>).</p>
<p>Adding an unicity constraint on (django_session_key, kind) could maybe alleviate the biggest problem, that is the load_session() failing. But when two concurrent save will happen one them may fail but I think django has a retry loop inside get_or_create() to prevent the problem in most cases.</p>
<p>.fn1 <a class="external" href="http://stackoverflow.com/questions/13374335/what-is-the-difference-between-serializable-and-repeatable-read-isolation-level">http://stackoverflow.com/questions/13374335/what-is-the-difference-between-serializable-and-repeatable-read-isolation-level</a> <a class="external" href="http://www.postgresql.org/docs/9.1/static/transaction-iso.html">http://www.postgresql.org/docs/9.1/static/transaction-iso.html</a></p> Authentic 2 - Bug #7559: MultipleObjectsReturned: get() returned more than one LibertySessionDump -- it returned 2!https://dev.entrouvert.org/issues/7559?journal_id=298632015-06-17T08:44:38ZBenjamin Dauvergne
<ul><li><strong>Version cible</strong> mis à <i>2.2.0</i></li></ul> Authentic 2 - Bug #7559: MultipleObjectsReturned: get() returned more than one LibertySessionDump -- it returned 2!https://dev.entrouvert.org/issues/7559?journal_id=298852015-06-17T09:00:18ZBenjamin Dauvergne
<ul><li><strong>Statut</strong> changé de <i>Nouveau</i> à <i>Résolu (à déployer)</i></li><li><strong>% réalisé</strong> changé de <i>0</i> à <i>100</i></li></ul><p>Appliqué par commit <a class="changeset" title="saml: prevent creation of duplicate LibertySessionDump (fixes #7559) By adding a unicity constra..." href="https://dev.entrouvert.org/projects/authentic/repository/authentic2/revisions/8a4830c6ca8c6a3cd0583da0a4fdbb9938e59625">authentic2|8a4830c6ca8c6a3cd0583da0a4fdbb9938e59625</a>.</p> Authentic 2 - Bug #7559: MultipleObjectsReturned: get() returned more than one LibertySessionDump -- it returned 2!https://dev.entrouvert.org/issues/7559?journal_id=299362015-06-17T23:32:44ZBenjamin Dauvergne
<ul><li><strong>Assigné à</strong> mis à <i>Benjamin Dauvergne</i></li></ul> Authentic 2 - Bug #7559: MultipleObjectsReturned: get() returned more than one LibertySessionDump -- it returned 2!https://dev.entrouvert.org/issues/7559?journal_id=428602016-02-23T11:58:52ZBenjamin Dauvergne
<ul><li><strong>Statut</strong> changé de <i>Résolu (à déployer)</i> à <i>Solution déployée</i></li></ul> Authentic 2 - Bug #7559: MultipleObjectsReturned: get() returned more than one LibertySessionDump -- it returned 2!https://dev.entrouvert.org/issues/7559?journal_id=930352017-12-06T14:30:21ZBenjamin Dauvergne
<ul><li><strong>Statut</strong> changé de <i>Solution déployée</i> à <i>Fermé</i></li></ul>