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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZEO
Commits
fb47be2f
Commit
fb47be2f
authored
Jul 12, 2010
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure the temporary savepoint storage is closed properly.
parent
f9e7bc14
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
27 deletions
+30
-27
src/ZODB/Connection.py
src/ZODB/Connection.py
+30
-27
No files found.
src/ZODB/Connection.py
View file @
fb47be2f
...
@@ -1099,35 +1099,38 @@ class Connection(ExportImport, object):
...
@@ -1099,35 +1099,38 @@ class Connection(ExportImport, object):
src
=
self
.
_savepoint_storage
src
=
self
.
_savepoint_storage
self
.
_storage
=
self
.
_normal_storage
self
.
_storage
=
self
.
_normal_storage
self
.
_savepoint_storage
=
None
self
.
_savepoint_storage
=
None
try
:
self
.
_log
.
debug
(
"Committing savepoints of size %s"
,
src
.
getSize
())
self
.
_log
.
debug
(
"Committing savepoints of size %s"
,
src
.
getSize
())
oids
=
src
.
index
.
keys
()
oids
=
src
.
index
.
keys
()
# Copy invalidating and creating info from temporary storage:
# Copy invalidating and creating info from temporary storage:
self
.
_modified
.
extend
(
oids
)
self
.
_modified
.
extend
(
oids
)
self
.
_creating
.
update
(
src
.
creating
)
self
.
_creating
.
update
(
src
.
creating
)
for
oid
in
oids
:
for
oid
in
oids
:
data
,
serial
=
src
.
load
(
oid
,
src
)
data
,
serial
=
src
.
load
(
oid
,
src
)
obj
=
self
.
_cache
.
get
(
oid
,
None
)
obj
=
self
.
_cache
.
get
(
oid
,
None
)
if
obj
is
not
None
:
if
obj
is
not
None
:
self
.
_cache
.
update_object_size_estimation
(
obj
.
_p_oid
,
len
(
data
))
self
.
_cache
.
update_object_size_estimation
(
obj
.
_p_estimated_size
=
len
(
data
)
obj
.
_p_oid
,
len
(
data
))
if
isinstance
(
self
.
_reader
.
getGhost
(
data
),
Blob
):
obj
.
_p_estimated_size
=
len
(
data
)
blobfilename
=
src
.
loadBlob
(
oid
,
serial
)
if
isinstance
(
self
.
_reader
.
getGhost
(
data
),
Blob
):
s
=
self
.
_storage
.
storeBlob
(
oid
,
serial
,
data
,
blobfilename
,
blobfilename
=
src
.
loadBlob
(
oid
,
serial
)
s
=
self
.
_storage
.
storeBlob
(
oid
,
serial
,
data
,
blobfilename
,
''
,
transaction
)
# we invalidate the object here in order to ensure
# that that the next attribute access of its name
# unghostify it, which will cause its blob data
# to be reattached "cleanly"
self
.
invalidate
(
None
,
(
oid
,
))
else
:
s
=
self
.
_storage
.
store
(
oid
,
serial
,
data
,
''
,
transaction
)
''
,
transaction
)
# we invalidate the object here in order to ensure
# that that the next attribute access of its name
# unghostify it, which will cause its blob data
# to be reattached "cleanly"
self
.
invalidate
(
None
,
(
oid
,
))
else
:
s
=
self
.
_storage
.
store
(
oid
,
serial
,
data
,
''
,
transaction
)
self
.
_handle_serial
(
oid
,
s
,
change
=
False
)
self
.
_handle_serial
(
oid
,
s
,
change
=
False
)
src
.
close
()
finally
:
src
.
close
()
def
_abort_savepoint
(
self
):
def
_abort_savepoint
(
self
):
"""Discard all savepoint data."""
"""Discard all savepoint data."""
...
...
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