Skip to content

Commit

Permalink
removes recover flag (#3326)
Browse files Browse the repository at this point in the history
  • Loading branch information
owen-d authored Feb 11, 2021
1 parent d4fdccb commit 8a9b94a
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 10 deletions.
1 change: 0 additions & 1 deletion cmd/loki/loki-local-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ ingester:
wal:
enabled: true
dir: /tmp/wal
recover: true
lifecycler:
address: 127.0.0.1
ring:
Expand Down
4 changes: 0 additions & 4 deletions docs/sources/configuration/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
1 change: 0 additions & 1 deletion pkg/ingester/checkpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkg/ingester/ingester.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions pkg/ingester/wal.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand All @@ -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.")

Expand Down
1 change: 0 additions & 1 deletion production/ksonnet/loki/wal.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
wal+: {
enabled: true,
dir: '/loki/wal',
recover: true,
replay_memory_ceiling: '9GB', // between the requests & limits
},
},
Expand Down

0 comments on commit 8a9b94a

Please sign in to comment.