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
Show 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
...
...
@@ -478,12 +478,24 @@ class Connection(ExportImport, object):
del
obj
.
_p_oid
else
:
# XXX Need to change strategy to acount for
# non-ghostifiables that need to load right away.
# We need to simply call self.invalidate and let
# _flush_invalidations actually perform the
# invalidations. I'd do this now if I had a test for
# it. :)
# Note: If we invalidate a non-ghostifiable object
# (i.e. a persistent class), the object will
# immediately reread it's state. That means that the
# following call could result in a call to
# self.setstate, which, of course, must suceed.
# 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
)
...
...
@@ -695,12 +707,21 @@ class Connection(ExportImport, object):
self
.
_storage
=
self
.
_tmp
self
.
_tmp
=
None
# XXX Need to change strategy to acount for non-ghostifiables
# that need to load right away. We need to simply call
# self.invalidate and let _flush_invalidations actually
# perform the invalidations. I'd do this now if I had a test
# for it. :)
# Note: If we invalidate a non-justifiable object (i.e. a
# persistent class), the object will immediately reread it's
# state. That means that the following call could result in a
# call to self.setstate, which, of course, must succeed. 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. 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
.
_invalidate_creating
(
src
.
_creating
)
...
...
@@ -1082,11 +1103,21 @@ class Connection(ExportImport, object):
self
.
_import
=
None
self
.
_storage
.
tpc_abort
(
transaction
)
# XXX Need to change strategy to acount for non-ghostifiables
# that need to load right away. We need to simply call
# self.invalidate and let _flush_invalidations actually
# perform the invalidations. I'd do this now if I had a test
# for it. :)
# Note: If we invalidate a non-justifiable object (i.e. a
# persistent class), the object will immediately reread it's
# state. That means that the following call could result in a
# call to self.setstate, which, of course, must succeed. 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. 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
.
_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