Merge "ChunkedBackupDriver: Freeing memory on restore" into stable/rocky
This commit is contained in:
commit
fda8a8f86d
|
@ -711,9 +711,12 @@ class ChunkedBackupDriver(driver.BackupDriver):
|
||||||
LOG.debug('decompressing data using %s algorithm',
|
LOG.debug('decompressing data using %s algorithm',
|
||||||
compression_algorithm)
|
compression_algorithm)
|
||||||
decompressed = decompressor.decompress(body)
|
decompressed = decompressor.decompress(body)
|
||||||
|
body = None # Allow Python to free it
|
||||||
volume_file.write(decompressed)
|
volume_file.write(decompressed)
|
||||||
|
decompressed = None # Allow Python to free it
|
||||||
else:
|
else:
|
||||||
volume_file.write(body)
|
volume_file.write(body)
|
||||||
|
body = None # Allow Python to free it
|
||||||
|
|
||||||
# force flush every write to avoid long blocking write on close
|
# force flush every write to avoid long blocking write on close
|
||||||
volume_file.flush()
|
volume_file.flush()
|
||||||
|
|
Loading…
Reference in New Issue