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. Note that the complete fix for the memory leak for pyeclib is proposed at https://review.openstack.org/#/c/344066/ 1: https://bugs.launchpad.net/pyeclib/+bug/1604335 Related-Bug: #1604335 Change-Id: I6bbaa4063dc462383c949764b6567b2bee233689
49 KiB
Executable File
49 KiB
Executable File