From 45a4dd1abc5bf9185b1224373e4d95a6c4c7dc41 Mon Sep 17 00:00:00 2001 From: siddontang Date: Thu, 9 Oct 2014 11:03:58 +0800 Subject: [PATCH] info log id returns 0 if no replication --- server/info.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/info.go b/server/info.go index 21c989b..b60db65 100644 --- a/server/info.go +++ b/server/info.go @@ -165,6 +165,10 @@ func (i *info) dumpReplication(buf *bytes.Buffer) { p = append(p, infoPair{"last_log_id", s.LastID}) p = append(p, infoPair{"first_log_id", s.FirstID}) p = append(p, infoPair{"commit_log_id", s.CommitID}) + } else { + p = append(p, infoPair{"last_log_id", 0}) + p = append(p, infoPair{"first_log_id", 0}) + p = append(p, infoPair{"commit_log_id", 0}) } i.dumpPairs(buf, p...)