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
bcd38ab5
Commit
bcd38ab5
authored
Jan 29, 2008
by
Christian Theune
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug in transaction buffer: a tuple was unpackged incorrectly in `clear`.
(backport from trunk)
parent
600b4696
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
1 deletion
+16
-1
NEWS.txt
NEWS.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.
NEWS.txt
View file @
bcd38ab5
...
...
@@ -33,6 +33,9 @@ General
ZEO
---
- (???) Fixed bug in transaction buffer: a tuple was unpackged incorrectly in
`clear`.
- (???) Fixed bug in blob filesystem helper: the `isSecure` check was inversed.
- (3.8.0b6) Bug #98275: Made ZEO cache more tolerant when invalidating current
...
...
src/ZEO/TransactionBuffer.py
View file @
bcd38ab5
...
...
@@ -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
...
...
@@ -119,7 +120,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 @
bcd38ab5
...
...
@@ -568,6 +568,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