Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ZODB
Commits
ae0cbb90
Commit
ae0cbb90
authored
Dec 29, 2003
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scan(): If the status byte has an unexpected value, show it in hex
rather than as a (probably) unprintable character.
parent
c442b43d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
src/ZEO/cache.py
src/ZEO/cache.py
+6
-6
No files found.
src/ZEO/cache.py
View file @
ae0cbb90
...
...
@@ -572,7 +572,7 @@ OBJECT_HEADER_SIZE = 1 + 4 + 16
# disk.
class
FileCache
(
object
):
def
__init__
(
self
,
maxsize
,
fpath
,
parent
,
reuse
=
True
):
# Maximum total of object sizes we keep in cache.
self
.
maxsize
=
maxsize
...
...
@@ -624,7 +624,7 @@ class FileCache(object):
else
:
self
.
new
=
False
self
.
f
=
None
# Statistics: _n_adds, _n_added_bytes,
# _n_evicts, _n_evicted_bytes
self
.
clearStats
()
...
...
@@ -661,7 +661,7 @@ class FileCache(object):
elif
status
in
'1234'
:
size
=
int
(
status
)
else
:
assert
0
,
status
assert
0
,
hex
(
ord
(
status
))
self
.
filemap
[
ofs
]
=
size
,
ent
if
ent
is
None
and
size
>
max_free_size
:
...
...
@@ -839,7 +839,7 @@ class FileCache(object):
# disk where the object was stored. We need to load the
# header to update the in-memory data structures held by
# ClientCache.
# XXX Or we could just keep the header in memory at all times.
e
=
self
.
key2entry
.
get
(
key
)
...
...
@@ -861,11 +861,11 @@ class FileCache(object):
# This method should be called when the object header is modified.
def
update
(
self
,
obj
):
e
=
self
.
key2entry
[
obj
.
key
]
self
.
f
.
seek
(
e
.
offset
+
OBJECT_HEADER_SIZE
)
obj
.
serialize_header
(
self
.
f
)
def
settid
(
self
,
tid
):
if
self
.
tid
is
not
None
:
if
tid
<
self
.
tid
:
...
...
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