Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion internal/raft/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type Config struct {

// If we are a member of a cluster, and RemovePeer is invoked for the
// local node, then we forget all peers and transition into the follower state.
// If ShutdownOnRemove is is set, we additional shutdown Raft. Otherwise,
// If ShutdownOnRemove is set, we additionally shutdown Raft. Otherwise,
// we can become a leader of a cluster containing only this node.
ShutdownOnRemove bool

Expand Down
2 changes: 1 addition & 1 deletion internal/raft/inmem_transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

// NewInmemAddr returns a new in-memory addr with
// a randomly generate UUID as the ID.
// a randomly generated UUID as the ID.
func NewInmemAddr() string {
return generateUUID()
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func newConfiguration() *Configuration {

// Read reads configuration from all given files, in order of input.
// Each file can override the properties of the previous files
// Initially, the settings are the defult ones defined by newConfigurationSettings
// Initially, the settings are the default ones defined by newConfigurationSettings
func (config *Configuration) Read(fileNames ...string) error {
settings := newConfigurationSettings()

Expand Down Expand Up @@ -89,7 +89,7 @@ func (config *Configuration) Reload() error {
// ConfigurationSettings models a set of configurable values, that can be
// provided by the user via one or several JSON formatted files.
//
// Some of the settinges have reasonable default values, and some other
// Some of the settings have reasonable default values, and some other
// (like database credentials) are strictly expected from user.
type ConfigurationSettings struct {
ListenPort int
Expand Down
4 changes: 2 additions & 2 deletions pkg/config/mysql_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type MySQLClusterConfigurationSettings struct {
CacheMillis int // override MySQLConfigurationSettings's, or leave empty to inherit those settings
ThrottleThreshold float64 // override MySQLConfigurationSettings's, or leave empty to inherit those settings
Port int // Specify if different than 3306 or if different than specified by MySQLConfigurationSettings
IgnoreHostsCount int // Number of hosts that can be skipped/ignored even on error or on exceeding theesholds
IgnoreHostsCount int // Number of hosts that can be skipped/ignored even on error or on exceeding thresholds
IgnoreHostsThreshold float64 // Threshold beyond which IgnoreHostsCount applies (default: 0)
HttpCheckPort int // Specify if different than specified by MySQLConfigurationSettings. -1 to disable HTTP check
HttpCheckPath string // Specify if different than specified by MySQLConfigurationSettings
Expand Down Expand Up @@ -55,7 +55,7 @@ type MySQLConfigurationSettings struct {
ThrottleThreshold float64
Port int // Specify if different than 3306; applies to all clusters
IgnoreDialTcpErrors bool // Skip hosts where a metric cannot be retrieved due to TCP dial errors
IgnoreHostsCount int // Number of hosts that can be skipped/ignored even on error or on exceeding theesholds
IgnoreHostsCount int // Number of hosts that can be skipped/ignored even on error or on exceeding thresholds
IgnoreHostsThreshold float64 // Threshold beyond which IgnoreHostsCount applies (default: 0)
HttpCheckPort int // port for HTTP check. -1 to disable.
HttpCheckPath string // If non-empty, requires HttpCheckPort
Expand Down
4 changes: 2 additions & 2 deletions pkg/group/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func (store *Store) genericCommand(c *command) error {
return f.Error()
}

// ThrottleApp, as implied by consensusService, is a raft oepration request which
// ThrottleApp, as implied by consensusService, is a raft operation request which
// will ask for consensus.
func (store *Store) ThrottleApp(appName string, ttlMinutes int64, expireAt time.Time, ratio float64) error {
c := &command{
Expand All @@ -146,7 +146,7 @@ func (store *Store) ThrottleApp(appName string, ttlMinutes int64, expireAt time.
return store.genericCommand(c)
}

// UnthrottleApp, as implied by consensusService, is a raft oepration request which
// UnthrottleApp, as implied by consensusService, is a raft operation request which
// will ask for consensus.
func (store *Store) UnthrottleApp(appName string) error {
c := &command{
Expand Down
12 changes: 6 additions & 6 deletions pkg/throttle/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type CheckFlags struct {

var StandardCheckFlags = &CheckFlags{}

// ThrottlerCheck provides methdos for an app checking on metrics
// ThrottlerCheck provides methods for an app checking on metrics
type ThrottlerCheck struct {
throttler *Throttler
}
Expand Down Expand Up @@ -84,10 +84,10 @@ func (check *ThrottlerCheck) checkAppMetricResult(appName string, storeType stri
} else if appName != frenoAppName && check.throttler.getShareDomainSecondsSinceHealth(metricName) >= 1 {
// throttling based on shared domain metric.
// we exclude the "freno" app itself, or else this could turn into a snowball: this service ("a") seeing
// another service ("b") as unhealthy, itself becoming unhealthy, makind b's read into a's state as unheathly,
// another service ("b") as unhealthy, itself becoming unhealthy, making b's read into a's state as unhealthy,
// b reporting unhealthy, ad infinitum.
// The "freno" app is the one to generate those health metrics. It therefore must not participate the
// shared-domain dependency check.,
// The "freno" app is the one to generate those health metrics. It therefore must not participate in the
// shared-domain dependency check.

statusCode = http.StatusTooManyRequests // 429
err = base.ThresholdExceededError
Expand Down Expand Up @@ -199,12 +199,12 @@ func (check *ThrottlerCheck) reportAggregated(metricName string, metricResult ba
}
}

// AggregatedMetrics is a convenience acces method into throttler's `aggregatedMetricsSnapshot`
// AggregatedMetrics is a convenience access method into throttler's `aggregatedMetricsSnapshot`
func (check *ThrottlerCheck) AggregatedMetrics() map[string]base.MetricResult {
return check.throttler.aggregatedMetricsSnapshot()
}

// MetricsHealth is a convenience acces method into throttler's `metricsHealthSnapshot`
// MetricsHealth is a convenience access method into throttler's `metricsHealthSnapshot`
func (check *ThrottlerCheck) MetricsHealth() map[string](*base.MetricHealth) {
return check.throttler.metricsHealthSnapshot()
}
Expand Down