Browse Source

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

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

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

@@ -667,9 +667,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