Commit 3f77de54 authored by Christian Theune's avatar Christian Theune

- removed use of the word "DIRTY" for BlobStorage

 - replaced "DIRTY" with "LOADING" for ClientStorage
parent 2db8f91c
......@@ -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 _getDirtyFilename(self, oid, serial):
def _getLoadingFilename(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._getDirtyFilename(oid, serial)
tempfilename = self._getLoadingFilename(oid, serial)
tempfile = open(tempfilename, "wb")
offset = 0
......
......@@ -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):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment