Browse Source

adjust size

pull/1475/head
Chris Lu 4 years ago
parent
commit
75de7002ff
  1. 3
      unmaintained/diff_volume_servers/diff_volume_servers.go

3
unmaintained/diff_volume_servers/diff_volume_servers.go

@ -158,6 +158,9 @@ func getVolumeFiles(v uint32, addr string) (map[types.NeedleId]needleState, int6
files := map[types.NeedleId]needleState{} files := map[types.NeedleId]needleState{}
err = idx.WalkIndexFile(idxFile, func(key types.NeedleId, offset types.Offset, size types.Size) error { err = idx.WalkIndexFile(idxFile, func(key types.NeedleId, offset types.Offset, size types.Size) error {
if offset.IsZero() || size.IsDeleted() { if offset.IsZero() || size.IsDeleted() {
if size < 0 {
size = -size
}
files[key] = needleState{ files[key] = needleState{
state: stateDeleted, state: stateDeleted,
size: size, size: size,

Loading…
Cancel
Save