Roundup Tracker - Issues

Message5810

Author rouilj
Recipients ber, mpm, rouilj
Date 2016-07-10.17:05:11
Message-id <1468170312.76.0.615769675681.issue2550727@psf.upfronthosting.co.za>
In-reply-to
I am attaching a patch that should work round pysqlite's
handling of transactions and properly create an exclusive
lock on the ids table while getting a new id.

Note the inline patch I submitted before didn't do the trick
in a small test case. I think it's becuase the exclusive lock
only fires when I try to use DML (data modification language)
and not between the query and the update.

This should stop the duplicate id's returned when different
processes are accessing the table.

This patch passes the full sqlite test suite.  I tried to make 

  test/test_sqlite.py::sqliteConcurrencyTest::testConcurrency

fail using the original so I could see if it passed with this patch.
But I couldn't reproduce the fail using the test suite. I also tried it
using scripts/add_issue after 500 issues added I didn't get any
exceptions raised.
History
Date User Action Args
2016-07-10 17:07:03rouiljunlinkissue2550727 messages
2016-07-10 17:05:12rouiljsetmessageid: <1468170312.76.0.615769675681.issue2550727@psf.upfronthosting.co.za>
2016-07-10 17:05:12rouiljsetrecipients: + rouilj, ber, mpm
2016-07-10 17:05:12rouiljlinkissue2550727 messages
2016-07-10 17:05:11rouiljcreate