Commit f8d598be authored by Łukasz Nowak's avatar Łukasz Nowak

- spellchecking


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25807 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5ef10c49
...@@ -6,22 +6,22 @@ multi-storage instance (only ZEO is supported at the moment). ...@@ -6,22 +6,22 @@ multi-storage instance (only ZEO is supported at the moment).
Doing backups of individual Data.fs who are part of the same instance Doing backups of individual Data.fs who are part of the same instance
(one mounted in another) is a problem when there are transactions involving (one mounted in another) is a problem when there are transactions involving
multiple storages: if there is a crash during transaction commit, there is no multiple storages: if there is a crash during transaction commit, there is no
way to tell which storage was commited and which was not (there is no TID way to tell which storage was committed and which was not (there is no TID
consistency between databases). 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: 2 transactions running in parallel:
T1: modifies storage A and B T1: modifies storage A and B
T2: modifies storage A T2: modifies storage A
Commit order scenario: Commit order scenario:
T1 starts commiting (takes commit lock on A and B) T1 starts committing (takes commit lock on A and B)
T2 starts commiting (waits for commit lock on A) T2 starts committing (waits for commit lock on A)
T1 commits A (commit lock released on A) T1 commits A (commit lock released on A)
T2 commits A (takes & releases commit lock on A) T2 commits A (takes & releases commit lock on A)
[crash] [crash]
T1 commits B (commit lock released on B) <- never happens because of crash T1 commits B (commit lock released on B) <- never happens because of crash
Here, T2 was able to commit entierely, but it must not be saved. This is Here, T2 was able to commit entirely, but it must not be saved. This is
because transactions are stored in ZODB in the order they are commited. because transactions are stored in ZODB in the order they are committed.
So is T2 is in the backup, a part of T1 will also be, and backup will be So is T2 is in the backup, a part of T1 will also be, and backup will be
inconsistent (T1 commit on B never happened). inconsistent (T1 commit on B never happened).
...@@ -36,8 +36,8 @@ TIDStorage is composed of 3 parts: ...@@ -36,8 +36,8 @@ TIDStorage is composed of 3 parts:
_commitResource method to know when it happens. _commitResource method to know when it happens.
It must be configured to fit your network setup (TID_STORAGE_ADDRESS) 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 commited TID at With regular ZEO, there is no way to know last committed TID at
transaction-code level. This patch stores last commited TID on ZEO transaction-code level. This patch stores last committed TID on ZEO
connection object, to be read by transaction patch. connection object, to be read by transaction patch.
- A daemon - A daemon
This is TIDStorage itself, receiving TIDs from Zopes and delivering This is TIDStorage itself, receiving TIDs from Zopes and delivering
...@@ -91,7 +91,7 @@ Protocol: ...@@ -91,7 +91,7 @@ Protocol:
bar\n bar\n
baz\n baz\n
When transferring a dict, it is prepended by the number of items, followed by When transferring a dict, it is prepended by the number of items, followed by
keys and then values. Values must be ints represented as strings. keys and then values. Values must be integers represented as strings.
Example: Example:
2\n 2\n
key1\n key1\n
...@@ -125,7 +125,7 @@ Response: (nothing) ...@@ -125,7 +125,7 @@ Response: (nothing)
COMMIT\n COMMIT\n
<commit id>\n <commit id>\n
<dict of involved storages and commited TIDs> <dict of involved storages and committed TIDs>
<commit id>: (cf. BEGIN) <commit id>: (cf. BEGIN)
involved storages: (cf. BEGIN) involved storages: (cf. BEGIN)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment