Change default engine to tsm1
data engine config var is ignored now and you can only create tsm1 shards. Exists shards will work as is until they are migrated to tsm1 shards.pull/5331/head
parent
24f1bcfd20
commit
15d723dc77
|
@ -45,13 +45,6 @@ reporting-disabled = false
|
||||||
[data]
|
[data]
|
||||||
dir = "/var/lib/influxdb/data"
|
dir = "/var/lib/influxdb/data"
|
||||||
|
|
||||||
# Controls the storage engine used for new shards. Engines available are b1,
|
|
||||||
# bz1, and tsm1. b1 was the original default engine from 0.9.0 to 0.9.2. bz1
|
|
||||||
# has been the default engine since 0.9.3. tsm1 was introduced in 0.9.5 and is
|
|
||||||
# currently EXPERIMENTAL. Consequently, data written into the tsm1 engine may
|
|
||||||
# need to be wiped between upgrades.
|
|
||||||
# engine ="bz1"
|
|
||||||
|
|
||||||
# The following WAL settings are for the b1 storage engine used in 0.9.2. They won't
|
# The following WAL settings are for the b1 storage engine used in 0.9.2. They won't
|
||||||
# apply to any new shards created after upgrading to a version > 0.9.3.
|
# apply to any new shards created after upgrading to a version > 0.9.3.
|
||||||
max-wal-size = 104857600 # Maximum size the WAL can reach before a flush. Defaults to 100MB.
|
max-wal-size = 104857600 # Maximum size the WAL can reach before a flush. Defaults to 100MB.
|
||||||
|
|
|
@ -3,8 +3,6 @@ package tsdb
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
|
||||||
"os"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/influxdb/influxdb/toml"
|
"github.com/influxdb/influxdb/toml"
|
||||||
|
@ -12,7 +10,7 @@ import (
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// DefaultEngine is the default engine for new shards
|
// DefaultEngine is the default engine for new shards
|
||||||
DefaultEngine = "bz1"
|
DefaultEngine = "tsm1"
|
||||||
|
|
||||||
// DefaultMaxWALSize is the default size of the WAL before it is flushed.
|
// DefaultMaxWALSize is the default size of the WAL before it is flushed.
|
||||||
DefaultMaxWALSize = 100 * 1024 * 1024 // 100MB
|
DefaultMaxWALSize = 100 * 1024 * 1024 // 100MB
|
||||||
|
@ -104,14 +102,8 @@ type Config struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewConfig() Config {
|
func NewConfig() Config {
|
||||||
defaultEngine := DefaultEngine
|
|
||||||
if engine := os.Getenv("INFLUXDB_DATA_ENGINE"); engine != "" {
|
|
||||||
log.Println("TSDB engine selected via environment variable:", engine)
|
|
||||||
defaultEngine = engine
|
|
||||||
}
|
|
||||||
|
|
||||||
return Config{
|
return Config{
|
||||||
Engine: defaultEngine,
|
Engine: DefaultEngine,
|
||||||
MaxWALSize: DefaultMaxWALSize,
|
MaxWALSize: DefaultMaxWALSize,
|
||||||
WALFlushInterval: toml.Duration(DefaultWALFlushInterval),
|
WALFlushInterval: toml.Duration(DefaultWALFlushInterval),
|
||||||
WALPartitionFlushDelay: toml.Duration(DefaultWALPartitionFlushDelay),
|
WALPartitionFlushDelay: toml.Duration(DefaultWALPartitionFlushDelay),
|
||||||
|
|
Loading…
Reference in New Issue