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

ReasonableInstanceCheckSeconds #1368

Merged
Merged
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: 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
}