Fix uncleanable orphans issue with volume.fsck -forcePurging (#7332)
- Modified `needle_map_memory.go` to include needles with size=0 during needle map loading - Updated `volume_write.go` to handle size=0 needles in delete operations
This commit is contained in:
@@ -36,7 +36,7 @@ func LoadCompactNeedleMap(file *os.File) (*NeedleMap, error) {
|
||||
func doLoading(file *os.File, nm *NeedleMap) (*NeedleMap, error) {
|
||||
e := idx.WalkIndexFile(file, 0, func(key NeedleId, offset Offset, size Size) error {
|
||||
nm.MaybeSetMaxFileKey(key)
|
||||
if !offset.IsZero() && size.IsValid() {
|
||||
if !offset.IsZero() && !size.IsDeleted() {
|
||||
nm.FileCounter++
|
||||
nm.FileByteCounter = nm.FileByteCounter + uint64(size)
|
||||
oldOffset, oldSize := nm.m.Set(NeedleId(key), offset, size)
|
||||
|
||||
Reference in New Issue
Block a user