Browse Source

Merge "ChunkedBackupDriver: Freeing memory on restore" into stable/rocky

changes/07/715007/1
Zuul 3 months ago
committed by Gerrit Code Review
parent
commit
fda8a8f86d
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      cinder/backup/chunkeddriver.py

+ 3
- 0
cinder/backup/chunkeddriver.py View File

@@ -711,9 +711,12 @@ class ChunkedBackupDriver(driver.BackupDriver):
LOG.debug('decompressing data using %s algorithm',
compression_algorithm)
decompressed = decompressor.decompress(body)
body = None # Allow Python to free it
volume_file.write(decompressed)
decompressed = None # Allow Python to free it
else:
volume_file.write(body)
body = None # Allow Python to free it

# force flush every write to avoid long blocking write on close
volume_file.flush()


Loading…
Cancel
Save