From 0d4949f060222e310c4fc7b448a15ee1ec8f6ca5 Mon Sep 17 00:00:00 2001 From: siddontang Date: Tue, 3 Jun 2014 16:19:39 +0800 Subject: [PATCH] change log name suffix format --- replication/binlog.go | 1 + replication/log.go | 2 +- replication/relaylog.go | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/replication/binlog.go b/replication/binlog.go index 677e087..1500b27 100644 --- a/replication/binlog.go +++ b/replication/binlog.go @@ -51,6 +51,7 @@ func (cfg *BinLogConfig) adjust() { cfg.IndexName = "ledis" } + //binlog not care space limit cfg.SpaceLimit = -1 cfg.LogType = "bin" diff --git a/replication/log.go b/replication/log.go index e61e59d..175099d 100644 --- a/replication/log.go +++ b/replication/log.go @@ -145,7 +145,7 @@ func (l *Log) loadIndex() error { } func (l *Log) getLogFile() string { - return fmt.Sprintf("%s-%s.%05d", l.cfg.BaseName, l.cfg.LogType, l.lastLogIndex) + return fmt.Sprintf("%s-%s.%07d", l.cfg.BaseName, l.cfg.LogType, l.lastLogIndex) } func (l *Log) openNewLogFile() error { diff --git a/replication/relaylog.go b/replication/relaylog.go index 9f2b7a4..6b4894d 100644 --- a/replication/relaylog.go +++ b/replication/relaylog.go @@ -28,6 +28,7 @@ func (cfg *RelayLogConfig) adjust() { cfg.IndexName = "ledis" } + //relaylog not care file num cfg.MaxFileNum = -1 cfg.LogType = "relay" }