Commit Graph

110 Commits

Author SHA1 Message Date
Jason Madden ba0da4b6a7
Back to development: 2.1.2 2019-01-07 13:17:35 -06:00
Jason Madden e8c4984b4b
Preparing release 2.1.1 2019-01-07 10:38:28 -06:00
Jason Madden f80e53aa2d
Avoid deleting attributes of DB driver modules.
Fixes #206.
2019-01-07 08:20:53 -06:00
Jason Madden 5ab2840552
Back to development: 2.1.1 2018-02-07 14:35:57 -06:00
Jason Madden e5393b4e51
Preparing release 2.1.0 2018-02-07 08:56:59 -06:00
Jason Madden 7015f597e3
Document that PyPy does not work with mysqlconnector and remove it from the matrix. 2018-02-02 09:29:42 -06:00
Jason Madden c7319f7d10
Bump the tested version of MySQL Connector.
When we updated PyPy on Travis to 5.8.0, it started producing errors
"Use multi-True when executing multiple statements", even when we are
demonstrably only executing one statement. E.g.,
https://travis-ci.org/zodb/relstorage/jobs/335720512#L923

If this doesn't fix it, then I plan to take PyPy+MySQL Connector out
of the test matrix.
2018-02-02 08:56:08 -06:00
Jason Madden 687251a043
Add mention of needing CFFI to compile from source. Fixes #187.
[skip ci]
2017-06-02 13:57:36 -05:00
Jason Madden 861fe9fa53
Back to development: 2.1a3 2017-04-15 06:53:58 -05:00
Jason Madden 66e0f61d9c
Preparing release 2.1a2 2017-04-15 06:48:54 -05:00
Jason Madden 3860375815
Use a better query to delete blob chunks for HF MySQL
Fixes #175.

Also pins pylint because 1.7.0 has a number of (good!) new warnings.
2017-04-14 10:16:52 -05:00
Jason Madden 2babc54c43
Implement get_object_count exactly.
Fixes #178.

Note this changes the constructor signature for the *Stats classes to
take the keep_history flag.
2017-04-11 12:20:42 -05:00
Jason Madden 64a7515de9
Workaround TypeError in MySQLOIDAllocator
The caller should generally retry.

Fixes #173.
2017-03-20 08:55:04 -05:00
Jason Madden 4d3b8124a5
Oracle: Fix two queries that were broken in 2.1a1. 2017-03-08 12:03:48 -06:00
Jim Fulton a38e0ea359 use issue role 2017-02-09 10:40:54 -05:00
Jim Fulton 50a916e685 Implemented the storage ``afterCompletion`` method, which allows
RelStorage storages to be notified of transaction endings for
transactions that don't call the two-phase commit API.  This allows
resources to be used more efficiently because it prevents RDBMS
transactions from being held open.

Fixes: https://github.com/zodb/relstorage/issues/147

(At least for ZODB 5.2.)
2017-02-08 14:46:26 -05:00
Jason Madden 8bafa21119
Back to development: 2.1a2 2017-02-01 04:16:53 -06:00
Jason Madden 387f110894
Preparing release 2.1a1 2017-02-01 04:05:22 -06:00
Jason Madden ac9c52f237
Use InnoDB temp tables
And truncate them.

For most things this seems to speed up writes by around 10% or more due
to the way the temp tables are allocated.

Tested on both 5.5 and 5.7.

I think the dropping was an attempt to make the tables statement-level
replication compatible, but since they weren't transactianal I don't
think that worked. They were also variable sized so I don't think there
were any speed benefits. It also didn't implicitly end the transaction,
but that's not a concern where this is called.

Here's a complete set of benchmarks against 5.7, comparing zodbshootout
with -c2 and -c6, -n 1000 and '-n 100 -s 256 --test-reps 200'. This
compares 2.0.0 with current master and this change, in that order.

** c=2,s=256 **                2.0.0   master   InnoDB
"Transaction",               mysql_hf
"Add 100 Objects",               8883     9199    10157
"Update 100 Objects",            9380     9169    10318

** c=6,s=256 **                 2.0.0    master   InnoDB
"Transaction",               mysql_hf
"Add 100 Objects",               ----     14913   15524
"Update 100 Objects",            ----     14914   15077

** c=6,s=128 **                 2.0.0    master   InnoDB
"Transaction",                mysql_hf
"Add 1000 Objects",              29815    31704    38506
"Update 1000 Objects",           28978    29030    29137

In all cases, InnoDB temp tables outperform, in some cases
substantially.

An earlier set of benchmarks taken against 5.5 (but prior to a rebase on
master, so not easily replicated). The absolute value difference in
numbers versus above is that these were taken with Py 3.4 while above
was py 2.7.

