removes recover flag (#3326)

pull/3329/head
Owen Diehl 5 years ago committed by GitHub
parent d4fdccbf6f
commit 8a9b94a8bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      cmd/loki/loki-local-config.yaml
  2. 4
      docs/sources/configuration/_index.md
  3. 1
      pkg/ingester/checkpoint_test.go
  4. 2
      pkg/ingester/ingester.go
  5. 2
      pkg/ingester/wal.go
  6. 1
      production/ksonnet/loki/wal.libsonnet

@ -7,7 +7,6 @@ ingester:
wal:
enabled: true
dir: /tmp/wal
recover: true
lifecycler:
address: 127.0.0.1
ring:

@ -907,10 +907,6 @@ wal:
# CLI flag: -ingester.wal-dir
[dir: <filename> | default = "wal"]
# Recover data from existing WAL dir irrespective of WAL enabled/disabled.
# CLI flag: -ingester.recover-from-wal
[recover: <boolean> | default = false]
# When WAL is enabled, should chunks be flushed to long-term storage on shutdown.
# CLI flag: -ingester.flush-on-shutdown
[flush_on_shutdown: <boolean> | default = false]

@ -49,7 +49,6 @@ func defaultIngesterTestConfigWithWAL(t *testing.T, walDir string) Config {
ingesterConfig.MaxTransferRetries = 0
ingesterConfig.WAL.Enabled = true
ingesterConfig.WAL.Dir = walDir
ingesterConfig.WAL.Recover = true
ingesterConfig.WAL.CheckpointDuration = time.Second
return ingesterConfig

@ -220,7 +220,7 @@ func New(cfg Config, clientConfig client.Config, store ChunkStore, limits *valid
func (i *Ingester) starting(ctx context.Context) error {
if i.cfg.WAL.Recover {
if i.cfg.WAL.Enabled {
// Ignore retain period during wal replay.
old := i.cfg.RetainPeriod
i.cfg.RetainPeriod = 0

@ -26,7 +26,6 @@ const defaultCeiling = 4 << 30 // 4GB
type WALConfig struct {
Enabled bool `yaml:"enabled"`
Dir string `yaml:"dir"`
Recover bool `yaml:"recover"`
CheckpointDuration time.Duration `yaml:"checkpoint_duration"`
FlushOnShutdown bool `yaml:"flush_on_shutdown"`
ReplayMemoryCeiling flagext.ByteSize `yaml:"replay_memory_ceiling"`
@ -43,7 +42,6 @@ func (cfg *WALConfig) Validate() error {
func (cfg *WALConfig) RegisterFlags(f *flag.FlagSet) {
f.StringVar(&cfg.Dir, "ingester.wal-dir", "wal", "Directory to store the WAL and/or recover from WAL.")
f.BoolVar(&cfg.Enabled, "ingester.wal-enabled", false, "Enable writing of ingested data into WAL.")
f.BoolVar(&cfg.Recover, "ingester.recover-from-wal", false, "Recover data from existing WAL irrespective of WAL enabled/disabled.")
f.DurationVar(&cfg.CheckpointDuration, "ingester.checkpoint-duration", 5*time.Minute, "Interval at which checkpoints should be created.")
f.BoolVar(&cfg.FlushOnShutdown, "ingester.flush-on-shutdown", false, "When WAL is enabled, should chunks be flushed to long-term storage on shutdown.")

@ -12,7 +12,6 @@
wal+: {
enabled: true,
dir: '/loki/wal',
recover: true,
replay_memory_ceiling: '9GB', // between the requests & limits
},
},

Loading…
Cancel
Save