Skip to content

Commit

Permalink
use ident.BytesID instead of ident.ID
Browse files Browse the repository at this point in the history
  • Loading branch information
vpranckaitis committed Jan 19, 2021
1 parent a5436e8 commit 8b725f0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/dbnode/storage/index/convert/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ func FromSeriesIDAndTagIter(id ident.ID, tags ident.TagIterator) (doc.Metadata,
}

// FromSeriesIDAndEncodedTags converts the provided series id and encoded tags into a doc.Metadata.
func FromSeriesIDAndEncodedTags(id ident.ID, encodedTags ts.EncodedTags) (doc.Metadata, error) {
func FromSeriesIDAndEncodedTags(id ident.BytesID, encodedTags ts.EncodedTags) (doc.Metadata, error) {
var (
byteOrder = serialize.ByteOrder
total = len(encodedTags)
Expand Down
4 changes: 2 additions & 2 deletions src/dbnode/storage/index/convert/convert_benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ import (
)

type idWithEncodedTags struct {
id ident.ID
id ident.BytesID
encodedTags []byte
}

type idWithTags struct {
id ident.ID
id ident.BytesID
tags ident.Tags
}

Expand Down
4 changes: 2 additions & 2 deletions src/dbnode/storage/index/convert/convert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ func TestFromSeriesIDAndEncodedTags(t *testing.T) {

for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
seriesID := ident.StringID(tt.id)
seriesID := ident.BytesID(tt.id)
d, err := convert.FromSeriesIDAndEncodedTags(seriesID, encodedTags)
assert.NoError(t, err)
assertContentsMatch(t, seriesID, tags.Values(), d)
Expand Down Expand Up @@ -257,7 +257,7 @@ func TestFromSeriesIDAndEncodedTagsInvalid(t *testing.T) {
encodedTags: []byte{117, 39, 1, 0, 0, 0, 3, 0, 98, 97, 122},
},
}
seriesID := ident.StringID("foo")
seriesID := ident.BytesID("foo")

for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down

0 comments on commit 8b725f0

Please sign in to comment.