From 7e8d509faf7e5ecdb2239b528cb2303207f2dfff Mon Sep 17 00:00:00 2001 From: gholt Date: Tue, 10 Apr 2012 08:36:51 -0700 Subject: [PATCH] Added db_preallocation setting to replicators Somehow I forgot the account and container replicators with the last db_preallocation patch. Change-Id: I1a42ef000d60b59aedb113d91485319d6919bc36 --- swift/common/db_replicator.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/swift/common/db_replicator.py b/swift/common/db_replicator.py index 278e769ebe..62d1625872 100644 --- a/swift/common/db_replicator.py +++ b/swift/common/db_replicator.py @@ -29,8 +29,9 @@ from webob import Response from webob.exc import HTTPNotFound, HTTPNoContent, HTTPAccepted, \ HTTPInsufficientStorage, HTTPBadRequest +import swift.common.db from swift.common.utils import get_logger, whataremyips, storage_directory, \ - renamer, mkdirs, lock_parent_directory, unlink_older_than + renamer, mkdirs, lock_parent_directory, TRUE_VALUES, unlink_older_than from swift.common import ring from swift.common.bufferedhttp import BufferedHTTPConnection from swift.common.exceptions import DriveNotMounted, ConnectionTimeout @@ -120,6 +121,8 @@ class Replicator(Daemon): self.node_timeout = int(conf.get('node_timeout', 10)) self.conn_timeout = float(conf.get('conn_timeout', 0.5)) self.reclaim_age = float(conf.get('reclaim_age', 86400 * 7)) + swift.common.db.DB_PREALLOCATION = \ + conf.get('db_preallocation', 't').lower() in TRUE_VALUES self._zero_stats() def _zero_stats(self):