summaryrefslogtreecommitdiffstats
path: root/gluster/swift/common/DiskDir.py
diff options
context:
space:
mode:
authorPeter Portante <peter.portante@redhat.com>2013-07-15 16:52:46 -0400
committerLuis Pabon <lpabon@redhat.com>2013-08-21 19:38:35 -0700
commit9d4e67e741f13b4b93620fbb972886e1dc975fee (patch)
treeb6862ed79251d46771f87bbc25791f8e8d1eb29e /gluster/swift/common/DiskDir.py
parent54bb5bec7a025eecb51f85274ec37dbd0c478758 (diff)
Updates to support Havana interim version 1.9.1.
The code changes are basically: * Apply refactoring in the DiskFile class to use the new DiskWriter abstraction * Move and rename our diskfile module to match upstream * ThreadPools allow us to remove the tpool usage around fsync * Update the Ring subclass to support the get_part() method * Update to use the 1.9.1 proxy server unit tests * Move the DebugLogger class to test.unit * Rebuild the Rings to use the new layout * Remove backup ring builder files * Update spec files to 1.9.1, and tox to use swift 1.9.1 * Updated version to 1.9.0-0 Change-Id: Ica12cac8b351627d67500723f1dbd8a54d45f7c8 Signed-off-by: Peter Portante <peter.portante@redhat.com> Signed-off-by: Luis Pabon <lpabon@redhat.com> Reviewed-on: http://review.gluster.org/5331
Diffstat (limited to 'gluster/swift/common/DiskDir.py')
-rw-r--r--gluster/swift/common/DiskDir.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/gluster/swift/common/DiskDir.py b/gluster/swift/common/DiskDir.py
index 556907f..eb0b292 100644
--- a/gluster/swift/common/DiskDir.py
+++ b/gluster/swift/common/DiskDir.py
@@ -150,7 +150,8 @@ class DiskCommon(object):
"""
Common fields and methods shared between DiskDir and DiskAccount classes.
"""
- def __init__(self, root, drive, account, logger):
+ def __init__(self, root, drive, account, logger, pending_timeout=None,
+ stale_reads_ok=False):
# WARNING: The following four fields are referenced as fields by our
# callers outside of this module, do not remove.
# Create a dummy db_file in Glusterfs.RUN_DIR
@@ -161,8 +162,8 @@ class DiskCommon(object):
file(_db_file, 'w+')
self.db_file = _db_file
self.metadata = {}
- self.pending_timeout = 0
- self.stale_reads_ok = False
+ self.pending_timeout = pending_timeout or 10
+ self.stale_reads_ok = stale_reads_ok
# The following fields are common
self.root = root
assert logger is not None
@@ -287,8 +288,8 @@ class DiskDir(DiskCommon):
"""
def __init__(self, path, drive, account, container, logger,
- uid=DEFAULT_UID, gid=DEFAULT_GID):
- super(DiskDir, self).__init__(path, drive, account, logger)
+ uid=DEFAULT_UID, gid=DEFAULT_GID, **kwargs):
+ super(DiskDir, self).__init__(path, drive, account, logger, **kwargs)
self.uid = int(uid)
self.gid = int(gid)
@@ -530,8 +531,9 @@ class DiskAccount(DiskCommon):
.update_metadata()
"""
- def __init__(self, root, drive, account, logger):
- super(DiskAccount, self).__init__(root, drive, account, logger)
+ def __init__(self, root, drive, account, logger, **kwargs):
+ super(DiskAccount, self).__init__(root, drive, account, logger,
+ **kwargs)
# Since accounts should always exist (given an account maps to a
# gluster volume directly, and the mount has already been checked at