diff --git a/docs/sources/shared/configuration.md b/docs/sources/shared/configuration.md index 234e7a06969e..a4e9c682b9af 100644 --- a/docs/sources/shared/configuration.md +++ b/docs/sources/shared/configuration.md @@ -114,36 +114,6 @@ Pass the `-config.expand-env` flag at the command line to enable this way of set # querier. [querier: ] -querier_rf1: - # Enable the RF1 querier. If set, replaces the usual querier with an RF-1 - # querier. - # CLI flag: -querier-rf1.enabled - [enabled: | default = false] - - # Time to wait before sending more than the minimum successful query requests. - # CLI flag: -querier-rf1.extra-query-delay - [extra_query_delay: | default = 0s] - - engine: - # The maximum amount of time to look back for log lines. Used only for - # instant log queries. - # CLI flag: -querier-rf1.engine.max-lookback-period - [max_look_back_period: | default = 30s] - - # The maximum number of labels the heap of a topk query using a count min - # sketch can track. - # CLI flag: -querier-rf1.engine.max-count-min-sketch-heap-size - [max_count_min_sketch_heap_size: | default = 10000] - - # The maximum number of queries that can be simultaneously processed by the - # querier. - # CLI flag: -querier-rf1.max-concurrent - [max_concurrent: | default = 4] - - # When true, querier limits sent via a header are enforced. - # CLI flag: -querier-rf1.per-request-limits-enabled - [per_request_limits_enabled: | default = false] - # The query_scheduler block configures the Loki query scheduler. When configured # it separates the tenant query queues from the query-frontend. [query_scheduler: ] @@ -163,11 +133,6 @@ querier_rf1: # the querier. [ingester_client: ] -# The ingester_client block configures how the distributor will connect to -# ingesters. Only appropriate when running all components, the distributor, or -# the querier. -[ingester_rf1_client: ] - # The ingester block configures the ingester and how the ingester will register # itself to a key value store. [ingester: ] @@ -338,7 +303,7 @@ pattern_ingester: # Configures how the gRPC connection to ingesters work as a client. # The CLI flags prefix for this block configuration is: - # bloom-build.builder.grpc + # pattern-ingester.client [grpc_client_config: ] # How many flushes can happen concurrently from each stream. @@ -745,33 +710,6 @@ compactor_grpc_client: # a ring unless otherwise specified in the component's configuration section. [memberlist: ] -metastore: - # CLI flag: -metastore.data-dir - [data_dir: | default = "./data-metastore/data"] - - raft: - # CLI flag: -metastore.raft.dir - [dir: | default = "./data-metastore/raft"] - - # CLI flag: -metastore.raft.bootstrap-peers - [bootstrap_peers: | default = []] - - # CLI flag: -metastore.raft.server-id - [server_id: | default = "localhost:9099"] - - # CLI flag: -metastore.raft.bind-address - [bind_address: | default = "localhost:9099"] - - # CLI flag: -metastore.raft.advertise-address - [advertise_address: | default = "localhost:9099"] - -metastore_client: - # CLI flag: -metastore.address - [address: | default = "localhost:9095"] - - # Configures the gRPC client used to communicate with the metastore. - [grpc_client_config: ] - kafka_config: # The Kafka backend address. # CLI flag: -kafka.address @@ -1290,7 +1228,7 @@ builder: # The grpc_client block configures the gRPC client used to communicate between # a client and server component in Loki. # The CLI flags prefix for this block configuration is: - # bloom-gateway-client.grpc + # bloom-build.builder.grpc [grpc_config: ] # Hostname (and port) of the bloom planner @@ -1329,7 +1267,8 @@ client: # The grpc_client block configures the gRPC client used to communicate between # a client and server component in Loki. - # The CLI flags prefix for this block configuration is: bigtable + # The CLI flags prefix for this block configuration is: + # bloom-gateway-client.grpc [grpc_client_config: ] results_cache: @@ -2538,20 +2477,20 @@ The `frontend_worker` configures the worker - running within the Loki querier - # Configures the querier gRPC client used to communicate with the # query-frontend. This can't be used in conjunction with 'grpc_client_config'. -# The CLI flags prefix for this block configuration is: querier.frontend-client +# The CLI flags prefix for this block configuration is: +# querier.frontend-grpc-client [query_frontend_grpc_client: ] # Configures the querier gRPC client used to communicate with the query-frontend # and with the query-scheduler. This can't be used in conjunction with # 'query_frontend_grpc_client' or 'query_scheduler_grpc_client'. -# The CLI flags prefix for this block configuration is: -# querier.scheduler-grpc-client +# The CLI flags prefix for this block configuration is: querier.frontend-client [grpc_client_config: ] # Configures the querier gRPC client used to communicate with the # query-scheduler. This can't be used in conjunction with 'grpc_client_config'. # The CLI flags prefix for this block configuration is: -# metastore.grpc-client-config +# querier.scheduler-grpc-client [query_scheduler_grpc_client: ] ``` @@ -2609,7 +2548,6 @@ The `grpc_client` block configures the gRPC client used to communicate between a - `boltdb.shipper.index-gateway-client.grpc` - `frontend.grpc-client-config` - `ingester.client` -- `metastore.grpc-client-config` - `pattern-ingester.client` - `querier.frontend-client` - `querier.frontend-grpc-client` @@ -2622,82 +2560,82 @@ The `grpc_client` block configures the gRPC client used to communicate between a ```yaml # gRPC client max receive message size (bytes). -# CLI flag: -boltdb.shipper.index-gateway-client.grpc.grpc-max-recv-msg-size +# CLI flag: -.grpc-max-recv-msg-size [max_recv_msg_size: | default = 104857600] # gRPC client max send message size (bytes). -# CLI flag: -boltdb.shipper.index-gateway-client.grpc.grpc-max-send-msg-size +# CLI flag: -.grpc-max-send-msg-size [max_send_msg_size: | default = 104857600] # Use compression when sending messages. Supported values are: 'gzip', 'snappy' # and '' (disable compression) -# CLI flag: -boltdb.shipper.index-gateway-client.grpc.grpc-compression +# CLI flag: -.grpc-compression [grpc_compression: | default = ""] # Rate limit for gRPC client; 0 means disabled. -# CLI flag: -boltdb.shipper.index-gateway-client.grpc.grpc-client-rate-limit +# CLI flag: -.grpc-client-rate-limit [rate_limit: | default = 0] # Rate limit burst for gRPC client. -# CLI flag: -boltdb.shipper.index-gateway-client.grpc.grpc-client-rate-limit-burst +# CLI flag: -.grpc-client-rate-limit-burst [rate_limit_burst: | default = 0] # Enable backoff and retry when we hit rate limits. -# CLI flag: -boltdb.shipper.index-gateway-client.grpc.backoff-on-ratelimits +# CLI flag: -.backoff-on-ratelimits [backoff_on_ratelimits: | default = false] backoff_config: # Minimum delay when backing off. - # CLI flag: -boltdb.shipper.index-gateway-client.grpc.backoff-min-period + # CLI flag: -.backoff-min-period [min_period: | default = 100ms] # Maximum delay when backing off. - # CLI flag: -boltdb.shipper.index-gateway-client.grpc.backoff-max-period + # CLI flag: -.backoff-max-period [max_period: | default = 10s] # Number of times to backoff and retry before failing. - # CLI flag: -boltdb.shipper.index-gateway-client.grpc.backoff-retries + # CLI flag: -.backoff-retries [max_retries: | default = 10] # Initial stream window size. Values less than the default are not supported and # are ignored. Setting this to a value other than the default disables the BDP # estimator. -# CLI flag: -boltdb.shipper.index-gateway-client.grpc.initial-stream-window-size +# CLI flag: -.initial-stream-window-size [initial_stream_window_size: | default = 63KiB1023B] # Initial connection window size. Values less than the default are not supported # and are ignored. Setting this to a value other than the default disables the # BDP estimator. -# CLI flag: -boltdb.shipper.index-gateway-client.grpc.initial-connection-window-size +# CLI flag: -.initial-connection-window-size [initial_connection_window_size: | default = 63KiB1023B] # Enable TLS in the gRPC client. This flag needs to be enabled when any other # TLS flag is set. If set to false, insecure connection to gRPC server will be # used. -# CLI flag: -boltdb.shipper.index-gateway-client.grpc.tls-enabled +# CLI flag: -.tls-enabled [tls_enabled: | default = false] # Path to the client certificate, which will be used for authenticating with the # server. Also requires the key path to be configured. -# CLI flag: -boltdb.shipper.index-gateway-client.grpc.tls-cert-path +# CLI flag: -.tls-cert-path [tls_cert_path: | default = ""] # Path to the key for the client certificate. Also requires the client # certificate to be configured. -# CLI flag: -boltdb.shipper.index-gateway-client.grpc.tls-key-path +# CLI flag: -.tls-key-path [tls_key_path: | default = ""] # Path to the CA certificates to validate server certificate against. If not # set, the host's root CA certificates are used. -# CLI flag: -boltdb.shipper.index-gateway-client.grpc.tls-ca-path +# CLI flag: -.tls-ca-path [tls_ca_path: | default = ""] # Override the expected name on the server certificate. -# CLI flag: -boltdb.shipper.index-gateway-client.grpc.tls-server-name +# CLI flag: -.tls-server-name [tls_server_name: | default = ""] # Skip validating server certificate. -# CLI flag: -boltdb.shipper.index-gateway-client.grpc.tls-insecure-skip-verify +# CLI flag: -.tls-insecure-skip-verify [tls_insecure_skip_verify: | default = false] # Override the default cipher suite list (separated by commas). Allowed values: @@ -2730,27 +2668,27 @@ backoff_config: # - TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA # - TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 # - TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 -# CLI flag: -boltdb.shipper.index-gateway-client.grpc.tls-cipher-suites +# CLI flag: -.tls-cipher-suites [tls_cipher_suites: | default = ""] # Override the default minimum TLS version. Allowed values: VersionTLS10, # VersionTLS11, VersionTLS12, VersionTLS13 -# CLI flag: -boltdb.shipper.index-gateway-client.grpc.tls-min-version +# CLI flag: -.tls-min-version [tls_min_version: | default = ""] # The maximum amount of time to establish a connection. A value of 0 means # default gRPC client connect timeout and backoff. -# CLI flag: -boltdb.shipper.index-gateway-client.grpc.connect-timeout +# CLI flag: -.connect-timeout [connect_timeout: | default = 5s] # Initial backoff delay after first connection failure. Only relevant if # ConnectTimeout > 0. -# CLI flag: -boltdb.shipper.index-gateway-client.grpc.connect-backoff-base-delay +# CLI flag: -.connect-backoff-base-delay [connect_backoff_base_delay: | default = 1s] # Maximum backoff delay when establishing a connection. Only relevant if # ConnectTimeout > 0. -# CLI flag: -boltdb.shipper.index-gateway-client.grpc.connect-backoff-max-delay +# CLI flag: -.connect-backoff-max-delay [connect_backoff_max_delay: | default = 5s] ``` @@ -5439,8 +5377,7 @@ bigtable: # The grpc_client block configures the gRPC client used to communicate between # a client and server component in Loki. - # The CLI flags prefix for this block configuration is: - # boltdb.shipper.index-gateway-client.grpc + # The CLI flags prefix for this block configuration is: bigtable [grpc_client_config: ] # If enabled, once a tables info is fetched, it is cached. @@ -5734,7 +5671,7 @@ boltdb_shipper: # The grpc_client block configures the gRPC client used to communicate # between a client and server component in Loki. # The CLI flags prefix for this block configuration is: - # tsdb.shipper.index-gateway-client.grpc + # boltdb.shipper.index-gateway-client.grpc [grpc_client_config: ] # Hostname or IP of the Index Gateway gRPC server running in simple mode. @@ -5789,7 +5726,7 @@ tsdb_shipper: # The grpc_client block configures the gRPC client used to communicate # between a client and server component in Loki. # The CLI flags prefix for this block configuration is: - # querier.frontend-grpc-client + # tsdb.shipper.index-gateway-client.grpc [grpc_client_config: ] # Hostname or IP of the Index Gateway gRPC server running in simple mode. diff --git a/pkg/loki/loki.go b/pkg/loki/loki.go index 52af53b1b055..adbda15a90be 100644 --- a/pkg/loki/loki.go +++ b/pkg/loki/loki.go @@ -39,9 +39,6 @@ import ( "github.com/grafana/loki/v3/pkg/distributor" "github.com/grafana/loki/v3/pkg/indexgateway" "github.com/grafana/loki/v3/pkg/ingester" - ingester_rf1 "github.com/grafana/loki/v3/pkg/ingester-rf1" - "github.com/grafana/loki/v3/pkg/ingester-rf1/metastore" - metastoreclient "github.com/grafana/loki/v3/pkg/ingester-rf1/metastore/client" ingester_client "github.com/grafana/loki/v3/pkg/ingester/client" "github.com/grafana/loki/v3/pkg/kafka" ingester_kafka "github.com/grafana/loki/v3/pkg/kafka/ingester" @@ -51,7 +48,6 @@ import ( "github.com/grafana/loki/v3/pkg/lokifrontend/frontend/transport" "github.com/grafana/loki/v3/pkg/pattern" "github.com/grafana/loki/v3/pkg/querier" - querierrf1 "github.com/grafana/loki/v3/pkg/querier-rf1" "github.com/grafana/loki/v3/pkg/querier/queryrange" "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" "github.com/grafana/loki/v3/pkg/querier/worker" @@ -87,14 +83,12 @@ type Config struct { InternalServer internalserver.Config `yaml:"internal_server,omitempty" doc:"hidden"` Distributor distributor.Config `yaml:"distributor,omitempty"` Querier querier.Config `yaml:"querier,omitempty"` - QuerierRF1 querierrf1.Config `yaml:"querier_rf1,omitempty"` QueryScheduler scheduler.Config `yaml:"query_scheduler"` Frontend lokifrontend.Config `yaml:"frontend,omitempty"` QueryRange queryrange.Config `yaml:"query_range,omitempty"` Ruler ruler.Config `yaml:"ruler,omitempty"` RulerStorage rulestore.Config `yaml:"ruler_storage,omitempty" doc:"hidden"` IngesterClient ingester_client.Config `yaml:"ingester_client,omitempty"` - IngesterRF1Client ingester_client.Config `yaml:"ingester_rf1_client,omitempty"` Ingester ingester.Config `yaml:"ingester,omitempty"` Pattern pattern.Config `yaml:"pattern_ingester,omitempty"` IndexGateway indexgateway.Config `yaml:"index_gateway"` @@ -110,8 +104,6 @@ type Config struct { Worker worker.Config `yaml:"frontend_worker,omitempty"` TableManager index.TableManagerConfig `yaml:"table_manager,omitempty"` MemberlistKV memberlist.KVConfig `yaml:"memberlist"` - Metastore metastore.Config `yaml:"metastore,omitempty"` - MetastoreClient metastoreclient.Config `yaml:"metastore_client"` KafkaConfig kafka.Config `yaml:"kafka_config,omitempty" category:"experimental"` RuntimeConfig runtimeconfig.Config `yaml:"runtime_config,omitempty"` @@ -166,7 +158,6 @@ func (c *Config) RegisterFlags(f *flag.FlagSet) { c.Common.RegisterFlags(f) c.Distributor.RegisterFlags(f) c.Querier.RegisterFlags(f) - c.QuerierRF1.RegisterFlags(f) c.CompactorHTTPClient.RegisterFlags(f) c.CompactorGRPCClient.RegisterFlags(f) c.IngesterClient.RegisterFlags(f) @@ -192,8 +183,6 @@ func (c *Config) RegisterFlags(f *flag.FlagSet) { c.Analytics.RegisterFlags(f) c.OperationalConfig.RegisterFlags(f) c.Profiling.RegisterFlags(f) - c.Metastore.RegisterFlags(f) - c.MetastoreClient.RegisterFlags(f) c.KafkaConfig.RegisterFlags(f) } @@ -359,8 +348,6 @@ type Loki struct { TenantLimits validation.TenantLimits distributor *distributor.Distributor Ingester ingester.Interface - IngesterRF1 ingester_rf1.Interface - IngesterRF1RingClient *ingester_rf1.RingClient PatternIngester *pattern.Ingester PatternRingClient pattern.RingClient Querier querier.Querier @@ -384,7 +371,6 @@ type Loki struct { querySchedulerRingManager *lokiring.RingManager usageReport *analytics.Reporter indexGatewayRingManager *lokiring.RingManager - MetastoreClient *metastoreclient.Client partitionRingWatcher *ring.PartitionRingWatcher partitionRing *ring.PartitionInstanceRing kafkaIngester *ingester_kafka.Ingester @@ -426,8 +412,6 @@ func (t *Loki) setupAuthMiddleware() { []string{ "/grpc.health.v1.Health/Check", "/grpc.health.v1.Health/Watch", - "/metastorepb.MetastoreService/AddBlock", - "/metastorepb.MetastoreService/ListBlocksForQuery", "/logproto.StreamData/GetStreamRates", "/frontend.Frontend/Process", "/frontend.Frontend/NotifyClientShutdown", @@ -644,15 +628,6 @@ func (t *Loki) readyHandler(sm *services.Manager, shutdownRequested *atomic.Bool } } - // Ingester RF1 has a special check that makes sure that it was able to register into the ring, - // and that all other ring entries are OK too. - if t.IngesterRF1 != nil { - if err := t.IngesterRF1.CheckReady(r.Context()); err != nil { - http.Error(w, "RF-1 Ingester not ready: "+err.Error(), http.StatusServiceUnavailable) - return - } - } - // Query Frontend has a special check that makes sure that a querier is attached before it signals // itself as ready if t.frontend != nil { diff --git a/pkg/loki/modules.go b/pkg/loki/modules.go index e2366d374ebf..b8ebc89b6475 100644 --- a/pkg/loki/modules.go +++ b/pkg/loki/modules.go @@ -47,7 +47,6 @@ import ( "github.com/grafana/loki/v3/pkg/distributor" "github.com/grafana/loki/v3/pkg/indexgateway" "github.com/grafana/loki/v3/pkg/ingester" - "github.com/grafana/loki/v3/pkg/ingester-rf1/objstore" "github.com/grafana/loki/v3/pkg/logproto" "github.com/grafana/loki/v3/pkg/logql" "github.com/grafana/loki/v3/pkg/logqlmodel/stats" @@ -57,7 +56,6 @@ import ( "github.com/grafana/loki/v3/pkg/lokifrontend/frontend/v2/frontendv2pb" "github.com/grafana/loki/v3/pkg/pattern" "github.com/grafana/loki/v3/pkg/querier" - querierrf1 "github.com/grafana/loki/v3/pkg/querier-rf1" "github.com/grafana/loki/v3/pkg/querier/queryrange" "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" "github.com/grafana/loki/v3/pkg/ruler" @@ -394,21 +392,9 @@ func (t *Loki) initQuerier() (services.Service, error) { return nil, err } - if t.Cfg.QuerierRF1.Enabled { - logger.Log("Using RF-1 querier implementation") - store, err := objstore.New(t.Cfg.SchemaConfig.Configs, t.Cfg.StorageConfig, t.ClientMetrics) - if err != nil { - return nil, err - } - t.Querier, err = querierrf1.New(t.Cfg.QuerierRF1, t.Store, t.Overrides, deleteStore, t.MetastoreClient, store, logger) - if err != nil { - return nil, err - } - } else { - t.Querier, err = querier.New(t.Cfg.Querier, t.Store, t.ingesterQuerier, t.Overrides, deleteStore, prometheus.DefaultRegisterer, logger) - if err != nil { - return nil, err - } + t.Querier, err = querier.New(t.Cfg.Querier, t.Store, t.ingesterQuerier, t.Overrides, deleteStore, prometheus.DefaultRegisterer, logger) + if err != nil { + return nil, err } if t.Cfg.Pattern.Enabled {