diff --git a/doc/saio/swift/proxy-server.conf b/doc/saio/swift/proxy-server.conf index 124b36c62b..c43c036072 100644 --- a/doc/saio/swift/proxy-server.conf +++ b/doc/saio/swift/proxy-server.conf @@ -34,7 +34,6 @@ use = egg:swift#dlo [filter:slo] use = egg:swift#slo -allow_async_delete = True [filter:container_sync] use = egg:swift#container_sync diff --git a/etc/proxy-server.conf-sample b/etc/proxy-server.conf-sample index de51c7bcce..5cf86b53a2 100644 --- a/etc/proxy-server.conf-sample +++ b/etc/proxy-server.conf-sample @@ -1090,7 +1090,7 @@ use = egg:swift#slo # `?multipart-manifest=delete&async=on`. You may want to keep this off if it # negatively impacts your expirers; in that case, the deletes will still # be done as part of the client request. -# allow_async_delete = false +# allow_async_delete = true # Note: Put after auth and staticweb in the pipeline. # If you don't put it in the pipeline, it will be inserted for you. diff --git a/swift/common/middleware/slo.py b/swift/common/middleware/slo.py index 88554e1cb4..19c4e1e754 100644 --- a/swift/common/middleware/slo.py +++ b/swift/common/middleware/slo.py @@ -1102,7 +1102,7 @@ class StaticLargeObject(object): max_manifest_segments=DEFAULT_MAX_MANIFEST_SEGMENTS, max_manifest_size=DEFAULT_MAX_MANIFEST_SIZE, yield_frequency=DEFAULT_YIELD_FREQUENCY, - allow_async_delete=False): + allow_async_delete=True): self.conf = conf self.app = app self.logger = get_logger(conf, log_route='slo') @@ -1719,7 +1719,7 @@ def filter_factory(global_conf, **local_conf): yield_frequency = int(conf.get('yield_frequency', DEFAULT_YIELD_FREQUENCY)) allow_async_delete = config_true_value(conf.get('allow_async_delete', - 'false')) + 'true')) register_swift_info('slo', max_manifest_segments=max_manifest_segments, diff --git a/test/unit/common/middleware/test_slo.py b/test/unit/common/middleware/test_slo.py index f4c45423f6..48e113c23c 100644 --- a/test/unit/common/middleware/test_slo.py +++ b/test/unit/common/middleware/test_slo.py @@ -4546,7 +4546,7 @@ class TestSwiftInfo(unittest.TestCase): self.assertEqual(swift_info['slo'].get('min_segment_size'), 1) self.assertEqual(swift_info['slo'].get('max_manifest_size'), mware.max_manifest_size) - self.assertIs(swift_info['slo'].get('allow_async_delete'), False) + self.assertIs(swift_info['slo'].get('allow_async_delete'), True) self.assertEqual(1000, mware.max_manifest_segments) self.assertEqual(8388608, mware.max_manifest_size) self.assertEqual(1048576, mware.rate_limit_under_size) @@ -4555,21 +4555,21 @@ class TestSwiftInfo(unittest.TestCase): self.assertEqual(10, mware.yield_frequency) self.assertEqual(2, mware.concurrency) self.assertEqual(2, mware.bulk_deleter.delete_concurrency) - self.assertIs(False, mware.allow_async_delete) + self.assertIs(True, mware.allow_async_delete) def test_registered_non_defaults(self): conf = dict( max_manifest_segments=500, max_manifest_size=1048576, rate_limit_under_size=2097152, rate_limit_after_segment=20, rate_limit_segments_per_sec=2, yield_frequency=5, concurrency=1, - delete_concurrency=3, allow_async_delete='y') + delete_concurrency=3, allow_async_delete='n') mware = slo.filter_factory(conf)('have to pass in an app') swift_info = utils.get_swift_info() self.assertTrue('slo' in swift_info) self.assertEqual(swift_info['slo'].get('max_manifest_segments'), 500) self.assertEqual(swift_info['slo'].get('min_segment_size'), 1) self.assertEqual(swift_info['slo'].get('max_manifest_size'), 1048576) - self.assertIs(swift_info['slo'].get('allow_async_delete'), True) + self.assertIs(swift_info['slo'].get('allow_async_delete'), False) self.assertEqual(500, mware.max_manifest_segments) self.assertEqual(1048576, mware.max_manifest_size) self.assertEqual(2097152, mware.rate_limit_under_size) @@ -4578,7 +4578,7 @@ class TestSwiftInfo(unittest.TestCase): self.assertEqual(5, mware.yield_frequency) self.assertEqual(1, mware.concurrency) self.assertEqual(3, mware.bulk_deleter.delete_concurrency) - self.assertIs(True, mware.allow_async_delete) + self.assertIs(False, mware.allow_async_delete) if __name__ == '__main__':