提交 0d74c511 编写于 作者: S Shlomi Noach 提交者: GitHub

Merge branch 'master' into topology_recovery_better_logging

......@@ -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)
......@@ -253,6 +254,7 @@ func newConfiguration() *Configuration {
BufferInstanceWrites: false,
InstanceFlushIntervalMilliseconds: 100,
ReadLongRunningQueries: true,
SkipMaxScaleCheck: false,
BinlogFileHistoryDays: 0,
UnseenInstanceForgetHours: 240,
SnapshotTopologiesIntervalHours: 0,
......
......@@ -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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册