diff options
| author | Chris Lu <chris.lu@gmail.com> | 2018-06-28 22:21:29 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2018-06-28 22:21:29 -0700 |
| commit | 9dfc97a8ea3f4df32eb6bd2d8b4541d1b018d6a4 (patch) | |
| tree | ab5f2688afb003e5ef7a0210088f4756b1dd2a56 | |
| parent | 035fe801b93e979d6e666fdfb9e3832a8492a72c (diff) | |
| download | seaweedfs-9dfc97a8ea3f4df32eb6bd2d8b4541d1b018d6a4.tar.xz seaweedfs-9dfc97a8ea3f4df32eb6bd2d8b4541d1b018d6a4.zip | |
fix error if deletion happens during compaction
| -rw-r--r-- | weed/storage/volume_vacuum.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/storage/volume_vacuum.go b/weed/storage/volume_vacuum.go index a9fe6c03d..a9fffb6ee 100644 --- a/weed/storage/volume_vacuum.go +++ b/weed/storage/volume_vacuum.go @@ -189,7 +189,7 @@ func (v *Volume) makeupDiff(newDatFileName, newIdxFileName, oldDatFileName, oldI } //updated needle - if incre_idx_entry.offset != 0 && incre_idx_entry.size != 0 { + if incre_idx_entry.offset != 0 && incre_idx_entry.size != 0 && incre_idx_entry.size != TombstoneFileSize { //even the needle cache in memory is hit, the need_bytes is correct var needle_bytes []byte needle_bytes, err = ReadNeedleBlob(oldDatFile, int64(incre_idx_entry.offset)*NeedlePaddingSize, incre_idx_entry.size) |
