Commit 909ff427 authored by Chris McDonough's avatar Chris McDonough

Use the proper attribute for detecting "dirty" blobs.

parent b7c4af27
...@@ -90,18 +90,19 @@ class BlobStorage(ProxyBase): ...@@ -90,18 +90,19 @@ class BlobStorage(ProxyBase):
def tpc_finish(self, *arg, **kw): def tpc_finish(self, *arg, **kw):
""" We need to override the base storage's tpc_finish instead of """ We need to override the base storage's tpc_finish instead of
providing a _finish method because methods aren't rebound to the proxy providing a _finish method because methods found on the proxied object
when they're found via getattr on the unproxied object""" aren't rebound to the proxy """
getProxiedObject(self).tpc_finish(*arg, **kw) getProxiedObject(self).tpc_finish(*arg, **kw)
self.dirty_blobs = [] self.dirty_oids = []
def tpc_abort(self, *arg, **kw): def tpc_abort(self, *arg, **kw):
""" We need to override the base storage's tpc_abort instead of """ We need to override the base storage's abort instead of
providing a _abort method because methods aren't rebound to the proxy providing an _abort method because methods found on the proxied object
when they're found via getattr on the unproxied object""" aren't rebound to the proxy """
getProxiedObject(self).tpc_abort(*arg, **kw) # XXX this is never called during our tests.
while self.dirty_blobs: getProxiedObject(self).abort(*arg, **kw)
oid, serial = self.dirty_blobs.pop() while self.dirty_oids:
oid, serial = self.dirty_oids.pop()
clean = self._getCleanFilename(oid, serial) clean = self._getCleanFilename(oid, serial)
dirty = self._getDirtyFilename(oid, serial) dirty = self._getDirtyFilename(oid, serial)
for filename in [clean, dirty]: for filename in [clean, dirty]:
......
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