Merge pull request #329 from pdf/prune_memory

Reduce memory consumption for prune operation
This commit is contained in:
gilbertchen
2018-03-20 14:32:12 -04:00
committed by GitHub
4 changed files with 295 additions and 217 deletions

View File

@@ -199,7 +199,7 @@ func (manager *BackupManager) Backup(top string, quickMode bool, threads int, ta
// A revision number of 0 means this is the initial backup
if remoteSnapshot.Revision > 0 {
// Add all chunks in the last snapshot to the cache
for _, chunkID := range manager.SnapshotManager.GetSnapshotChunks(remoteSnapshot) {
for _, chunkID := range manager.SnapshotManager.GetSnapshotChunks(remoteSnapshot, true) {
chunkCache[chunkID] = true
}
} else {