satellite/metainfo: metainfo loop should yield StreamID for segments

Change-Id: If6c86add75ce79ffcfe95353225719c7d4b5a459
This commit is contained in:
Kaloyan Raev 2020-12-14 13:04:38 +02:00
parent e7e6985ae9
commit 7d8f19e94d

View File

@ -41,6 +41,7 @@ func (object *Object) Expired(now time.Time) bool {
// Segment is the segment info passed to Observer by metainfo loop.
type Segment struct {
Location metabase.SegmentLocation // tally, repair, graceful exit, audit
StreamID uuid.UUID // audit
DataSize int // tally, graceful exit
MetadataSize int // tally
Inline bool // metrics
@ -482,6 +483,7 @@ func handleSegment(ctx context.Context, observer *observerContext, location meta
Location: location,
}
loopSegment.StreamID = segment.StreamID
loopSegment.DataSize = int(segment.EncryptedSize) // TODO should this be plain or enrypted size
if segment.Inline() {
loopSegment.Inline = true