Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
Zope
Commits
f2b81522
Commit
f2b81522
authored
Feb 10, 2005
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed some XXX comments to ordinary comments explaining the relevent
issues.
parent
edc26452
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
19 deletions
+50
-19
lib/python/ZODB/Connection.py
lib/python/ZODB/Connection.py
+50
-19
No files found.
lib/python/ZODB/Connection.py
View file @
f2b81522
...
@@ -477,13 +477,25 @@ class Connection(ExportImport, object):
...
@@ -477,13 +477,25 @@ class Connection(ExportImport, object):
del
obj
.
_p_jar
del
obj
.
_p_jar
del
obj
.
_p_oid
del
obj
.
_p_oid
else
:
else
:
# XXX Need to change strategy to acount for
# Note: If we invalidate a non-ghostifiable object
# non-ghostifiables that need to load right away.
# (i.e. a persistent class), the object will
# We need to simply call self.invalidate and let
# immediately reread it's state. That means that the
# _flush_invalidations actually perform the
# following call could result in a call to
# invalidations. I'd do this now if I had a test for
# self.setstate, which, of course, must suceed.
# it. :)
# In general, it would be better if the read could be
# delayed until the start of the next transaction. If
# we read at the end of a transaction and if the
# object was invalidated during this transaction, then
# we'll read non-current data, which we'll discard
# later in transaction finalization. Unfortnately, we
# can only delay the read if this abort corresponds to
# a top-level-transaction abort. We can't tell if
# this is a top-level-transaction abort, so we have to
# go ahead and invalidate now. Fortunatekly, it's
# pretty unlikely that the object we are invalidating
# was invalidated by another thread, so the risk of a
# reread is pretty low.
self
.
_cache
.
invalidate
(
oid
)
self
.
_cache
.
invalidate
(
oid
)
...
@@ -695,12 +707,21 @@ class Connection(ExportImport, object):
...
@@ -695,12 +707,21 @@ class Connection(ExportImport, object):
self
.
_storage
=
self
.
_tmp
self
.
_storage
=
self
.
_tmp
self
.
_tmp
=
None
self
.
_tmp
=
None
# Note: If we invalidate a non-justifiable object (i.e. a
# XXX Need to change strategy to acount for non-ghostifiables
# persistent class), the object will immediately reread it's
# that need to load right away. We need to simply call
# state. That means that the following call could result in a
# self.invalidate and let _flush_invalidations actually
# call to self.setstate, which, of course, must succeed. In
# perform the invalidations. I'd do this now if I had a test
# general, it would be better if the read could be delayed
# for it. :)
# until the start of the next transaction. If we read at the
# end of a transaction and if the object was invalidated
# during this transaction, then we'll read non-current data,
# which we'll discard later in transaction finalization. We
# could, theoretically queue this invalidation by calling
# self.invalidate. Unfortunately, attempts to make that
# change resulted in mysterious test failures. It's pretty
# unlikely that the object we are invalidating was invalidated
# by another thread, so the risk of a reread is pretty low.
# It's really not worth the effort to pursue this.
self
.
_cache
.
invalidate
(
src
.
_index
.
keys
())
self
.
_cache
.
invalidate
(
src
.
_index
.
keys
())
self
.
_invalidate_creating
(
src
.
_creating
)
self
.
_invalidate_creating
(
src
.
_creating
)
...
@@ -1081,12 +1102,22 @@ class Connection(ExportImport, object):
...
@@ -1081,12 +1102,22 @@ class Connection(ExportImport, object):
if
self
.
_import
:
if
self
.
_import
:
self
.
_import
=
None
self
.
_import
=
None
self
.
_storage
.
tpc_abort
(
transaction
)
self
.
_storage
.
tpc_abort
(
transaction
)
# XXX Need to change strategy to acount for non-ghostifiables
# Note: If we invalidate a non-justifiable object (i.e. a
# that need to load right away. We need to simply call
# persistent class), the object will immediately reread it's
# self.invalidate and let _flush_invalidations actually
# state. That means that the following call could result in a
# perform the invalidations. I'd do this now if I had a test
# call to self.setstate, which, of course, must succeed. In
# for it. :)
# general, it would be better if the read could be delayed
# until the start of the next transaction. If we read at the
# end of a transaction and if the object was invalidated
# during this transaction, then we'll read non-current data,
# which we'll discard later in transaction finalization. We
# could, theoretically queue this invalidation by calling
# self.invalidate. Unfortunately, attempts to make that
# change resulted in mysterious test failures. It's pretty
# unlikely that the object we are invalidating was invalidated
# by another thread, so the risk of a reread is pretty low.
# It's really not worth the effort to pursue this.
self
.
_cache
.
invalidate
(
self
.
_modified
)
self
.
_cache
.
invalidate
(
self
.
_modified
)
self
.
_invalidate_creating
()
self
.
_invalidate_creating
()
...
...
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