[Erp5-report] r45823 luke - /erp5/trunk/utils/Products.TIDStorage/Products/TIDStorage/README
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed May 4 14:44:40 CEST 2011
Author: luke
Date: Wed May 4 14:44:40 2011
New Revision: 45823
URL: http://svn.erp5.org?rev=45823&view=rev
Log:
Fix rst.
Modified:
erp5/trunk/utils/Products.TIDStorage/Products/TIDStorage/README
Modified: erp5/trunk/utils/Products.TIDStorage/Products/TIDStorage/README
URL: http://svn.erp5.org/erp5/trunk/utils/Products.TIDStorage/Products/TIDStorage/README?rev=45823&r1=45822&r2=45823&view=diff
==============================================================================
--- erp5/trunk/utils/Products.TIDStorage/Products/TIDStorage/README [utf8] (original)
+++ erp5/trunk/utils/Products.TIDStorage/Products/TIDStorage/README [utf8] Wed May 4 14:44:40 2011
@@ -1,7 +1,8 @@
TIDStorage
+==========
SYNOPSIS
-========
+--------
This product provides a way to have consistent backups when running a
multi-storage instance (only ZEO is supported at the moment).
@@ -11,7 +12,8 @@ Doing backups of individual Data.fs who
multiple storages: if there is a crash during transaction commit, there is no
way to tell which storage was committed and which was not (there is no TID
consistency between databases).
-There is an even more tricky case. Consider the following:
+There is an even more tricky case. Consider the following::
+
2 transactions running in parallel:
T1: modifies storage A and B
T2: modifies storage A
@@ -29,14 +31,14 @@ So is T2 is in the backup, a part of T1
inconsistent (T1 commit on B never happened).
TIDStorage log and server log
------------------------------
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TIDStorage uses two logfiles - one which is used to inform administrator
about server state (logfile_name in configuration) and TIDStorage log to which
TIDs are appended (status_file in configuration).
USAGE
-=====
+-----
Put product in Zope Products to activate Zope-side patches.
@@ -47,9 +49,9 @@ it will connect to TIDStorage server, wh
server logs.
Zope 2.12+ configuration
-------------------------
+~~~~~~~~~~~~~~~~~~~~~~~~
-Put in zope.conf section:
+Put in zope.conf section::
<product-config TIDStorage>
backend-ip ip-of-tidstorage-server
@@ -58,7 +60,7 @@ Put in zope.conf section:
PYTHONPATH issues
------------------
+~~~~~~~~~~~~~~~~~
To run server and scripts there is a need to set correct PYTHONPATH - at least
to product directory and for some tools to Zope lib/python.
@@ -68,7 +70,7 @@ Example:
PYTHONPATH=/usr/lib/erp5/lib/python:/usr/lib/erp5/lib/python/Products/TIDStorage
Typical scenario with failure, restoring from backup
-----------------------------------------------------
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Zopes and Zeos running
* TIDStorage running
@@ -83,7 +85,7 @@ known TID position. This step is optiona
might want to not cut this file.
Typical scenario with failure, no restoring needed
---------------------------------------------------
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Zopes and Zeos running
* TIDStorage running
@@ -94,7 +96,7 @@ Typical scenario with failure, no restor
transactions, system is coherent again
TECHNICAL DETAILS
-=================
+-----------------
TIDStorage fixes those issues by keeping track of transaction-to-tid relations
for all (ZODB, via ZEO) storages involved in any transaction, and by tracking
@@ -102,14 +104,19 @@ inter-transaction dependencies.
TIDStorage is composed of 3 parts:
- A Zope product, which monkey-patches "ZEO" and "transaction" products.
- transaction patch:
+
+ transaction patch
+
TIDStorage works at transaction boundaries, so we hook around
_commitResource method to know when it happens.
It must be configured to fit your network setup (TID_STORAGE_ADDRESS)
- ZEO patch:
+
+ ZEO patch
+
With regular ZEO, there is no way to know last committed TID at
transaction-code level. This patch stores last committed TID on ZEO
connection object, to be read by transaction patch.
+
- A daemon
This is TIDStorage itself, receiving TIDs from Zopes and delivering
coherency points to backup scripts.
@@ -161,25 +168,29 @@ Daemeon signal support:
- TERM kills daemon
PROTOCOL SPECIFICATION
-======================
+----------------------
All characters allowed in data, except \n and \r (0x0A & 0x0D).
Each field ends with \n, \r is ignored.
No escaping.
When transferring a list, it is prepended by the number of included fields.
- Example:
+ Example::
+
3\n
foo\n
bar\n
baz\n
+
When transferring a dict, it is prepended by the number of items, followed by
keys and then values. Values must be integers represented as strings.
- Example:
+ Example::
+
2\n
key1\n
key2\n
1\n
2\n
+
Commands are case-insensitive.
1) Start of commit command:
@@ -235,3 +246,5 @@ BOOTSTRAPED\n
Response: 1 if bootstrap was completely done, 0 otherwise.
+Change History
+==============
More information about the Erp5-report
mailing list