aboutsummaryrefslogtreecommitdiff
path: root/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'repo.go')
-rw-r--r--repo.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/repo.go b/repo.go
index 03bf9fc..b080cf0 100644
--- a/repo.go
+++ b/repo.go
@@ -516,12 +516,13 @@ func (r *Repo) findSimilarChunk(chunk Chunk) (*ChunkId, bool) {
count += 1
logger.Infof("found %d %d time(s)", id, count)
if count > max {
+ max = count
similarChunk = id
}
similarChunks[*id] = count
}
}
- return similarChunk, similarChunk != nil
+ return similarChunk, max > 0
}
func (r *Repo) tryDeltaEncodeChunk(temp BufferedChunk) (Chunk, bool) {