Skip to content

Commit

Permalink
Reporting got messed up when skipping rest of file
Browse files Browse the repository at this point in the history
  • Loading branch information
fredli74 committed Sep 23, 2020
1 parent 24fdf8e commit cc91844
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -1062,9 +1062,11 @@ func (handler *StorageHandler) CompactFile(fileType int, fileNumber int32) int64
if highWaterMark < fileSize {
file.Writer.File.Truncate(highWaterMark)
handler.setDeadSpace(fileType, fileNumber, 0, false)
core.Log(core.LogInfo, "Released %s (%s deleted, %s moved) from file %s (size %s)", core.HumanSize(offset-highWaterMark), core.HumanSize(deleted), core.HumanSize(moved), file.Path, core.HumanSize(highWaterMark))
} else {
core.Log(core.LogInfo, "Skipped (%s deleted, %s moved) file %s (size %s)", core.HumanSize(deleted), core.HumanSize(moved), file.Path, core.HumanSize(highWaterMark))
}

core.Log(core.LogInfo, "Removed %s (%s deleted, %s moved) from file %s (size %s)", core.HumanSize(offset-highWaterMark), core.HumanSize(deleted), core.HumanSize(moved), file.Path, core.HumanSize(highWaterMark))
return deleted
}
func (handler *StorageHandler) CompactAll(fileType int, threshold int) {
Expand Down

0 comments on commit cc91844

Please sign in to comment.