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
0fe92131
Commit
0fe92131
authored
Sep 21, 2000
by
Shane Hathaway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a race condition in close callbacks and corrected what may have been
a memory leak in mounted databases.
parent
7d0a92de
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
11 deletions
+13
-11
src/ZODB/Connection.py
src/ZODB/Connection.py
+8
-7
src/ZODB/Mount.py
src/ZODB/Mount.py
+5
-4
No files found.
src/ZODB/Connection.py
View file @
0fe92131
...
...
@@ -84,8 +84,8 @@
##############################################################################
"""Database connection support
$Id: Connection.py,v 1.3
8 2000/09/07 21:53:47 jim
Exp $"""
__version__
=
'$Revision: 1.3
8
$'
[
11
:
-
2
]
$Id: Connection.py,v 1.3
9 2000/09/21 21:34:31 shane
Exp $"""
__version__
=
'$Revision: 1.3
9
$'
[
11
:
-
2
]
from
cPickleCache
import
PickleCache
from
POSException
import
ConflictError
,
ExportError
...
...
@@ -242,11 +242,8 @@ class Connection(ExportImport.ExportImport):
def
close
(
self
):
self
.
_incrgc
()
# This is a good time to do some GC
db
=
self
.
_db
self
.
_db
=
self
.
_storage
=
self
.
_tmp
=
self
.
new_oid
=
self
.
_opened
=
None
self
.
_debug_info
=
()
db
.
_closeConnection
(
self
)
# Call the close callback
# Call the close callback
s.
for
f
in
self
.
__onCloseCallbacks
:
try
:
f
()
except
:
...
...
@@ -254,6 +251,10 @@ class Connection(ExportImport.ExportImport):
LOG
(
'ZODB'
,
ERROR
,
'Close callback failed for %s'
%
f
,
error
=
sys
.
exc_info
())
self
.
__onCloseCallbacks
=
()
self
.
_db
=
self
.
_storage
=
self
.
_tmp
=
self
.
new_oid
=
self
.
_opened
=
None
self
.
_debug_info
=
()
# Return the connection to the pool.
db
.
_closeConnection
(
self
)
def
commit
(
self
,
object
,
transaction
,
_type
=
type
,
_st
=
type
(
''
)):
oid
=
object
.
_p_oid
...
...
src/ZODB/Mount.py
View file @
0fe92131
...
...
@@ -84,8 +84,8 @@
##############################################################################
"""Mounted database support
$Id: Mount.py,v 1.
5 2000/08/03 19:56:35
shane Exp $"""
__version__
=
'$Revision: 1.
5
$'
[
11
:
-
2
]
$Id: Mount.py,v 1.
6 2000/09/21 21:34:31
shane Exp $"""
__version__
=
'$Revision: 1.
6
$'
[
11
:
-
2
]
import
Globals
,
thread
,
Persistence
,
Acquisition
import
ExtensionClass
,
string
,
time
,
sys
...
...
@@ -202,6 +202,7 @@ class MountPoint(Persistence.Persistent, Acquisition.Implicit):
# and possibly the database itself.
t
=
self
.
_v_data
if
t
is
not
None
:
self
.
_v_data
=
None
data
=
t
[
0
]
if
getattr
(
data
,
'_v__object_deleted__'
,
0
):
# This mount point has been deleted.
...
...
@@ -212,8 +213,8 @@ class MountPoint(Persistence.Persistent, Acquisition.Implicit):
if
conn
is
not
None
:
try
:
del
conn
.
_mount_parent_jar
except
:
pass
if
conn
.
_db
is
not
None
:
conn
.
close
()
self
.
_v_data
=
None
if
self
.
_v_close_db
:
# Stop using this database. Close it if no other
# MountPoint is using it.
...
...
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