zodbshootout -c 2 shootout.conf -n 100 --test-reps 200 -r 1 -s 256

Before

** concurrency=2 **
"Transaction",               mysql_hf
"Add 100 Objects",               6493
"Update 100 Objects",            9636
"Read 100 Warm Objects",         9797
"Read 100 Cold Objects",         9336
"Read 100 Hot Objects",         37407
"Read 100 Steamin' Objects",   921761

** concurrency=6 **
"Transaction",               mysql_hf
"Add 100 Objects",              10574
"Update 100 Objects",           15492
"Read 100 Warm Objects",        19290
"Read 100 Cold Objects",        17051
"Read 100 Hot Objects",         72304
"Read 100 Steamin' Objects",  1590488

After

** concurrency=2 **
"Transaction",               mysql_hf
"Add 100 Objects",               7079
"Update 100 Objects",            9782
"Read 100 Warm Objects",         8726
"Read 100 Cold Objects",         9834
"Read 100 Hot Objects",         40004
"Read 100 Steamin' Objects",   937232

c=6
** concurrency=6 **
"Transaction",               mysql_hf
"Add 100 Objects",              10612
"Update 100 Objects",           15789
"Read 100 Warm Objects",        17501
"Read 100 Cold Objects",        16556
"Read 100 Hot Objects",         71868
"Read 100 Steamin' Objects",  1549534

zodbshootout -c 2 shootout.conf -n 100 --test-reps 200 -r 1 -s 96

** concurrency=2 **
"Transaction",               mysql_hf
"Add 100 Objects",              15547
"Update 100 Objects",           14337
"Read 100 Warm Objects",        12357
"Read 100 Cold Objects",        13686
"Read 100 Hot Objects",         54559
"Read 100 Steamin' Objects",   945789

"Transaction",               mysql_hf
"Add 100 Objects",              16968
"Update 100 Objects",           16184
"Read 100 Warm Objects",        13430
"Read 100 Cold Objects",        13557
"Read 100 Hot Objects",         54625
"Read 100 Steamin' Objects",   966802
2017-01-30 14:52:35 -06:00
Jason Madden c0951952d7
Reference #160 in change note. [skip ci] 2017-01-30 09:32:07 -06:00
Jason Madden 6c081adb6a
Comments/changenote and simplify implementation of new_oid 2017-01-29 09:00:59 -06:00
Jason Madden bc74a1953a
Ref PRs in change notes. Fixes #155. 2017-01-26 12:27:50 -06:00
Jason Madden 28f9b1ac56
Initial support for connector/python 2017-01-24 17:18:29 -06:00
Jason Madden 0184147633
umysqldb: translate 'cursor closed' into an exception RelStorage can deal with
Instead of silently reconnecting. That now causes issues with the
prepared statements.
2017-01-24 14:37:33 -06:00
Jason Madden 7ac10b4876
Change note.
Complete data set:

python 3.4, same mac as in the perf docs, mysql 5.7
BEFORE (2.0)

** concurrency=2 **
"Transaction",                postgresql_hf, mysql_hf, postgresql, mysql
"Add 1000 Objects",                   17422,    19834,      13614,   16012
"Update 1000 Objects",                17410,    20717,      13631,   17810
"Read 1000 Warm Objects",             13030,    13641,       7251,   11948
"Read 1000 Cold Objects",             13691,    14188,       7296,   12095
"Read 1000 Hot Objects",              59180,    64497,      59995,   67017
"Read 1000 Steamin' Objects",       2040204,  1923613,    2171334, 1881542

AFTER

** concurrency=2 **
"Transaction",                postgresql_hf, mysql_hf, postgresql, mysql
"Add 1000 Objects",                   20681,    19385,      15542,   16304
"Update 1000 Objects",                23200,    20490,      14380,   17789
"Read 1000 Warm Objects",             15915,    13905,      14851,   11596
"Read 1000 Cold Objects",             16716,    14134,      16128,   11965
"Read 1000 Hot Objects",              61889,    65214,      60395,   64691
"Read 1000 Steamin' Objects",       2019080,  1966110,    2019996, 1852723
2017-01-24 13:23:30 -06:00
Jason Madden db8f33d560
changenote 2017-01-04 14:56:19 -06:00
Jason Madden 518a2e54bc
Back to development: 2.0.1 2016-12-23 05:50:04 -06:00
Jason Madden 12172086f4
Preparing release 2.0.0 2016-12-23 05:40:27 -06:00
Jason Madden 330d4b229a MySQL: Drop the commit lock after fill_object_refs (#150)
* format tweaks [skip ci]

* MySQL: Drop the commit lock after fill_object_refs

In pre-pack gc in a history-free storage.

Oracle and PostgreSQL were already doing this, so this should be a safe
change to make.

Fixes #9.

* Tweak error message.
2016-12-22 10:13:35 -06:00
Jason Madden e3b21ffc67
Use optimized queries for getting the TID at commit time.
For MySQL and PostgreSQL only. MySQL uses the MAX query, and PostgreSQL
uses its prepared statement.

Also avoid checking self.keep_history at runtime, overriding the correct
methods dynamically.

cf #89
2016-12-21 08:58:03 -06:00
Jason Madden ae48f02ca3
Back to development: 2.0.0rc2 2016-12-12 06:41:12 -06:00
Jason Madden 32909f28fd
Preparing release 2.0.0rc1 2016-12-12 06:40:16 -06:00
Jason Madden 6d4731daa5 Support for Python 3.6 (#146)
* Initial support for 3.6: tox.ini, changes.rst

* Try 3.6.0rc1 in travis

* Try 3.6.0rc1 in travis

* Adjust version specs for 3.6.0rc1
2016-12-12 06:36:17 -06:00
Jason Madden 402c965b9f Test on Appveyor (#145)
* First basic version of appveyor.yml for testing. Still need to configure databases. Lets just see if we build.

* stdint.h is not available on MSVC before 2010, but we're not using it anyway. myssqlclient won't compile on windows

* Try a define for broken c99 support in MSVC.

* Broader macro.

* Use old form of 0 initializing struct.

* More fixes for broken c99 support of MSVC.

* Attempt to setup the database.

* need /c

* give up on running the DB tests.

* produce wheels

* produce wheels

* one more try for mysql tests.

* Run the db script as part of the test, it seems services aren't started during install phase.

* MySQL tests are running, try adding postgres.

* badges

* right bin directory for postgres

* Skip one blob test on windows/py3
2016-12-11 11:06:27 -06:00
Jason Madden 8246a350a7
Extra safety writing temporary cache files.
Take more care with exception handling and being extra sure to clean up
temporary files.

Refactor to make this more obvious.

In addition, don't open files unless we're going to read them, not just
to stat them. This may open some small race conditions, but we should be
robust to them. It makes it more likely that this process will work on
Windows. It does use more system calls, but this shouldn't be a
bottleneck for reasonably sized cache directories.

Let the system generate cache file names for us, and replace old files
instead of renaming on top of them. This should be less racy overall.
2016-12-05 11:26:04 -06:00
Jason Madden 3e2acd8d30
Back to development: 2.0.0b10 2016-11-29 12:44:39 -06:00
Jason Madden af37efbecc
Preparing release 2.0.0b9 2016-11-29 12:43:26 -06:00
Jason Madden 99ac1662ec
`rsc_eden_add_many` failed to set sentinel values on some rejected nodes.
This only happened when the cache entries were sized in such a way that
when a new entry could fit we would still like to reject an old entry
from a different ring.

Fixes #140.
2016-11-29 12:12:13 -06:00
Jason Madden 986ca6c879
This should fix the transaction compatibility. 2016-11-15 13:27:28 -06:00
Jason Madden 6c03bec4fe
Raise a specific error for weird commit lock issues on mysql. 2016-10-05 15:00:11 -05:00
Jason Madden 7807c4ed0e
Back to development: 2.0.0b9
[skip ci]
2016-10-02 06:27:06 -05:00
Jason Madden dd5f0a224c
Preparing release 2.0.0b8 2016-10-02 06:26:36 -05:00
Jason Madden c09403baf9
list cffi in setup_requires for buildout users. 2016-10-02 06:25:50 -05:00
Jason Madden 49388cb37e
Back to development: 2.0.0b8 2016-10-01 05:51:59 -05:00
Jason Madden 052198f4a9
Preparing release 2.0.0b7 2016-10-01 05:36:37 -05:00
Jason Madden 3ad13fc20c
Fix packing in Oracle history-preserving databases. Unfortunately the unit tests don't cover this case well. Fixes #135. 2016-09-30 06:46:42 -05:00
Jason Madden e0bca5a4d2
Set the cache file time to the latest TID it contains. Fixes #126 2016-09-29 11:45:36 -05:00
Jason Madden 0c6ecf2813
Use LLBTree for delta maps. Fixes #130. 2016-09-27 10:02:41 -05:00
Jason Madden 4585c85950
Record hits with a delta size of 30000---much better. 2016-09-23 13:15:03 -05:00
Jason Madden 8e2679f387
Fix manifest; note about pypy support. [skip ci] 2016-09-22 17:42:38 -05:00