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" }