I am now thoroughly confused. My understanding of the above conditional insert statement was that it won’t persist a token if there is already a token with the same user_id and client_sig in the table. Alas, today once again I see an exception “MultipleResultsFound: Multiple rows were found for one_or_none()” and two token were in the table. To requests arrived 70ms apart and it seems that both were successful in creating tokens.
I expected that one would “outrace” the other and one would succeed to persist the token which the other would see when its insert runs. What am I missing here? -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.
