Skip to content

Commit f0cc0e1

Browse files
committed
Change distributor.remote-write2-enabled naming
Signed-off-by: SungJin1212 <[email protected]>
1 parent 18ce557 commit f0cc0e1

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

docs/configuration/config-file-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3142,7 +3142,7 @@ ha_tracker:
31423142
31433143
# EXPERIMENTAL: If true, accept prometheus remote write v2 protocol push
31443144
# request.
3145-
# CLI flag: -distributor.remote-write2-enabled
3145+
# CLI flag: -distributor.remote-writev2-enabled
31463146
[remote_write2_enabled: <boolean> | default = false]
31473147
31483148
ring:

docs/configuration/v1-guarantees.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Currently experimental features are:
5959
- Distributor:
6060
- Do not extend writes on unhealthy ingesters (`-distributor.extend-writes=false`)
6161
- Accept multiple HA pairs in the same request (enabled via `-experimental.distributor.ha-tracker.mixed-ha-samples=true`)
62-
- Accept Prometheus remote write 2.0 request (`-distributor.remote-write2-enabled=true`)
62+
- Accept Prometheus remote write 2.0 request (`-distributor.remote-writev2-enabled=true`)
6363
- Tenant Deletion in Purger, for blocks storage.
6464
- Query-frontend: query stats tracking (`-frontend.query-stats-enabled`)
6565
- Blocks storage bucket index

integration/remote_write_v2_test.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
)
2626

2727
func TestIngesterRollingUpdate(t *testing.T) {
28-
// Test ingester rolling update situation: when -distributor.remote-write2-enabled is true, and ingester uses the v1.19.0 image.
28+
// Test ingester rolling update situation: when -distributor.remote-writev2-enabled is true, and ingester uses the v1.19.0 image.
2929
// Expected: remote write 2.0 push success
3030
const blockRangePeriod = 5 * time.Second
3131
ingesterImage := "quay.io/cortexproject/cortex:v1.19.0"
@@ -65,7 +65,7 @@ func TestIngesterRollingUpdate(t *testing.T) {
6565
)
6666

6767
distributorFlag := mergeFlags(flags, map[string]string{
68-
"-distributor.remote-write2-enabled": "true",
68+
"-distributor.remote-writev2-enabled": "true",
6969
})
7070

7171
// make alert manager config dir
@@ -139,7 +139,7 @@ func TestIngesterRollingUpdate(t *testing.T) {
139139
}
140140

141141
func TestIngest_SenderSendPRW2_DistributorNotAllowPRW2(t *testing.T) {
142-
// Test `-distributor.remote-write2-enabled=false` but the Sender pushes PRW2
142+
// Test `-distributor.remote-writev2-enabled=false` but the Sender pushes PRW2
143143
// Expected: status code is 200, but samples are not written.
144144
const blockRangePeriod = 5 * time.Second
145145

@@ -169,8 +169,8 @@ func TestIngest_SenderSendPRW2_DistributorNotAllowPRW2(t *testing.T) {
169169
"-ring.store": "consul",
170170
"-consul.hostname": consul.NetworkHTTPEndpoint(),
171171
// Distributor.
172-
"-distributor.replication-factor": "1",
173-
"-distributor.remote-write2-enabled": "false",
172+
"-distributor.replication-factor": "1",
173+
"-distributor.remote-writev2-enabled": "false",
174174
// Store-gateway.
175175
"-store-gateway.sharding-enabled": "false",
176176
// alert manager
@@ -237,8 +237,8 @@ func TestIngest(t *testing.T) {
237237
"-ring.store": "consul",
238238
"-consul.hostname": consul.NetworkHTTPEndpoint(),
239239
// Distributor.
240-
"-distributor.replication-factor": "1",
241-
"-distributor.remote-write2-enabled": "true",
240+
"-distributor.replication-factor": "1",
241+
"-distributor.remote-writev2-enabled": "true",
242242
// Store-gateway.
243243
"-store-gateway.sharding-enabled": "false",
244244
// alert manager
@@ -336,8 +336,8 @@ func TestExemplar(t *testing.T) {
336336
"-consul.hostname": consul.NetworkHTTPEndpoint(),
337337
"-ingester.max-exemplars": "100",
338338
// Distributor.
339-
"-distributor.replication-factor": "1",
340-
"-distributor.remote-write2-enabled": "true",
339+
"-distributor.replication-factor": "1",
340+
"-distributor.remote-writev2-enabled": "true",
341341
// Store-gateway.
342342
"-store-gateway.sharding-enabled": "false",
343343
// alert manager
@@ -420,8 +420,8 @@ func Test_WriteStatWithReplication(t *testing.T) {
420420
"-consul.hostname": consul.NetworkHTTPEndpoint(),
421421
"-ingester.max-exemplars": "100",
422422
// Distributor.
423-
"-distributor.replication-factor": "3",
424-
"-distributor.remote-write2-enabled": "true",
423+
"-distributor.replication-factor": "3",
424+
"-distributor.remote-writev2-enabled": "true",
425425
// Store-gateway.
426426
"-store-gateway.sharding-enabled": "false",
427427
// alert manager

pkg/distributor/distributor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ func (cfg *Config) RegisterFlags(f *flag.FlagSet) {
215215
f.BoolVar(&cfg.ExtendWrites, "distributor.extend-writes", true, "Try writing to an additional ingester in the presence of an ingester not in the ACTIVE state. It is useful to disable this along with -ingester.unregister-on-shutdown=false in order to not spread samples to extra ingesters during rolling restarts with consistent naming.")
216216
f.BoolVar(&cfg.ZoneResultsQuorumMetadata, "distributor.zone-results-quorum-metadata", false, "Experimental, this flag may change in the future. If zone awareness and this both enabled, when querying metadata APIs (labels names and values for now), only results from quorum number of zones will be included.")
217217
f.IntVar(&cfg.NumPushWorkers, "distributor.num-push-workers", 0, "EXPERIMENTAL: Number of go routines to handle push calls from distributors to ingesters. When no workers are available, a new goroutine will be spawned automatically. If set to 0 (default), workers are disabled, and a new goroutine will be created for each push request.")
218-
f.BoolVar(&cfg.RemoteWrite2Enabled, "distributor.remote-write2-enabled", false, "EXPERIMENTAL: If true, accept prometheus remote write v2 protocol push request.")
218+
f.BoolVar(&cfg.RemoteWrite2Enabled, "distributor.remote-writev2-enabled", false, "EXPERIMENTAL: If true, accept prometheus remote write v2 protocol push request.")
219219

220220
f.Float64Var(&cfg.InstanceLimits.MaxIngestionRate, "distributor.instance-limits.max-ingestion-rate", 0, "Max ingestion rate (samples/sec) that this distributor will accept. This limit is per-distributor, not per-tenant. Additional push requests will be rejected. Current ingestion rate is computed as exponentially weighted moving average, updated every second. 0 = unlimited.")
221221
f.IntVar(&cfg.InstanceLimits.MaxInflightPushRequests, "distributor.instance-limits.max-inflight-push-requests", 0, "Max inflight push requests that this distributor can handle. This limit is per-distributor, not per-tenant. Additional requests will be rejected. 0 = unlimited.")

0 commit comments

Comments
 (0)