ECStoragePolicy.fragment_size is never changed on running Swift because
it is from ec_segment_size and ec_type defined in swift.conf statically
so let's cache the value after retrieving the value from the pyeclib driver.
And more, pyeclib <= 1.2.1 (current newest) has a bug [1] to leak the reference
count of the items in the returned dict (i.e. causes memory leak) so that
this caching will be mitigation of the memory leak because this saves the call
count fewer than current as possible.
Reviewed: https:/ /review. openstack. org/345120 /git.openstack. org/cgit/ openstack/ swift/commit/ ?id=2876f59d4cd bafc297d79f4e62 95f05e3448ae47
Committed: https:/
Submitter: Jenkins
Branch: master
commit 2876f59d4cdbafc 297d79f4e6295f0 5e3448ae47
Author: Kota Tsuyuzaki <email address hidden>
Date: Wed Jul 20 18:16:27 2016 -0700
Cache fragment size for EC policy
ECStoragePo licy.fragment_ size is never changed on running Swift because
it is from ec_segment_size and ec_type defined in swift.conf statically
so let's cache the value after retrieving the value from the pyeclib driver.
And more, pyeclib <= 1.2.1 (current newest) has a bug [1] to leak the reference
count of the items in the returned dict (i.e. causes memory leak) so that
this caching will be mitigation of the memory leak because this saves the call
count fewer than current as possible.
Note that the complete fix for the memory leak for pyeclib is proposed at /review. openstack. org/#/c/ 344066/
https:/
1: https:/ /bugs.launchpad .net/pyeclib/ +bug/1604335
Related-Bug: #1604335 383c949764b6567 b2bee233689
Change-Id: I6bbaa4063dc462