Skip to content

Commit ef3ece3

Browse files
authored
Vendor dskit 8e7752e59bab (#9594)
Bumps dskit to latest; regenerate references. Includes dskit changes: * Add concurrency to the memberlist transport's WriteTo method dskit#525 * Memberlist: support for debouncing notifications dskit#592
1 parent caa656a commit ef3ece3

File tree

10 files changed

+221
-35
lines changed

10 files changed

+221
-35
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@
3838
* [ENHANCEMENT] Add SASL plain authentication support to Kafka client used by the experimental ingest storage. Configure SASL credentials via the following settings: #9584
3939
* `-ingest-storage.kafka.sasl-password`
4040
* `-ingest-storage.kafka.sasl-username`
41+
* [ENHANCEMENT] memberlist: TCP transport write path is now non-blocking, and is configurable by new flags: #9594
42+
* `-memberlist.max-concurrent-writes`
43+
* `-memberlist.acquire-writer-timeout`
44+
* [ENHANCEMENT] memberlist: Notifications can now be processed once per interval specified by `-memberlist.notify-interval` to reduce notify storm CPU activity in large clusters. #9594
4145
* [BUGFIX] Fix issue where functions such as `rate()` over native histograms could return incorrect values if a float stale marker was present in the selected range. #9508
4246
* [BUGFIX] Fix issue where negation of native histograms (eg. `-some_native_histogram_series`) did nothing. #9508
4347
* [BUGFIX] Fix issue where `metric might not be a counter, name does not end in _total/_sum/_count/_bucket` annotation would be emitted even if `rate` or `increase` did not have enough samples to compute a result. #9508

cmd/mimir/config-descriptor.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16041,6 +16041,17 @@
1604116041
"fieldType": "boolean",
1604216042
"fieldCategory": "advanced"
1604316043
},
16044+
{
16045+
"kind": "field",
16046+
"name": "notify_interval",
16047+
"required": false,
16048+
"desc": "How frequently to notify watchers when a key changes. Can reduce CPU activity in large memberlist deployments. 0 to notify without delay.",
16049+
"fieldValue": null,
16050+
"fieldDefaultValue": 0,
16051+
"fieldFlag": "memberlist.notify-interval",
16052+
"fieldType": "duration",
16053+
"fieldCategory": "advanced"
16054+
},
1604416055
{
1604516056
"kind": "field",
1604616057
"name": "advertise_addr",
@@ -16233,6 +16244,28 @@
1623316244
"fieldType": "duration",
1623416245
"fieldCategory": "advanced"
1623516246
},
16247+
{
16248+
"kind": "field",
16249+
"name": "max_concurrent_writes",
16250+
"required": false,
16251+
"desc": "Maximum number of concurrent writes to other nodes.",
16252+
"fieldValue": null,
16253+
"fieldDefaultValue": 3,
16254+
"fieldFlag": "memberlist.max-concurrent-writes",
16255+
"fieldType": "int",
16256+
"fieldCategory": "advanced"
16257+
},
16258+
{
16259+
"kind": "field",
16260+
"name": "acquire_writer_timeout",
16261+
"required": false,
16262+
"desc": "Timeout for acquiring one of the concurrent write slots. After this time, the message will be dropped.",
16263+
"fieldValue": null,
16264+
"fieldDefaultValue": 250000000,
16265+
"fieldFlag": "memberlist.acquire-writer-timeout",
16266+
"fieldType": "duration",
16267+
"fieldCategory": "advanced"
16268+
},
1623616269
{
1623716270
"kind": "field",
1623816271
"name": "tls_enabled",

cmd/mimir/help-all.txt.tmpl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1709,6 +1709,8 @@ Usage of ./cmd/mimir/mimir:
17091709
Size of memory ballast to allocate.
17101710
-memberlist.abort-if-join-fails
17111711
If this node fails to join memberlist cluster, abort.
1712+
-memberlist.acquire-writer-timeout duration
1713+
Timeout for acquiring one of the concurrent write slots. After this time, the message will be dropped. (default 250ms)
17121714
-memberlist.advertise-addr string
17131715
Gossip address to advertise to other members in the cluster. Used for NAT traversal.
17141716
-memberlist.advertise-port int
@@ -1739,6 +1741,8 @@ Usage of ./cmd/mimir/mimir:
17391741
Timeout for leaving memberlist cluster. (default 20s)
17401742
-memberlist.left-ingesters-timeout duration
17411743
How long to keep LEFT ingesters in the ring. (default 5m0s)
1744+
-memberlist.max-concurrent-writes int
1745+
Maximum number of concurrent writes to other nodes. (default 3)
17421746
-memberlist.max-join-backoff duration
17431747
Max backoff duration to join other cluster members. (default 1m0s)
17441748
-memberlist.max-join-retries int
@@ -1749,6 +1753,8 @@ Usage of ./cmd/mimir/mimir:
17491753
Min backoff duration to join other cluster members. (default 1s)
17501754
-memberlist.nodename string
17511755
Name of the node in memberlist cluster. Defaults to hostname.
1756+
-memberlist.notify-interval duration
1757+
How frequently to notify watchers when a key changes. Can reduce CPU activity in large memberlist deployments. 0 to notify without delay.
17521758
-memberlist.packet-dial-timeout duration
17531759
Timeout used when connecting to other nodes to send packet. (default 2s)
17541760
-memberlist.packet-write-timeout duration

docs/sources/mimir/configure/configuration-parameters/index.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2967,6 +2967,11 @@ The `memberlist` block configures the Gossip memberlist.
29672967
# CLI flag: -memberlist.compression-enabled
29682968
[compression_enabled: <boolean> | default = true]
29692969
2970+
# (advanced) How frequently to notify watchers when a key changes. Can reduce
2971+
# CPU activity in large memberlist deployments. 0 to notify without delay.
2972+
# CLI flag: -memberlist.notify-interval
2973+
[notify_interval: <duration> | default = 0s]
2974+
29702975
# Gossip address to advertise to other members in the cluster. Used for NAT
29712976
# traversal.
29722977
# CLI flag: -memberlist.advertise-addr
@@ -3059,6 +3064,15 @@ The `memberlist` block configures the Gossip memberlist.
30593064
# CLI flag: -memberlist.packet-write-timeout
30603065
[packet_write_timeout: <duration> | default = 5s]
30613066
3067+
# (advanced) Maximum number of concurrent writes to other nodes.
3068+
# CLI flag: -memberlist.max-concurrent-writes
3069+
[max_concurrent_writes: <int> | default = 3]
3070+
3071+
# (advanced) Timeout for acquiring one of the concurrent write slots. After this
3072+
# time, the message will be dropped.
3073+
# CLI flag: -memberlist.acquire-writer-timeout
3074+
[acquire_writer_timeout: <duration> | default = 250ms]
3075+
30623076
# (advanced) Enable TLS on the memberlist transport layer.
30633077
# CLI flag: -memberlist.tls-enabled
30643078
[tls_enabled: <boolean> | default = false]

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ require (
2222
github.com/golang/snappy v0.0.4
2323
github.com/google/gopacket v1.1.19
2424
github.com/gorilla/mux v1.8.1
25-
github.com/grafana/dskit v0.0.0-20241009141103-2e104a8053fa
25+
github.com/grafana/dskit v0.0.0-20241011202249-8e7752e59bab
2626
github.com/grafana/e2e v0.1.2-0.20240118170847-db90b84177fc
2727
github.com/hashicorp/golang-lru v1.0.2 // indirect
2828
github.com/json-iterator/go v1.1.12

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1256,8 +1256,8 @@ github.com/grafana-tools/sdk v0.0.0-20220919052116-6562121319fc h1:PXZQA2WCxe85T
12561256
github.com/grafana-tools/sdk v0.0.0-20220919052116-6562121319fc/go.mod h1:AHHlOEv1+GGQ3ktHMlhuTUwo3zljV3QJbC0+8o2kn+4=
12571257
github.com/grafana/alerting v0.0.0-20240926144415-27f4e81b4b6b h1:UO4mv94pG1kzKCgBKh20TXdACBCAK2vYjV3Q2MlcpEQ=
12581258
github.com/grafana/alerting v0.0.0-20240926144415-27f4e81b4b6b/go.mod h1:GMLi6d09Xqo96fCVUjNk//rcjP5NKEdjOzfWIffD5r4=
1259-
github.com/grafana/dskit v0.0.0-20241009141103-2e104a8053fa h1:jfSQq+jfs1q0cZr9n4u9g6Wz3423VJVE9grnLpx+eS4=
1260-
github.com/grafana/dskit v0.0.0-20241009141103-2e104a8053fa/go.mod h1:SPLNCARd4xdjCkue0O6hvuoveuS1dGJjDnfxYe405YQ=
1259+
github.com/grafana/dskit v0.0.0-20241011202249-8e7752e59bab h1:jrQwxBzwH5bjLUWXpaoTbq6BenhCCo2EjBLX10Hm0d4=
1260+
github.com/grafana/dskit v0.0.0-20241011202249-8e7752e59bab/go.mod h1:SPLNCARd4xdjCkue0O6hvuoveuS1dGJjDnfxYe405YQ=
12611261
github.com/grafana/e2e v0.1.2-0.20240118170847-db90b84177fc h1:BW+LjKJDz0So5LI8UZfW5neWeKpSkWqhmGjQFzcFfLM=
12621262
github.com/grafana/e2e v0.1.2-0.20240118170847-db90b84177fc/go.mod h1:JVmqPBe8A/pZWwRoJW5ZjyALeY5OXMzPl7LrVXOdZAI=
12631263
github.com/grafana/franz-go v0.0.0-20241009101240-fa97d35e871f h1:nsrRsQHfpqs6dWxErIOS3gD6R20H/9XM0ItykNtBFW8=

vendor/github.com/grafana/dskit/kv/memberlist/memberlist_client.go

Lines changed: 77 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)