[Checkins] SVN: relstorage/tags/1.0c1/ Published 1.0c1

Shane Hathaway shane at hathawaymix.org
Wed Feb 27 17:50:43 EST 2008


Log message for revision 84356:
  Published 1.0c1
  

Changed:
  A   relstorage/tags/1.0c1/
  D   relstorage/tags/1.0c1/CHANGELOG.txt
  A   relstorage/tags/1.0c1/CHANGELOG.txt
  A   relstorage/tags/1.0c1/notes/migrate.sql
  A   relstorage/tags/1.0c1/relstorage/tests/alltests.py
  D   relstorage/tags/1.0c1/setup.py
  A   relstorage/tags/1.0c1/setup.py

-=-
Copied: relstorage/tags/1.0c1 (from rev 84353, relstorage/trunk)

Deleted: relstorage/tags/1.0c1/CHANGELOG.txt
===================================================================
--- relstorage/trunk/CHANGELOG.txt	2008-02-27 20:24:03 UTC (rev 84353)
+++ relstorage/tags/1.0c1/CHANGELOG.txt	2008-02-27 22:50:43 UTC (rev 84356)
@@ -1,120 +0,0 @@
-
-RelStorage 1.0
-
-- The previous fix for non-ASCII characters was incorrect.  Now transaction
-  metadata is stored as raw bytes.  A schema migration is required; see
-  notes/migrate-1.0-beta.txt.
-
-
-RelStorage 1.0 beta
-
-- Renamed to reflect expanding database support.
-
-- Added support for Oracle 10g.
-
-- Major overhaul with many scalability and reliability improvements,
-  particularly in the area of packing.
-
-- Moved to svn.zope.org and switched to ZPL 2.1.
-
-- Made two-phase commit optional in both Oracle and PostgreSQL.  They
-  both use commit_lock in such a way that the commit is not likely to
-  fail in the second phase.
-
-- Switched most database transaction isolation levels from serializable
-  to read committed.  It turns out that commit_lock already provides
-  the serializability guarantees we need, so it is safe to take advantage
-  of the potential speed gains.  The one major exception is the load
-  connection, which requires an unchanging view of the database.
-
-- Stored objects are now buffered in a database table rather than a file.
-
-- Stopped using the LISTEN and NOTIFY statements in PostgreSQL since
-  they are not strictly transactional in the sense we require.
-
-- Started using a prepared statement in PostgreSQL for getting the
-  newest transaction ID quickly.
-
-- Removed the code in the Oracle adapter for retrying connection attempts.
-  (It is better to just reconfigure Oracle.)
-
-- Added support for MySQL 5.0.
-
-- Added the poll_interval option.  It reduces the frequency of database
-  polls, but it also increases the potential for conflict errors on
-  servers with high write volume.
-
-- Implemented the storage iterator protocol, making it possible to copy
-  transactions to and from FileStorage and other RelStorage instances.
-
-- Fixed a bug that caused OIDs to be reused after importing transactions.
-  Added a corresponding test.
-
-- Made it possible to disable garbage collection during packing.
-  Exposed the option in zope.conf.
-
-- Valery Suhomlinov discovered a problem with non-ASCII data in transaction
-  metadata.  The problem has been fixed for all supported databases.
-
-
-PGStorage 0.4
-
-- Began using the PostgreSQL LISTEN and NOTIFY statements as a shortcut
-  for invalidation polling.
-
-- Removed the commit_order code.  The commit_order idea was intended to
-  allow concurrent commits, but that idea is a little too ambitious while
-  other more important ideas are being tested.  Something like it may
-  come later.
-
-- Improved connection management: only one database connection is
-  held continuously open per storage instance.
-
-- Reconnect to the database automatically.
-
-- Removed test mode.
-
-- Switched from using a ZODB.Connection subclass to a ZODB patch.  The
-  Connection class changes in subtle ways too often to subclass reliably;
-  a patch is much safer.
-
-- PostgreSQL 8.1 is now a dependency because PGStorage uses two phase commit.
-
-- Fixed an undo bug.  Symptom: attempting to examine the undo log revealed
-  broken pickles.  Cause: the extension field was not being wrapped in
-  psycopg2.Binary upon insert.  Solution: used psycopg2.Binary.
-  Unfortunately, this doesn't fix existing transactions people have
-  committed.  If anyone has any data to keep, fixing the old transactions
-  should be easy.
-
-- Moved from a private CVS repository to Sourceforge.
-  See http://pgstorage.sourceforge.net .  Also switched to the MIT license.
-
-- David Pratt added a basic getSize() implementation so that the Zope
-  management interface displays an estimate of the size of the database.
-
-- Turned PGStorage into a top-level package.  Python generally makes
-  top-level packages easier to install.
-
-
-PGStorage 0.3
-
-- Made compatible with Zope 3, although an undo bug apparently remains.
-
-
-PGStorage 0.2
-
-- Fixed concurrent commits, which were generating deadlocks.  Fixed by
-  adding a special table, "commit_lock", which is used for
-  synchronizing increments of commit_seq (but only at final commit.)
-  If you are upgrading from version 0.1, you need to change your
-  database using the 'psql' prompt:
-
-    create table commit_lock ();
-
-- Added speed tests and an OpenDocument spreadsheet comparing
-  FileStorage / ZEO with PGStorage.  PGStorage wins at reading objects
-  and writing a lot of small transactions, while FileStorage / ZEO
-  wins at writing big transactions.  Interestingly, they tie when
-  writing a RAM disk.
-

Copied: relstorage/tags/1.0c1/CHANGELOG.txt (from rev 84355, relstorage/trunk/CHANGELOG.txt)
===================================================================
--- relstorage/tags/1.0c1/CHANGELOG.txt	                        (rev 0)
+++ relstorage/tags/1.0c1/CHANGELOG.txt	2008-02-27 22:50:43 UTC (rev 84356)
@@ -0,0 +1,122 @@
+
+RelStorage 1.0c1
+
+- The previous fix for non-ASCII characters was incorrect.  Now transaction
+  metadata is stored as raw bytes.  A schema migration is required; see
+  notes/migrate-1.0-beta.txt.
+
+- Integrated setuptools and made an egg.
+
+
+RelStorage 1.0 beta
+
+- Renamed to reflect expanding database support.
+
+- Added support for Oracle 10g.
+
+- Major overhaul with many scalability and reliability improvements,
+  particularly in the area of packing.
+
+- Moved to svn.zope.org and switched to ZPL 2.1.
+
+- Made two-phase commit optional in both Oracle and PostgreSQL.  They
+  both use commit_lock in such a way that the commit is not likely to
+  fail in the second phase.
+
+- Switched most database transaction isolation levels from serializable
+  to read committed.  It turns out that commit_lock already provides
+  the serializability guarantees we need, so it is safe to take advantage
+  of the potential speed gains.  The one major exception is the load
+  connection, which requires an unchanging view of the database.
+
+- Stored objects are now buffered in a database table rather than a file.
+
+- Stopped using the LISTEN and NOTIFY statements in PostgreSQL since
+  they are not strictly transactional in the sense we require.
+
+- Started using a prepared statement in PostgreSQL for getting the
+  newest transaction ID quickly.
+
+- Removed the code in the Oracle adapter for retrying connection attempts.
+  (It is better to just reconfigure Oracle.)
+
+- Added support for MySQL 5.0.
+
+- Added the poll_interval option.  It reduces the frequency of database
+  polls, but it also increases the potential for conflict errors on
+  servers with high write volume.
+
+- Implemented the storage iterator protocol, making it possible to copy
+  transactions to and from FileStorage and other RelStorage instances.
+
+- Fixed a bug that caused OIDs to be reused after importing transactions.
+  Added a corresponding test.
+
+- Made it possible to disable garbage collection during packing.
+  Exposed the option in zope.conf.
+
+- Valery Suhomlinov discovered a problem with non-ASCII data in transaction
+  metadata.  The problem has been fixed for all supported databases.
+
+
+PGStorage 0.4
+
+- Began using the PostgreSQL LISTEN and NOTIFY statements as a shortcut
+  for invalidation polling.
+
+- Removed the commit_order code.  The commit_order idea was intended to
+  allow concurrent commits, but that idea is a little too ambitious while
+  other more important ideas are being tested.  Something like it may
+  come later.
+
+- Improved connection management: only one database connection is
+  held continuously open per storage instance.
+
+- Reconnect to the database automatically.
+
+- Removed test mode.
+
+- Switched from using a ZODB.Connection subclass to a ZODB patch.  The
+  Connection class changes in subtle ways too often to subclass reliably;
+  a patch is much safer.
+
+- PostgreSQL 8.1 is now a dependency because PGStorage uses two phase commit.
+
+- Fixed an undo bug.  Symptom: attempting to examine the undo log revealed
+  broken pickles.  Cause: the extension field was not being wrapped in
+  psycopg2.Binary upon insert.  Solution: used psycopg2.Binary.
+  Unfortunately, this doesn't fix existing transactions people have
+  committed.  If anyone has any data to keep, fixing the old transactions
+  should be easy.
+
+- Moved from a private CVS repository to Sourceforge.
+  See http://pgstorage.sourceforge.net .  Also switched to the MIT license.
+
+- David Pratt added a basic getSize() implementation so that the Zope
+  management interface displays an estimate of the size of the database.
+
+- Turned PGStorage into a top-level package.  Python generally makes
+  top-level packages easier to install.
+
+
+PGStorage 0.3
+
+- Made compatible with Zope 3, although an undo bug apparently remains.
+
+
+PGStorage 0.2
+
+- Fixed concurrent commits, which were generating deadlocks.  Fixed by
+  adding a special table, "commit_lock", which is used for
+  synchronizing increments of commit_seq (but only at final commit.)
+  If you are upgrading from version 0.1, you need to change your
+  database using the 'psql' prompt:
+
+    create table commit_lock ();
+
+- Added speed tests and an OpenDocument spreadsheet comparing
+  FileStorage / ZEO with PGStorage.  PGStorage wins at reading objects
+  and writing a lot of small transactions, while FileStorage / ZEO
+  wins at writing big transactions.  Interestingly, they tie when
+  writing a RAM disk.
+

