This commit is contained in:
Chris Lu 2019-02-15 00:09:48 -08:00
parent 74fb237727
commit 7103c1ab7e
3 changed files with 3 additions and 3 deletions

View file

@ -198,7 +198,7 @@ func (fi FilePart) Upload(maxMB int, master string, jwt security.EncodedJwt) (re
} }
func upload_one_chunk(filename string, reader io.Reader, master, func upload_one_chunk(filename string, reader io.Reader, master,
fileUrl string, jwt security.EncodedJwt, fileUrl string, jwt security.EncodedJwt,
) (size uint32, e error) { ) (size uint32, e error) {
glog.V(4).Info("Uploading part ", filename, " to ", fileUrl, "...") glog.V(4).Info("Uploading part ", filename, " to ", fileUrl, "...")
uploadResult, uploadError := Upload(fileUrl, filename, reader, false, uploadResult, uploadError := Upload(fileUrl, filename, reader, false,

View file

@ -131,7 +131,7 @@ func isPeersChanged(dir string, self string, peers []string) (oldPeers []string,
func isTheFirstOne(self string, peers []string) bool { func isTheFirstOne(self string, peers []string) bool {
sort.Strings(peers) sort.Strings(peers)
if len(peers)<=0{ if len(peers) <= 0 {
return true return true
} }
return self == peers[0] return self == peers[0]

View file

@ -50,7 +50,7 @@ func NewTopology(id string, seq sequence.Sequencer, volumeSizeLimit uint64, puls
} }
func (t *Topology) IsLeader() bool { func (t *Topology) IsLeader() bool {
if t.RaftServer!=nil { if t.RaftServer != nil {
return t.RaftServer.State() == raft.Leader return t.RaftServer.State() == raft.Leader
} }
if leader, e := t.Leader(); e == nil { if leader, e := t.Leader(); e == nil {