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

memberlist: Categorize advanced configuration parameters #127

Merged
merged 2 commits into from
Feb 1, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions kv/memberlist/memberlist_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,36 +125,36 @@ func (c *Client) awaitKVRunningOrStopping(ctx context.Context) error {
type KVConfig struct {
// Memberlist options.
NodeName string `yaml:"node_name"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even node name may be considered advanced, since it has a good default: hostname.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed: 5198121

RandomizeNodeName bool `yaml:"randomize_node_name"`
StreamTimeout time.Duration `yaml:"stream_timeout"`
RetransmitMult int `yaml:"retransmit_factor"`
PushPullInterval time.Duration `yaml:"pull_push_interval"`
GossipInterval time.Duration `yaml:"gossip_interval"`
GossipNodes int `yaml:"gossip_nodes"`
GossipToTheDeadTime time.Duration `yaml:"gossip_to_dead_nodes_time"`
DeadNodeReclaimTime time.Duration `yaml:"dead_node_reclaim_time"`
EnableCompression bool `yaml:"compression_enabled"`
RandomizeNodeName bool `yaml:"randomize_node_name" category:"advanced"`
StreamTimeout time.Duration `yaml:"stream_timeout" category:"advanced"`
RetransmitMult int `yaml:"retransmit_factor" category:"advanced"`
PushPullInterval time.Duration `yaml:"pull_push_interval" category:"advanced"`
GossipInterval time.Duration `yaml:"gossip_interval" category:"advanced"`
GossipNodes int `yaml:"gossip_nodes" category:"advanced"`
GossipToTheDeadTime time.Duration `yaml:"gossip_to_dead_nodes_time" category:"advanced"`
DeadNodeReclaimTime time.Duration `yaml:"dead_node_reclaim_time" category:"advanced"`
EnableCompression bool `yaml:"compression_enabled" category:"advanced"`

// ip:port to advertise other cluster members. Used for NAT traversal
AdvertiseAddr string `yaml:"advertise_addr"`
AdvertisePort int `yaml:"advertise_port"`

// List of members to join
JoinMembers flagext.StringSlice `yaml:"join_members"`
MinJoinBackoff time.Duration `yaml:"min_join_backoff"`
MaxJoinBackoff time.Duration `yaml:"max_join_backoff"`
MaxJoinRetries int `yaml:"max_join_retries"`
MinJoinBackoff time.Duration `yaml:"min_join_backoff" category:"advanced"`
MaxJoinBackoff time.Duration `yaml:"max_join_backoff" category:"advanced"`
MaxJoinRetries int `yaml:"max_join_retries" category:"advanced"`
AbortIfJoinFails bool `yaml:"abort_if_cluster_join_fails"`
RejoinInterval time.Duration `yaml:"rejoin_interval"`
RejoinInterval time.Duration `yaml:"rejoin_interval" category:"advanced"`

// Remove LEFT ingesters from ring after this timeout.
LeftIngestersTimeout time.Duration `yaml:"left_ingesters_timeout"`
LeftIngestersTimeout time.Duration `yaml:"left_ingesters_timeout" category:"advanced"`

// Timeout used when leaving the memberlist cluster.
LeaveTimeout time.Duration `yaml:"leave_timeout"`
LeaveTimeout time.Duration `yaml:"leave_timeout" category:"advanced"`

// How much space to use to keep received and sent messages in memory (for troubleshooting).
MessageHistoryBufferBytes int `yaml:"message_history_buffer_bytes"`
MessageHistoryBufferBytes int `yaml:"message_history_buffer_bytes" category:"advanced"`

TCPTransport TCPTransportConfig `yaml:",inline"`

Expand Down
4 changes: 2 additions & 2 deletions kv/memberlist/tcp_transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ type TCPTransportConfig struct {

// Timeout used when making connections to other nodes to send packet.
// Zero = no timeout
PacketDialTimeout time.Duration `yaml:"packet_dial_timeout"`
PacketDialTimeout time.Duration `yaml:"packet_dial_timeout" category:"advanced"`

// Timeout for writing packet data. Zero = no timeout.
PacketWriteTimeout time.Duration `yaml:"packet_write_timeout"`
PacketWriteTimeout time.Duration `yaml:"packet_write_timeout" category:"advanced"`

// Transport logs lot of messages at debug level, so it deserves an extra flag for turning it on
TransportDebug bool `yaml:"-"`
Expand Down