2018-09-25 00:52:40 +00:00
|
|
|
package tsdb
|
|
|
|
|
|
|
|
import (
|
2019-01-08 00:37:16 +00:00
|
|
|
"github.com/influxdata/influxdb/query"
|
2018-09-25 00:52:40 +00:00
|
|
|
)
|
|
|
|
|
2018-10-05 22:02:31 +00:00
|
|
|
// EOF represents a "not found" key returned by a Cursor.
|
|
|
|
const EOF = query.ZeroTime
|
2019-03-20 16:25:24 +00:00
|
|
|
|
|
|
|
const (
|
|
|
|
// DefaultLargeSeriesWriteThreshold is the number of series per write
|
|
|
|
// that requires the series index be pregrown before insert.
|
|
|
|
DefaultLargeSeriesWriteThreshold = 10000
|
|
|
|
)
|
|
|
|
|
|
|
|
// Config contains all of the configuration related to tsdb.
|
|
|
|
type Config struct {
|
|
|
|
// LargeSeriesWriteThreshold is the threshold before a write requires
|
|
|
|
// preallocation to improve throughput. Currently used in the series file.
|
|
|
|
LargeSeriesWriteThreshold int `toml:"large-series-write-threshold"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewConfig return a new instance of config with default settings.
|
|
|
|
func NewConfig() Config {
|
|
|
|
return Config{
|
|
|
|
LargeSeriesWriteThreshold: DefaultLargeSeriesWriteThreshold,
|
|
|
|
}
|
|
|
|
}
|