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
144499dc
Commit
144499dc
authored
Jun 10, 2007
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed blob_cache_writable to shared_blob_dir.
parent
2c570097
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
10 deletions
+10
-10
src/ZEO/ClientStorage.py
src/ZEO/ClientStorage.py
+5
-5
src/ZEO/tests/testZEO.py
src/ZEO/tests/testZEO.py
+3
-3
src/ZODB/component.xml
src/ZODB/component.xml
+1
-1
src/ZODB/config.py
src/ZODB/config.py
+1
-1
No files found.
src/ZEO/ClientStorage.py
View file @
144499dc
...
...
@@ -115,7 +115,7 @@ class ClientStorage(object):
wait
=
None
,
wait_timeout
=
None
,
read_only
=
0
,
read_only_fallback
=
0
,
username
=
''
,
password
=
''
,
realm
=
None
,
blob_dir
=
None
,
blob_cache_writable
=
False
):
blob_dir
=
None
,
shared_blob_dir
=
False
):
"""ClientStorage constructor.
This is typically invoked from a custom_zodb.py file.
...
...
@@ -191,7 +191,7 @@ class ClientStorage(object):
blob_dir -- directory path for blob data. 'blob data' is data that
is retrieved via the loadBlob API.
blob_cache_writable -- Flag whether the blob_dir is a writable
shared
shared_blob_dir -- Flag whether the blob_dir is a server-
shared
filesystem that should be used instead of transferring blob data over
zrpc.
...
...
@@ -322,7 +322,7 @@ class ClientStorage(object):
# XXX need to check for POSIX-ness here
self
.
blob_dir
=
blob_dir
self
.
blob_cache_writable
=
blob_cache_writable
self
.
shared_blob_dir
=
shared_blob_dir
if
blob_dir
is
not
None
:
# Avoid doing this import unless we need it, as it
# currently requires pywin32 on Windows.
...
...
@@ -895,7 +895,7 @@ class ClientStorage(object):
def
storeBlob
(
self
,
oid
,
serial
,
data
,
blobfilename
,
version
,
txn
):
"""Storage API: store a blob object."""
serials
=
self
.
store
(
oid
,
serial
,
data
,
version
,
txn
)
if
self
.
blob_cache_writable
:
if
self
.
shared_blob_dir
:
self
.
_storeBlob_shared
(
oid
,
serial
,
data
,
blobfilename
,
version
,
txn
)
else
:
...
...
@@ -970,7 +970,7 @@ class ClientStorage(object):
if
self
.
_have_blob
(
blob_filename
,
oid
,
serial
):
return
blob_filename
if
self
.
blob_cache_writable
:
if
self
.
shared_blob_dir
:
# We're using a server shared cache. If the file isn't
# here, it's not anywhere.
raise
POSKeyError
(
"No blob file"
,
oid
,
serial
)
...
...
src/ZEO/tests/testZEO.py
View file @
144499dc
...
...
@@ -139,7 +139,7 @@ class GenericTests(
"""Combine tests from various origins in one class."""
blob_cache_writable
=
False
shared_blob_dir
=
False
blob_cache_dir
=
None
def
setUp
(
self
):
...
...
@@ -158,7 +158,7 @@ class GenericTests(
zport
,
'1'
,
cache_size
=
20000000
,
min_disconnect_poll
=
0.5
,
wait
=
1
,
wait_timeout
=
60
,
blob_dir
=
self
.
blob_cache_dir
,
blob_cache_writable
=
self
.
blob_cache_writable
)
shared_blob_dir
=
self
.
shared_blob_dir
)
self
.
_storage
.
registerDB
(
DummyDB
())
def
tearDown
(
self
):
...
...
@@ -636,7 +636,7 @@ class BlobWritableCacheTests(GenericTests, CommonBlobTests):
def
setUp
(
self
):
self
.
blobdir
=
self
.
blob_cache_dir
=
tempfile
.
mkdtemp
()
self
.
filestorage
=
tempfile
.
mktemp
()
self
.
blob_cache_writable
=
True
self
.
shared_blob_dir
=
True
super
(
BlobWritableCacheTests
,
self
).
setUp
()
...
...
src/ZODB/component.xml
View file @
144499dc
...
...
@@ -70,7 +70,7 @@
Path name to the blob cache directory.
</description>
</key>
<key
name=
"
blob-cache-writable
"
required=
"no"
default=
"no"
<key
name=
"
shared-blob-dir
"
required=
"no"
default=
"no"
datatype=
"boolean"
>
<description>
Tells whether the cache is a shared writable directory
...
...
src/ZODB/config.py
View file @
144499dc
...
...
@@ -152,7 +152,7 @@ class ZEOClient(BaseConfig):
return
ClientStorage
(
L
,
blob_dir
=
self
.
config
.
blob_dir
,
blob_cache_writable
=
self
.
config
.
blob_cache_writable
,
shared_blob_dir
=
self
.
config
.
shared_blob_dir
,
storage
=
self
.
config
.
storage
,
cache_size
=
self
.
config
.
cache_size
,
name
=
self
.
config
.
name
,
...
...
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