Skip to content

Commit

Permalink
Address nits.
Browse files Browse the repository at this point in the history
  • Loading branch information
notbdu committed Nov 20, 2020
1 parent b749b66 commit 2fd2d35
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/dbnode/persist/fs/merger.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ func (m *merger) Merge(
Type: persist.SeriesDocumentType,
Document: seriesMetadata,
// The lifetime of the shard series metadata is longly lived.
LifeTime: persist.SeriesMetadataLifeTimeLongLived,
LifeTime: persist.SeriesMetadataLifeTimeLong,
},
})
}
Expand Down
16 changes: 8 additions & 8 deletions src/dbnode/persist/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,19 +321,19 @@ const (
)

// SeriesMetadataLifeTime describes the memory life time type.
type SeriesMetadataLifeTime int
type SeriesMetadataLifeTime uint8

const (
// SeriesMetadataLifeTimeLongLived means the underlying memory's life time is long lived and exceeds
// SeriesMetadataLifeTimeLong means the underlying memory's life time is long lived and exceeds
// the execution duration of the series metadata receiver.
SeriesMetadataLifeTimeLongLived SeriesMetadataLifeTime = iota
SeriesMetadataLifeTimeLong SeriesMetadataLifeTime = iota
// SeriesMetadataLifeTimeShortLived means that the underlying memory is only valid for the duration
// of the OnFlushNewSeries call. Must clone the underlying bytes in order to extend the life time.
SeriesMetadataLifeTimeShortLived
)

// SeriesMetadataType describes the type of series metadata.
type SeriesMetadataType int
type SeriesMetadataType uint8

const (
// SeriesDocumentType means the metadata is in doc.Document form.
Expand All @@ -344,17 +344,17 @@ const (

// IDAndEncodedTags contains a series ID and encoded tags.
type IDAndEncodedTags struct {
ID []byte
EncodedTags []byte
ID ident.BytesID
EncodedTags ts.EncodedTags
}

// SeriesMetadata captures different representations of series metadata and
// the ownership status of the underlying memory.
type SeriesMetadata struct {
Type SeriesMetadataType
LifeTime SeriesMetadataLifeTime
Document doc.Document
IDAndEncodedTags IDAndEncodedTags
Type SeriesMetadataType
LifeTime SeriesMetadataLifeTime
}

// OnFlushNewSeriesEvent is the fields related to a flush of a new series.
Expand Down

0 comments on commit 2fd2d35

Please sign in to comment.