influxdb icon indicating copy to clipboard operation
influxdb copied to clipboard

[master] FieldCodec in Measurement is limited the count of fieds

Open li-ang opened this issue 10 years ago • 1 comments

The FieldCodec type declaration as following https://github.com/influxdata/influxdb/blob/master/tsdb/shard.go#L799-L802

type FieldCodec struct {
    fieldsByID   map[uint8]*Field
    fieldsByName map[string]*Field
}

fieldsByID is a map struct, the key type is uint8. That means only 255 fields are stored in fieldsByID. I remember that FieldCodec is used in 0.9.x version based BoltDB storage engine with 255 fields limitation. Now, only some influx_inspect code use FieldCodec info and MeasurementFields. So, could we delete the FieldCodec ?


The is a another bug about FieldCodec as following:

Bug report

System info: [InfluxDB : 551cb61d9eb04e70f693786a43b56ba9d9c862ec ]

Steps to reproduce: Writing new points(in only one series) with new fields continuously, the wait time is longer and longer and the CPU usage is quickly increase.

The trouble code cause the bug.

Now I have two method fix the bug, deleting the FieldCodec or fix the trouble code.If you can give me some suggestion that whitch method is better, I would like to focus on the issue and open a Pull Request.

li-ang avatar Jun 18 '16 17:06 li-ang

@jsternberg @jwilder

li-ang avatar Jun 18 '16 17:06 li-ang