storagenode: fixed logging about piece being moved to trash, and added logging when piece was actually deleted
Change-Id: I46f6a141b27033c2087b5c4681506d80b90f4a18
This commit is contained in:
parent
20184d3604
commit
53a5d18e1a
@ -231,6 +231,7 @@ func (blobs *BlobsUsageCache) Delete(ctx context.Context, blobRef storage.BlobRe
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
blobs.Update(ctx, satelliteID, -pieceTotal, -pieceContentSize, 0)
|
blobs.Update(ctx, satelliteID, -pieceTotal, -pieceContentSize, 0)
|
||||||
|
blobs.log.Debug("deleted piece", zap.String("satelliteID", satelliteID.String()), zap.Int64("space was freed", pieceContentSize))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -295,6 +295,8 @@ func (store *Store) Delete(ctx context.Context, satellite storj.NodeID, pieceID
|
|||||||
err = errs.Combine(err, store.v0PieceInfo.Delete(ctx, satellite, pieceID))
|
err = errs.Combine(err, store.v0PieceInfo.Delete(ctx, satellite, pieceID))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
store.log.Debug("deleted piece", zap.String("satelliteID", satellite.String()), zap.String("pieceID", pieceID.String()))
|
||||||
|
|
||||||
return Error.Wrap(err)
|
return Error.Wrap(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -378,7 +378,7 @@ func (s *Service) retainPieces(ctx context.Context, req Request) (err error) {
|
|||||||
}
|
}
|
||||||
pieceID := access.PieceID()
|
pieceID := access.PieceID()
|
||||||
if !filter.Contains(pieceID) {
|
if !filter.Contains(pieceID) {
|
||||||
s.log.Debug("About to delete piece id",
|
s.log.Debug("About to move piece to trash",
|
||||||
zap.Stringer("Satellite ID", satelliteID),
|
zap.Stringer("Satellite ID", satelliteID),
|
||||||
zap.Stringer("Piece ID", pieceID),
|
zap.Stringer("Piece ID", pieceID),
|
||||||
zap.String("Status", s.config.Status.String()))
|
zap.String("Status", s.config.Status.String()))
|
||||||
@ -408,7 +408,7 @@ func (s *Service) retainPieces(ctx context.Context, req Request) (err error) {
|
|||||||
return Error.Wrap(err)
|
return Error.Wrap(err)
|
||||||
}
|
}
|
||||||
mon.IntVal("garbage_collection_pieces_deleted").Observe(int64(numDeleted))
|
mon.IntVal("garbage_collection_pieces_deleted").Observe(int64(numDeleted))
|
||||||
s.log.Debug("Deleted pieces during retain", zap.Int("num deleted", numDeleted), zap.String("Retain Status", s.config.Status.String()))
|
s.log.Debug("Moved pieces to trash during retain", zap.Int("num deleted", numDeleted), zap.String("Retain Status", s.config.Status.String()))
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user