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
Kirill Smelkov
ZODB
Commits
78860659
Commit
78860659
authored
Jul 04, 2016
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Various small fixes suggested in review.
parent
0a2670a2
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
12 deletions
+7
-12
src/ZODB/Connection.py
src/ZODB/Connection.py
+1
-1
src/ZODB/DB.py
src/ZODB/DB.py
+2
-2
src/ZODB/multicommitadapter.py
src/ZODB/multicommitadapter.py
+3
-3
src/ZODB/tests/TransactionalUndoStorage.py
src/ZODB/tests/TransactionalUndoStorage.py
+1
-1
src/ZODB/tests/blob_transaction.txt
src/ZODB/tests/blob_transaction.txt
+0
-5
No files found.
src/ZODB/Connection.py
View file @
78860659
...
...
@@ -794,7 +794,7 @@ class Connection(ExportImport, object):
raise
if
s
:
if
type
(
s
[
0
]
)
is
bytes
:
if
type
(
next
(
iter
(
s
))
)
is
bytes
:
for
oid
in
s
:
self
.
_handle_serial
(
oid
)
return
...
...
src/ZODB/DB.py
View file @
78860659
...
...
@@ -1012,8 +1012,8 @@ class TransactionalUndo(object):
def
tpc_vote
(
self
,
transaction
):
result
=
self
.
_storage
.
tpc_vote
(
transaction
)
if
result
:
if
isinstance
(
result
[
0
]
,
bytes
):
self
.
_oids
.
update
(
set
(
result
)
)
if
isinstance
(
next
(
iter
(
result
))
,
bytes
):
self
.
_oids
.
update
(
result
)
else
:
for
oid
,
_
in
result
:
self
.
_oids
.
add
(
oid
)
...
...
src/ZODB/multicommitadapter.py
View file @
78860659
...
...
@@ -11,7 +11,7 @@ class MultiCommitAdapter:
self
.
_storage
=
storage
ifaces
=
zope
.
interface
.
providedBy
(
storage
)
zope
.
interface
.
alsoProvides
(
self
,
ifaces
)
self
.
_resolved
=
set
()
self
.
_resolved
=
set
()
# {OID}, here to make linters happy
def
__getattr__
(
self
,
name
):
v
=
getattr
(
self
.
_storage
,
name
)
...
...
@@ -39,7 +39,7 @@ class MultiCommitAdapter:
def
undo
(
self
,
transaction_id
,
transaction
):
r
=
self
.
_storage
.
undo
(
transaction_id
,
transaction
)
if
r
:
self
.
_resolved
.
update
(
set
(
r
[
1
])
)
self
.
_resolved
.
update
(
r
[
1
]
)
def
tpc_vote
(
self
,
*
args
):
s
=
self
.
_storage
.
tpc_vote
(
*
args
)
...
...
@@ -47,7 +47,7 @@ class MultiCommitAdapter:
if
serial
==
ResolvedSerial
:
self
.
_resolved
.
add
(
oid
)
return
list
(
self
.
_resolved
)
return
self
.
_resolved
def
tpc_finish
(
self
,
transaction
,
f
=
lambda
tid
:
None
):
...
...
src/ZODB/tests/TransactionalUndoStorage.py
View file @
78860659
...
...
@@ -113,7 +113,7 @@ class TransactionalUndoStorage:
oids
.
extend
(
undo_result
[
1
])
v
=
self
.
_storage
.
tpc_vote
(
t
)
if
v
:
if
isinstance
(
v
[
0
]
,
bytes
):
if
isinstance
(
next
(
iter
(
v
))
,
bytes
):
oids
.
extend
(
v
)
else
:
oids
.
extend
(
oid
for
(
oid
,
_
)
in
v
)
...
...
src/ZODB/tests/blob_transaction.txt
View file @
78860659
...
...
@@ -411,11 +411,6 @@ Similarly, the new object wasn't added to the storage:
...
POSKeyError: 0x...
>>> blob_storage.loadBlob(blob._p_oid, s2)
Traceback (most recent call last):
...
POSKeyError: 'No blob file at <BLOB STORAGE PATH>'
.. clean up
>>> tm1.abort()
...
...
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