Copied: relstorage/tags/1.0c1/notes/migrate.sql (from rev 84354, relstorage/trunk/notes/migrate.sql)
===================================================================
--- relstorage/tags/1.0c1/notes/migrate.sql	                        (rev 0)
+++ relstorage/tags/1.0c1/notes/migrate.sql	2008-02-27 22:50:43 UTC (rev 84356)
@@ -0,0 +1,48 @@
+-- Migration from PGStorage to RelStorage
+
+-- Do all the work in a transaction
+BEGIN;
+
+-- Remove the commit_order information (RelStorage has a better solution).
+DROP SEQUENCE commit_seq;
+ALTER TABLE transaction DROP commit_order;
+
+-- Make the special transaction 0 match RelStorage
+UPDATE transaction SET username='system',
+    description='special transaction for object creation'
+    WHERE tid = 0;
+
+-- Add the MD5 column and some more constraints.
+ALTER TABLE object_state
+    ADD CONSTRAINT object_state_tid_check CHECK (tid > 0),
+    ADD CONSTRAINT object_state_prev_tid_fkey FOREIGN KEY (prev_tid)
+        REFERENCES transaction,
+    ADD COLUMN md5 CHAR(32);
+UPDATE object_state SET md5=md5(state) WHERE state IS NOT NULL;
+
+-- Replace the temporary tables used for packing.
+DROP TABLE pack_operation;
+DROP TABLE pack_transaction;
+DROP TABLE pack_keep;
+DROP TABLE pack_garbage;
+CREATE TABLE pack_lock ();
+CREATE TABLE object_ref (
+    zoid        BIGINT NOT NULL,
+    tid         BIGINT NOT NULL,
+    to_zoid     BIGINT NOT NULL
+);
+CREATE INDEX object_ref_from ON object_ref (zoid);
+CREATE INDEX object_ref_tid ON object_ref (tid);
+CREATE INDEX object_ref_to ON object_ref (to_zoid);
+CREATE TABLE object_refs_added (
+    tid         BIGINT NOT NULL PRIMARY KEY
+);
+CREATE TABLE pack_object (
+    zoid        BIGINT NOT NULL PRIMARY KEY,
+    keep        BOOLEAN NOT NULL,
+    keep_tid    BIGINT
+);
+CREATE INDEX pack_object_keep_zoid ON pack_object (keep, zoid);
+
+-- Now commit everything
+COMMIT;

Copied: relstorage/tags/1.0c1/relstorage/tests/alltests.py (from rev 84355, relstorage/trunk/relstorage/tests/alltests.py)
===================================================================
--- relstorage/tags/1.0c1/relstorage/tests/alltests.py	                        (rev 0)
+++ relstorage/tags/1.0c1/relstorage/tests/alltests.py	2008-02-27 22:50:43 UTC (rev 84356)
@@ -0,0 +1,27 @@
+##############################################################################
+#
+# Copyright (c) 2008 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Combines the tests of all adapters"""
+
+import unittest
+
+from testpostgresql import test_suite as postgresql_test_suite
+from testmysql import test_suite as mysql_test_suite
+from testoracle import test_suite as oracle_test_suite
+
+def make_suite():
+    suite = unittest.TestSuite()
+    suite.addTest(postgresql_test_suite())
+    suite.addTest(mysql_test_suite())
+    suite.addTest(oracle_test_suite())
+    return suite

