[Checkins] SVN: relstorage/trunk/ Added the blob-dir parameter to the ZConfig schema and README.txt.
Shane Hathaway
shane at hathawaymix.org
Fri Sep 4 19:41:56 EDT 2009
Log message for revision 103567:
Added the blob-dir parameter to the ZConfig schema and README.txt.
Changed:
U relstorage/trunk/CHANGES.txt
U relstorage/trunk/README.txt
U relstorage/trunk/relstorage/component.xml
U relstorage/trunk/relstorage/relstorage.py
-=-
Modified: relstorage/trunk/CHANGES.txt
===================================================================
--- relstorage/trunk/CHANGES.txt 2009-09-04 23:16:47 UTC (rev 103566)
+++ relstorage/trunk/CHANGES.txt 2009-09-04 23:41:56 UTC (rev 103567)
@@ -6,7 +6,7 @@
Cluster nodes will need to use a shared filesystem such as NFS or
SMB/CIFS.
-- [TODO: add the blob_dir parameter to component.xml and README]
+- Added the blob-dir parameter to the ZConfig schema and README.txt.
1.2.0 (2009-09-04)
Modified: relstorage/trunk/README.txt
===================================================================
--- relstorage/trunk/README.txt 2009-09-04 23:16:47 UTC (rev 103566)
+++ relstorage/trunk/README.txt 2009-09-04 23:41:56 UTC (rev 103567)
@@ -21,7 +21,7 @@
* Whereas FileStorage takes longer to start as the database grows due to an
in-memory index of all objects, RelStorage starts quickly regardless of
database size.
-* Supports undo and packing.
+* Supports undo, packing, and filesystem-based ZODB blobs.
* Free, open source (ZPL 2.1)
@@ -97,7 +97,21 @@
</relstorage>
</zodb_db>
+To add ZODB blob support, provide a blob-dir parameter that specifies
+where to store the blobs. For example::
+ %import relstorage
+ <zodb_db main>
+ mount-point /
+ blob-dir ./blobs
+ <relstorage>
+ <postgresql>
+ dsn dbname='zodb' user='username' host='localhost' password='pass'
+ </postgresql>
+ </relstorage>
+ </zodb_db>
+
+
Migration
=========
@@ -163,6 +177,13 @@
In the latter two cases, use underscores instead of dashes in the
parameter names.
+blob-dir
+
+ If supplied, the storage will provide blob support and this
+ is the name of a directory to hold blob data. The directory will
+ be created if it doeesn't exist. If no value (or an empty value)
+ is provided, then no blob support will be provided.
+
poll-interval
Defer polling the database for the specified maximum time interval,
@@ -260,7 +281,7 @@
Development
===========
-You can checkout from Subversion using the following command::
+You can check out from Subversion using the following command::
svn co svn://svn.zope.org/repos/main/relstorage/trunk RelStorage
@@ -304,13 +325,12 @@
Q: Can RelStorage replace ZRS (Zope Replication Services)?
- A: In theory, yes. With RelStorage, you can use the replication features
- native to your database. However, this capability has not yet been tested.
+ A: Yes. Some people are successfully running a master/slave setup
+ using MySQL.
Project URLs
============
-* http://wiki.zope.org/ZODB/RelStorage (wiki)
+* http://pypi.python.org/pypi/RelStorage (PyPI entry and downloads)
* http://shane.willowrise.com/ (blog)
-* http://pypi.python.org/pypi/RelStorage (PyPI entry and downloads)
Modified: relstorage/trunk/relstorage/component.xml
===================================================================
--- relstorage/trunk/relstorage/component.xml 2009-09-04 23:16:47 UTC (rev 103566)
+++ relstorage/trunk/relstorage/component.xml 2009-09-04 23:41:56 UTC (rev 103567)
@@ -24,6 +24,14 @@
and is still allowed on a read-only filestorage.
</description>
</key>
+ <key name="blob-dir" required="no" datatype="existing-dirpath">
+ <description>
+ If supplied, the storage will provide blob support and this
+ is the name of a directory to hold blob data. The directory will
+ be created if it doeesn't exist. If no value (or an empty value)
+ is provided, then no blob support will be provided.
+ </description>
+ </key>
<key name="poll-interval" datatype="float" required="no">
<description>
Defer polling the database for the specified maximum time interval,
Modified: relstorage/trunk/relstorage/relstorage.py
===================================================================
--- relstorage/trunk/relstorage/relstorage.py 2009-09-04 23:16:47 UTC (rev 103566)
+++ relstorage/trunk/relstorage/relstorage.py 2009-09-04 23:41:56 UTC (rev 103567)
@@ -80,7 +80,7 @@
implements(*_relstorage_interfaces)
def __init__(self, adapter, name=None, create=True,
- read_only=False, options=None, blob_dir=None, **kwoptions):
+ read_only=False, options=None, **kwoptions):
if name is None:
name = 'RelStorage on %s' % adapter.__class__.__name__
@@ -163,10 +163,9 @@
# currently uncommitted transaction.
self._txn_blobs = None
- self._blob_dir = blob_dir
- if blob_dir:
+ if options.blob_dir:
from ZODB.blob import FilesystemHelper
- self.fshelper = FilesystemHelper(blob_dir)
+ self.fshelper = FilesystemHelper(options.blob_dir)
if create:
self.fshelper.create()
self.fshelper.checkSecure()
@@ -289,7 +288,7 @@
"""
other = RelStorage(adapter=self._adapter, name=self._name,
create=False, read_only=self._is_read_only,
- options=self._options, blob_dir=self._blob_dir)
+ options=self._options)
self._instances.append(weakref.ref(other))
return other
@@ -1379,6 +1378,7 @@
parameter, which should be an Options instance.
"""
def __init__(self):
+ self.blob_dir = None
self.poll_interval = 0
self.pack_gc = True
self.pack_dry_run = False
More information about the checkins
mailing list