Shorten name of static-lifetime string var.
parent
02c86ea9db
commit
68c2212aac
|
@ -60,7 +60,7 @@ var (
|
||||||
|
|
||||||
var (
|
var (
|
||||||
// Static objects to prevent small allocs.
|
// Static objects to prevent small allocs.
|
||||||
staticTimeByteSlice = []byte("time")
|
timeTag = []byte("time")
|
||||||
)
|
)
|
||||||
|
|
||||||
// A ShardError implements the error interface, and contains extra
|
// A ShardError implements the error interface, and contains extra
|
||||||
|
@ -470,9 +470,9 @@ func (s *Shard) validateSeriesAndFields(points []models.Point) ([]*FieldCreate,
|
||||||
for _, p := range points {
|
for _, p := range points {
|
||||||
// verify the tags and fields
|
// verify the tags and fields
|
||||||
tags := p.Tags()
|
tags := p.Tags()
|
||||||
if v := tags.Get(staticTimeByteSlice); v != nil {
|
if v := tags.Get(timeTag); v != nil {
|
||||||
s.logger.Printf("dropping tag 'time' from '%s'\n", p.PrecisionString(""))
|
s.logger.Printf("dropping tag 'time' from '%s'\n", p.PrecisionString(""))
|
||||||
tags.Delete(staticTimeByteSlice)
|
tags.Delete(timeTag)
|
||||||
p.SetTags(tags)
|
p.SetTags(tags)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue