reset the size of sortableBuffer when flushing to disk (#579)

This commit is contained in:
Igor Mandrigin 2020-05-26 17:02:19 +03:00 committed by GitHub
parent c60aff8058
commit 4f339a1c81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -284,6 +284,7 @@ func (b *sortableBuffer) FlushToDisk(datadir string) (string, error) {
}
b.entries = b.entries[:0] // keep the capacity
b.size = 0
return filename, nil
}