Deleted: relstorage/tags/1.0c1/setup.py
===================================================================
--- relstorage/trunk/setup.py	2008-02-27 20:24:03 UTC (rev 84353)
+++ relstorage/tags/1.0c1/setup.py	2008-02-27 22:50:43 UTC (rev 84356)
@@ -1,63 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2008 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""A backend for ZODB that stores pickles in a relational database.
-
-This is designed to be a drop-in replacement for the standard ZODB
-combination of FileStorage and ZEO.  Multiple ZODB clients can
-share the same database without any additional configuration.
-Supports undo, historical database views, packing, and lossless
-migration between FileStorage and RelStorage instances.
-
-The supported relational databases are PostgreSQL 8.1 and above
-(using the psycopg2 Python module), MySQL 5.0 and above (using the
-MySQLdb 1.2.2 Python module), and Oracle 10g (using cx_Oracle 4.3).
-
-A small patch to ZODB is required.  See the patch files distributed
-with RelStorage.
-"""
-
-VERSION = "1.0-beta1"
-
-classifiers = """\
-Development Status :: 4 - Beta
-Intended Audience :: Developers
-License :: OSI Approved :: Zope Public License
-Programming Language :: Python
-Topic :: Database
-Topic :: Software Development :: Libraries :: Python Modules
-Operating System :: Microsoft :: Windows
-Operating System :: Unix
-"""
-
-
-from distutils.core import setup
-
-doclines = __doc__.split("\n")
-
-setup(
-    name="RelStorage",
-    version=VERSION,
-    maintainer="Shane Hathaway",
-    maintainer_email="shane at hathawaymix.org",
-    url="http://wiki.zope.org/ZODB/RelStorage",
-    packages=['relstorage', 'relstorage.adapters', 'relstorage.tests'],
-    package_data={
-        'relstorage': ['component.xml'],
-    },
-    license="ZPL 2.1",
-    platforms=["any"],
-    description=doclines[0],
-    classifiers=filter(None, classifiers.split("\n")),
-    long_description = "\n".join(doclines[2:]),
-    )

Copied: relstorage/tags/1.0c1/setup.py (from rev 84355, relstorage/trunk/setup.py)
===================================================================
--- relstorage/tags/1.0c1/setup.py	                        (rev 0)
+++ relstorage/tags/1.0c1/setup.py	2008-02-27 22:50:43 UTC (rev 84356)
@@ -0,0 +1,78 @@
+##############################################################################
+#
+# Copyright (c) 2008 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""A backend for ZODB that stores pickles in a relational database.
+
+This is designed to be a drop-in replacement for the standard ZODB
+combination of FileStorage and ZEO.  Multiple ZODB clients can
+share the same database without any additional configuration.
+Supports undo, historical database views, packing, and lossless
+migration between FileStorage and RelStorage instances.
+
+The supported relational databases are PostgreSQL 8.1 and above
+(using the psycopg2 Python module), MySQL 5.0 and above (using the
+MySQLdb 1.2.2 Python module), and Oracle 10g (using cx_Oracle 4.3).
+
+A small patch to ZODB is required.  See the patch files distributed
+with RelStorage.
+"""
+
+VERSION = "1.0c1"
+
+classifiers = """\
+Development Status :: 4 - Beta
+Intended Audience :: Developers
+License :: OSI Approved :: Zope Public License
+Programming Language :: Python
+Topic :: Database
+Topic :: Software Development :: Libraries :: Python Modules
+Operating System :: Microsoft :: Windows
+Operating System :: Unix
+"""
+
+try:
+    from setuptools import setup
+except ImportError:
+    from distutils import setup
+    setuptools_args = {}
+else:
+    setuptools_args = dict(
+        zip_safe=False,  # otherwise ZConfig can't see component.xml
+        install_requires=['ZODB3>=3.7.0'],
+        extras_require={
+            'mysql':      ['MySQL-python>=1.2.2'],
+            'postgresql': ['psycopg2>=2.0'],
+            'oracle':     ['cx_Oracle>=4.3.1'],
+            },
+        test_suite='relstorage.tests.alltests.make_suite',
+    )
+
+doclines = __doc__.split("\n")
+
+setup(
+    name="RelStorage",
+    version=VERSION,
+    maintainer="Shane Hathaway",
+    maintainer_email="shane at hathawaymix.org",
+    url="http://wiki.zope.org/ZODB/RelStorage",
+    packages=['relstorage', 'relstorage.adapters', 'relstorage.tests'],
+    package_data={
+        'relstorage': ['component.xml'],
+    },
+    license="ZPL 2.1",
+    platforms=["any"],
+    description=doclines[0],
+    classifiers=filter(None, classifiers.split("\n")),
+    long_description = "\n".join(doclines[2:]),
+    **setuptools_args
+    )



More information about the Checkins mailing list