Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ZEO
Commits
9f64b841
Commit
9f64b841
authored
Jan 29, 2008
by
Thomas Lotze
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug in transaction buffer: a tuple was unpacked incorrectly in [H[2J.
parent
bf476281
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
1 deletion
+16
-1
src/CHANGES.txt
src/CHANGES.txt
+3
-0
src/ZEO/TransactionBuffer.py
src/ZEO/TransactionBuffer.py
+2
-1
src/ZEO/tests/testZEO.py
src/ZEO/tests/testZEO.py
+11
-0
No files found.
src/CHANGES.txt
View file @
9f64b841
...
...
@@ -35,6 +35,9 @@ New Features
Bugs Fixed
----------
- Fixed bug in transaction buffer: a tuple was unpacked incorrectly in
`clear`.
- Bugfix the situation in which comparing persistent objects (for
instance, as members in BTree set or keys of BTree) might cause data
inconsistency during conflict resolution.
...
...
src/ZEO/TransactionBuffer.py
View file @
9f64b841
...
...
@@ -21,6 +21,7 @@ is used to store the data until a commit or abort.
# A faster implementation might store trans data in memory until it
# reaches a certain size.
import
os
import
cPickle
import
tempfile
from
threading
import
Lock
...
...
@@ -113,7 +114,7 @@ class TransactionBuffer:
self
.
count
=
0
self
.
size
=
0
while
self
.
blobs
:
oid
,
serial
,
blobfilename
=
self
.
blobs
.
pop
()
oid
,
blobfilename
=
self
.
blobs
.
pop
()
if
os
.
path
.
exists
(
blobfilename
):
os
.
remove
(
blobfilename
)
finally
:
...
...
src/ZEO/tests/testZEO.py
View file @
9f64b841
...
...
@@ -547,6 +547,17 @@ class CommonBlobTests:
self
.
assertEquals
(
self
.
blob_cache_dir
,
self
.
_storage
.
temporaryDirectory
())
def
checkTransactionBufferCleanup
(
self
):
oid
=
self
.
_storage
.
new_oid
()
handle
,
blob_file_name
=
tempfile
.
mkstemp
()
#XXX cleanup temp file
open
(
blob_file_name
,
'w'
).
write
(
'I am a happy blob.'
)
t
=
transaction
.
Transaction
()
self
.
_storage
.
tpc_begin
(
t
)
self
.
_storage
.
storeBlob
(
oid
,
ZODB
.
utils
.
z64
,
'foo'
,
blob_file_name
,
''
,
t
)
self
.
_storage
.
close
()
class
BlobAdaptedFileStorageTests
(
GenericTests
,
CommonBlobTests
):
"""ZEO backed by a BlobStorage-adapted FileStorage."""
...
...
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