Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1368 from binwiederhier/ReasonableInstanceCheckSe…
Browse files Browse the repository at this point in the history
…conds

ReasonableInstanceCheckSeconds
  • Loading branch information
shlomi-noach authored Jun 16, 2021
2 parents dddec83 + 79239b8 commit 88867e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions go/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ type Configuration struct {
DiscoverByShowSlaveHosts bool // Attempt SHOW SLAVE HOSTS before PROCESSLIST
UseSuperReadOnly bool // Should orchestrator super_read_only any time it sets read_only
InstancePollSeconds uint // Number of seconds between instance reads
ReasonableInstanceCheckSeconds uint // Number of seconds an instance read is allowed to take before it is considered invalid, i.e. before LastCheckValid will be false
InstanceWriteBufferSize int // Instance write buffer size (max number of instances to flush in one INSERT ODKU)
BufferInstanceWrites bool // Set to 'true' for write-optimization on backend table (compromise: writes can be stale and overwrite non stale data)
InstanceFlushIntervalMilliseconds int // Max interval between instance write buffer flushes
Expand Down Expand Up @@ -320,6 +321,7 @@ func newConfiguration() *Configuration {
DefaultInstancePort: 3306,
TLSCacheTTLFactor: 100,
InstancePollSeconds: 5,
ReasonableInstanceCheckSeconds: 1,
InstanceWriteBufferSize: 100,
BufferInstanceWrites: false,
InstanceFlushIntervalMilliseconds: 100,
Expand Down
2 changes: 1 addition & 1 deletion go/inst/analysis.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,5 +228,5 @@ func (this *ReplicationAnalysis) GetAnalysisInstanceType() AnalysisInstanceType
// ValidSecondsFromSeenToLastAttemptedCheck returns the maximum allowed elapsed time
// between last_attempted_check to last_checked before we consider the instance as invalid.
func ValidSecondsFromSeenToLastAttemptedCheck() uint {
return config.Config.InstancePollSeconds + 1
return config.Config.InstancePollSeconds + config.Config.ReasonableInstanceCheckSeconds
}

0 comments on commit 88867e6

Please sign in to comment.