Mercurial > p > roundup > code
diff CHANGES.txt @ 5143:9cebf686c552
issue2550727: db.newid is broken with sqlite.
Added proper transaction lock around the sql code to get a new id. The
the locking that pysqlite attempts had to be defeated because it is
broken. Had to explicitly manage transactions with BEGIN IMMEDIATE
and call sql_commit.
Note that this reduces performance by 30% in return for accuracy.
Also use update call set newid=newid+1 rather than incrementing in
python.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Wed, 13 Jul 2016 22:30:07 -0400 |
| parents | 93832cec4c31 |
| children | d22eb1d40d0e |
line wrap: on
line diff
--- a/CHANGES.txt Wed Jul 13 19:42:44 2016 -0400 +++ b/CHANGES.txt Wed Jul 13 22:30:07 2016 -0400 @@ -280,6 +280,12 @@ - issue2550839: Xapian, DatabaseLockError: Unable to get write lock on db/text-index: already locked. Put in a retry loop that will attempt to get the lock. Total delay approx 4.5 seconds. (John Rouillard) +- issue2550727: db.newid is broken with sqlite. Added proper transaction + lock around the sql code to get a new id. The the locking + that pysqlite attempts had to be defeated because it is broken. + Had to explicitly manage transactions with BEGIN IMMEDIATE and call + sql_commit. Note that this reduces performance in return for accuracy. + Problem reported by Matt Mackall (mpm) (John Rouillard). 2016-01-11: 1.5.1
