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
3f77de54
Commit
3f77de54
authored
Feb 27, 2006
by
Christian Theune
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- removed use of the word "DIRTY" for BlobStorage
- replaced "DIRTY" with "LOADING" for ClientStorage
parent
2db8f91c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
9 deletions
+5
-9
src/ZEO/ClientStorage.py
src/ZEO/ClientStorage.py
+4
-4
src/ZODB/Blobs/BlobStorage.py
src/ZODB/Blobs/BlobStorage.py
+1
-5
No files found.
src/ZEO/ClientStorage.py
View file @
3f77de54
...
...
@@ -35,7 +35,7 @@ from ZEO.Exceptions import ClientStorageError, ClientDisconnected, AuthError
from
ZEO.auth
import
get_module
from
ZEO.zrpc.client
import
ConnectionManager
from
ZODB.Blobs.BlobStorage
import
BLOB_SUFFIX
,
BLOB_DIRTY
from
ZODB.Blobs.BlobStorage
import
BLOB_SUFFIX
from
ZODB
import
POSException
from
ZODB
import
utils
from
ZODB.loglevels
import
BLATHER
...
...
@@ -928,10 +928,10 @@ class ClientStorage(object):
utils
.
oid_repr
(
oid
)
)
def
_get
Dirty
Filename
(
self
,
oid
,
serial
):
def
_get
Loading
Filename
(
self
,
oid
,
serial
):
"""Generate an intermediate filename for two-phase commit.
"""
return
self
.
_getCleanFilename
(
oid
,
serial
)
+
".
"
+
BLOB_DIRTY
return
self
.
_getCleanFilename
(
oid
,
serial
)
+
".
loading"
def
_getCleanFilename
(
self
,
oid
,
tid
):
return
os
.
path
.
join
(
self
.
_getBlobPath
(
oid
),
...
...
@@ -951,7 +951,7 @@ class ClientStorage(object):
# We write to a temporary file first, so we do not accidentally
# allow half-baked copies of this blob be loaded
tempfilename
=
self
.
_get
Dirty
Filename
(
oid
,
serial
)
tempfilename
=
self
.
_get
Loading
Filename
(
oid
,
serial
)
tempfile
=
open
(
tempfilename
,
"wb"
)
offset
=
0
...
...
src/ZODB/Blobs/BlobStorage.py
View file @
3f77de54
...
...
@@ -24,7 +24,6 @@ from ZODB.Blobs.interfaces import IBlobStorage, IBlob
from
ZODB.POSException
import
POSKeyError
BLOB_SUFFIX
=
".blob"
BLOB_DIRTY
=
"store"
class
BlobStorage
(
ProxyBase
):
"""A storage to support blobs."""
...
...
@@ -209,10 +208,7 @@ class BlobStorage(ProxyBase):
serial
=
filename
[:
-
len
(
BLOB_SUFFIX
)]
oid
=
utils
.
repr_to_oid
(
oid
)
if
serial
!=
BLOB_DIRTY
:
serial
=
utils
.
repr_to_oid
(
serial
)
else
:
serial
=
None
serial
=
utils
.
repr_to_oid
(
serial
)
return
oid
,
serial
def
undo
(
self
,
serial_id
,
transaction
):
...
...
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