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

introducing SkipMaxScaleCheck config #110

Merged
merged 1 commit into from
Mar 23, 2017
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 @@ -82,6 +82,7 @@ type Configuration struct {
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
ReadLongRunningQueries bool // Whether orchestrator should read and record current long running executing queries.
SkipMaxScaleCheck bool // If you don't ever have MaxScale BinlogServer in your topology (and most people don't), set this to 'true' to save some pointless queries
BinlogFileHistoryDays int // When > 0, amount of days for which orchestrator records per-instance binlog files & sizes
UnseenInstanceForgetHours uint // Number of hours after which an unseen instance is forgotten
SnapshotTopologiesIntervalHours uint // Interval in hour between snapshot-topologies invocation. Default: 0 (disabled)
Expand Down Expand Up @@ -253,6 +254,7 @@ func newConfiguration() *Configuration {
BufferInstanceWrites: false,
InstanceFlushIntervalMilliseconds: 100,
ReadLongRunningQueries: true,
SkipMaxScaleCheck: false,
BinlogFileHistoryDays: 0,
UnseenInstanceForgetHours: 240,
SnapshotTopologiesIntervalHours: 0,
Expand Down
10 changes: 4 additions & 6 deletions go/inst/instance_dao.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,10 @@ func unrecoverableError(err error) bool {

// Check if the instance is a MaxScale binlog server (a proxy not a real
// MySQL server) and also update the resolved hostname
func (instance *Instance) checkMaxScale(db *sql.DB, latency *stopwatch.NamedStopwatch) (bool, string, error) {
var (
err error
isMaxScale bool
resolvedHostname string
)
func (instance *Instance) checkMaxScale(db *sql.DB, latency *stopwatch.NamedStopwatch) (isMaxScale bool, resolvedHostname string, err error) {
if config.Config.SkipMaxScaleCheck {
return isMaxScale, resolvedHostname, err
}

latency.Start("instance")
err = sqlutils.QueryRowsMap(db, "show variables like 'maxscale%'", func(m sqlutils.RowMap) error {
Expand Down