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
d9ece12d
Commit
d9ece12d
authored
Jan 09, 2003
by
Chris McDonough
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Work around cases where BTrees lie about their keys.
parent
354cd386
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
9 deletions
+21
-9
lib/python/Products/Transience/Transience.py
lib/python/Products/Transience/Transience.py
+21
-9
No files found.
lib/python/Products/Transience/Transience.py
View file @
d9ece12d
...
...
@@ -13,10 +13,10 @@
"""
Transient Object Container Class ('timeslice'-based design).
$Id: Transience.py,v 1.3
0 2002/10/26 15:42:2
3 chrism Exp $
$Id: Transience.py,v 1.3
1 2003/01/09 16:38:0
3 chrism Exp $
"""
__version__
=
'$Revision: 1.3
0
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.3
1
$'
[
11
:
-
2
]
import
Globals
from
Globals
import
HTMLFile
...
...
@@ -513,7 +513,7 @@ class TransientObjectContainer(SimpleItem):
# these keys, deindexing buckets as necessary when they're older
# than the timeout.
# XXX - fixme! range search doesn't always work (btrees bug)
for
k
in
data
.
keys
(
deindex_next
,
pprev
):
for
k
in
list
(
data
.
keys
(
deindex_next
,
pprev
)
):
if
k
<
deindex_next
:
DEBUG
and
TLOG
(
'broken range search: key %s < min %s'
...
...
@@ -549,19 +549,26 @@ class TransientObjectContainer(SimpleItem):
# if the bucket has keys, deindex them and add them to the
# notify queue (destruction notification happens during
# garbage collection)
bucket
=
data
[
k
]
keys
=
bucket
.
keys
()
bucket
=
data
.
get
(
k
,
_marker
)
if
bucket
is
_marker
:
DEBUG
and
TLOG
(
'data IOBTree lied about keys: %s doesnt exist'
%
k
)
continue
keys
=
list
(
bucket
.
keys
())
for
key
in
keys
:
ob
=
bucket
.
get
(
key
,
_marker
)
if
ob
is
_marker
:
DEBUG
and
TLOG
(
'
OOBTree lied about %s
keys: %s doesnt exist'
%
(
bucket
,
key
)
'
bucket OOBTree lied about
keys: %s doesnt exist'
%
key
)
continue
self
.
notify_queue
.
put
((
key
,
ob
))
DEBUG
and
TLOG
(
'_getCurrentBucket: deindexing keys %s'
%
list
(
keys
))
'_getCurrentBucket: deindexing keys %s'
%
keys
)
keys
and
self
.
_deindex
(
keys
)
# set the "last deindexed" pointer to k + period
deindex_next
=
k
+
period
...
...
@@ -685,7 +692,12 @@ class TransientObjectContainer(SimpleItem):
%
(
k
,
delete_end
)
)
continue
bucket
=
data
[
k
]
bucket
=
data
.
get
(
k
,
_marker
)
if
bucket
is
_marker
:
DEBUG
and
TLOG
(
'bucket OOBTree lied about keys: %s doesnt exist'
%
k
)
continue
# delete the bucket from _data
del
data
[
k
]
DEBUG
and
TLOG
(
'_housekeep: deleted data[%s]'
%
k
)
...
...
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