Release the list of chunk hashes after processing each snapshot.

The chunk hash list isn't needed any more after being consolidated.
Releasing it immediately after use helps reduce the memory usage.
This commit is contained in:
Gilbert Chen
2019-12-09 22:45:16 -05:00
parent 504d07bd51
commit d43fe1a282

View File

@@ -1668,6 +1668,8 @@ func (manager *BackupManager) CopySnapshots(otherManager *BackupManager, snapsho
chunks[chunkHash] = true chunks[chunkHash] = true
} }
} }
snapshot.ChunkHashes = nil
} }
otherChunkFiles, otherChunkSizes := otherManager.SnapshotManager.ListAllFiles(otherManager.storage, "chunks/") otherChunkFiles, otherChunkSizes := otherManager.SnapshotManager.ListAllFiles(otherManager.storage, "chunks/")