Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZODB
Commits
09423921
Commit
09423921
authored
Jul 04, 2016
by
Jim Fulton
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/4' into handle-serial-4
Conflicts: src/ZODB/interfaces.py
parents
d09694fc
05be22e0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
13 deletions
+45
-13
CHANGES.rst
CHANGES.rst
+6
-0
setup.py
setup.py
+1
-1
src/ZODB/interfaces.py
src/ZODB/interfaces.py
+38
-12
No files found.
CHANGES.rst
View file @
09423921
...
@@ -2,6 +2,12 @@
...
@@ -2,6 +2,12 @@
Change History
Change History
================
================
4.4.1 (2016-07-01)
==================
Added IMultiCommitStorage to directly represent the changes in the 4.4.0
release and to make complient storages introspectable.
4.4.0 (2016-06-30)
4.4.0 (2016-06-30)
==================
==================
...
...
setup.py
View file @
09423921
...
@@ -20,7 +20,7 @@ to application logic. ZODB includes features such as a plugable storage
...
@@ -20,7 +20,7 @@ to application logic. ZODB includes features such as a plugable storage
interface, rich transaction support, and undo.
interface, rich transaction support, and undo.
"""
"""
version
=
"4.4.
0
"
version
=
"4.4.
1
"
import
os
import
os
from
setuptools
import
setup
,
find_packages
from
setuptools
import
setup
,
find_packages
...
...
src/ZODB/interfaces.py
View file @
09423921
...
@@ -776,12 +776,8 @@ class IStorage(Interface):
...
@@ -776,12 +776,8 @@ class IStorage(Interface):
called while the storage transaction lock is held. It takes
called while the storage transaction lock is held. It takes
the new transaction id generated by the transaction.
the new transaction id generated by the transaction.
The return value must be the committed tid. It is used to set the
The return value may be None or the transaction id of the
serial for objects whose ids were passed to previous store calls
committed transaction, as described in IMultiCommitStorage.
in the same transaction.
For compatibility, the return value can also be None, in which case
store/tpc_vote must return the serial of stored objects.
"""
"""
def
tpc_vote
(
transaction
):
def
tpc_vote
(
transaction
):
...
@@ -797,20 +793,50 @@ class IStorage(Interface):
...
@@ -797,20 +793,50 @@ class IStorage(Interface):
without an error, then there must not be an error if
without an error, then there must not be an error if
tpc_finish or tpc_abort is called subsequently.
tpc_finish or tpc_abort is called subsequently.
The return value can be either None or a sequence of oids for which
The return value can be None or a sequence of object-id
a conflict was resolved.
For compatibility, the return value can also be a sequence of object-id
and serial pairs giving new serials for objects whose ids were
and serial pairs giving new serials for objects whose ids were
passed to previous store calls in the same transaction. The serial
passed to previous store calls in the same transaction. The serial
can be the special value ZODB.ConflictResolution.ResolvedSerial to
can be the special value ZODB.ConflictResolution.ResolvedSerial to
indicate that a conflict occurred and that the object should be
indicate that a conflict occurred and that the object should be
invalidated.
invalidated.
The return value can also be a sequence of object ids, as
described in IMultiCommitStorage.tpc_vote.
After the tpc_vote call, all solved conflicts must have been notified,
After the tpc_vote call, all solved conflicts must have been notified,
either from tpc_vote or store for objects passed to store.
either from tpc_vote or store for objects passed to store.
"""
"""
class
IMultiCommitStorage
(
IStorage
):
"""A multi-commit storage can commit multiple transactions at once.
It's likely that future versions of ZODB will require all storages
to provide this interface.
"""
def
store
(
oid
,
serial
,
data
,
version
,
transaction
):
"""Store data for the object id, oid.
See IStorage.store. For objects implementing this interface,
the return value is always None.
"""
def
tpc_finish
(
transaction
,
func
=
lambda
tid
:
None
):
"""Finish the transaction, making any transaction changes permanent.
See IStorage.store. For objects implementing this interface,
the return value must be the committed tid. It is used to set the
serial for objects whose ids were passed to previous store calls
in the same transaction.
"""
def
tpc_vote
(
transaction
):
"""Provide a storage with an opportunity to veto a transaction
See IStorage.store. For objects implementing this interface,
the return value can be either None or a sequence of oids for which
a conflict was resolved.
"""
class
IStorageRestoreable
(
IStorage
):
class
IStorageRestoreable
(
IStorage
):
"""Copying Transactions
"""Copying Transactions
...
@@ -948,8 +974,8 @@ class IStorageUndoable(IStorage):
...
@@ -948,8 +974,8 @@ class IStorageUndoable(IStorage):
This method must only be called in the first phase of
This method must only be called in the first phase of
two-phase commit (after tpc_begin but before tpc_vote). It
two-phase commit (after tpc_begin but before tpc_vote). It
returns a serial (transaction id) and a sequence of object ids
returns a serial (transaction id) and a sequence of object ids
for objects affected by the transaction.
It may also return None.
for objects affected by the transaction.
The serial is ignored
and may be None. The return from this method may be None.
"""
"""
# Used by DB (Actually, by TransactionalUndo)
# Used by DB (Actually, by TransactionalUndo)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment