Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate and flip -legacy-read-mode to false by default #11665

Merged
merged 4 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
* [10959](https://github.com/grafana/loki/pull/10959) **slim-bean** introduce a backoff wait on subquery retries.
* [11121](https://github.com/grafana/loki/pull/11121) **periklis** Ensure all lifecycler cfgs ref a valid IPv6 addr and port combination
* [10650](https://github.com/grafana/loki/pull/10650) **matthewpi** Ensure the frontend uses a valid IPv6 addr and port combination
* [11665](https://github.com/grafana/loki/pull/11665) **salvacorts** Deprecate and flip `-legacy-read-mode` flag to `false` by default.

#### Promtail

Expand Down
1 change: 1 addition & 0 deletions docs/sources/setup/upgrade/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ This new metric will provide a more clear signal that there is an issue with ing
| `querier.tsdb-max-query-parallelism` | 128 | 512 | - |
| `query-scheduler.max-outstanding-requests-per-tenant` | 32000 | 100 | - |
| `validation.max-label-names-per-series` | 15 | 30 | - |
| `legacy-read-mode` | false | true | Deprecated. It will be removed in the next minor release. |
{{% /responsive-table %}}

#### Write dedupe cache is deprecated
Expand Down
7 changes: 3 additions & 4 deletions pkg/loki/loki.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ type Config struct {
Tracing tracing.Config `yaml:"tracing"`
Analytics analytics.Config `yaml:"analytics"`

LegacyReadTarget bool `yaml:"legacy_read_target,omitempty" doc:"hidden"`
LegacyReadTarget bool `yaml:"legacy_read_target,omitempty" doc:"hidden|deprecated"`

Common common.Config `yaml:"common,omitempty"`

Expand Down Expand Up @@ -136,9 +136,8 @@ func (c *Config) RegisterFlags(f *flag.FlagSet) {
"It will, however, distort metrics, because it is counted as live memory. ",
)

//TODO(trevorwhitney): flip this to false with Loki 3.0
f.BoolVar(&c.LegacyReadTarget, "legacy-read-mode", true, "Set to false to disable the legacy read mode and use new scalable mode with 3rd backend target. "+
"The default will be flipped to false in the next Loki release.")
f.BoolVar(&c.LegacyReadTarget, "legacy-read-mode", false, "Deprecated. Set to true to enable the legacy read mode which includes the components from the backend target. "+
"This setting is deprecated and will be removed in the next minor release.")

f.DurationVar(&c.ShutdownDelay, "shutdown-delay", 0, "How long to wait between SIGTERM and shutdown. After receiving SIGTERM, Loki will report 503 Service Unavailable status via /ready endpoint.")

Expand Down
1 change: 1 addition & 0 deletions tools/deprecated-config-checker/checker/checker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ var (
}

expectedConfigDeprecates = []string{
"legacy-read-mode",
"ruler.remote_write.client",
"index_gateway.ring.replication_factor",
"storage_config.bigtable",
Expand Down
1 change: 1 addition & 0 deletions tools/deprecated-config-checker/deprecated-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# _msg: "Use tsdb (preferred) or boltdb-shipper instead."
#
# Note that even though the configs in schema_config takes a list, here we specify the deprecated fields for each item in the list.
legacy-read-mode: "Legacy read SSD mode is deprecated and will be eventually removed. Use the new read and backend targets."

ruler:
remote_write:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
auth_enabled: false
legacy-read-mode: true

server:
http_listen_port: 3100
Expand Down