From 79239b8bd75a2163e10ce53522ece8bdaa143a62 Mon Sep 17 00:00:00 2001 From: Philipp Heckel Date: Tue, 15 Jun 2021 16:20:42 -0400 Subject: [PATCH] ReasonableInstanceCheckSeconds --- go/config/config.go | 2 ++ go/inst/analysis.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go/config/config.go b/go/config/config.go index b07790ebf..4cae4ebff 100644 --- a/go/config/config.go +++ b/go/config/config.go @@ -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 @@ -320,6 +321,7 @@ func newConfiguration() *Configuration { DefaultInstancePort: 3306, TLSCacheTTLFactor: 100, InstancePollSeconds: 5, + ReasonableInstanceCheckSeconds: 1, InstanceWriteBufferSize: 100, BufferInstanceWrites: false, InstanceFlushIntervalMilliseconds: 100, diff --git a/go/inst/analysis.go b/go/inst/analysis.go index 8c392d403..1d6ab3692 100644 --- a/go/inst/analysis.go +++ b/go/inst/analysis.go @@ -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 }