Skip to content

Commit a191046

Browse files
Jenkinsopenstack-gerrit
Jenkins
authored andcommitted
Merge "Added db_preallocation setting to replicators"
2 parents 92312f5 + 7e8d509 commit a191046

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

swift/common/db_replicator.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@
2929
from webob.exc import HTTPNotFound, HTTPNoContent, HTTPAccepted, \
3030
HTTPInsufficientStorage, HTTPBadRequest
3131

32+
import swift.common.db
3233
from swift.common.utils import get_logger, whataremyips, storage_directory, \
33-
renamer, mkdirs, lock_parent_directory, unlink_older_than
34+
renamer, mkdirs, lock_parent_directory, TRUE_VALUES, unlink_older_than
3435
from swift.common import ring
3536
from swift.common.bufferedhttp import BufferedHTTPConnection
3637
from swift.common.exceptions import DriveNotMounted, ConnectionTimeout
@@ -120,6 +121,8 @@ def __init__(self, conf):
120121
self.node_timeout = int(conf.get('node_timeout', 10))
121122
self.conn_timeout = float(conf.get('conn_timeout', 0.5))
122123
self.reclaim_age = float(conf.get('reclaim_age', 86400 * 7))
124+
swift.common.db.DB_PREALLOCATION = \
125+
conf.get('db_preallocation', 't').lower() in TRUE_VALUES
123126
self._zero_stats()
124127

125128
def _zero_stats(self):

0 commit comments

Comments
 (0)