"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "etcdserver/api/rafthttp/http.go" between
etcd-3.4.8.tar.gz and etcd-3.4.9.tar.gz

About: etcd is a distributed reliable key-value store for the most critical data of a distributed system (written in "Go").

http.go  (etcd-3.4.8):http.go  (etcd-3.4.9)
skipping to change at line 303 skipping to change at line 303
plog.Error(msg) plog.Error(msg)
} }
http.Error(w, msg, http.StatusInternalServerError) http.Error(w, msg, http.StatusInternalServerError)
snapshotReceiveFailures.WithLabelValues(from).Inc() snapshotReceiveFailures.WithLabelValues(from).Inc()
return return
} }
dbSize := humanize.Bytes(uint64(n)) dbSize := humanize.Bytes(uint64(n))
receivedBytes.WithLabelValues(from).Add(float64(n)) receivedBytes.WithLabelValues(from).Add(float64(n))
downloadTook := time.Since(start)
if h.lg != nil { if h.lg != nil {
h.lg.Info( h.lg.Info(
"received and saved database snapshot", "received and saved database snapshot",
zap.String("local-member-id", h.localID.String()), zap.String("local-member-id", h.localID.String()),
zap.String("remote-snapshot-sender-id", from), zap.String("remote-snapshot-sender-id", from),
zap.Uint64("incoming-snapshot-index", m.Snapshot.Metadata .Index), zap.Uint64("incoming-snapshot-index", m.Snapshot.Metadata .Index),
zap.Int64("incoming-snapshot-size-bytes", n), zap.Int64("incoming-snapshot-size-bytes", n),
zap.String("incoming-snapshot-size", dbSize), zap.String("incoming-snapshot-size", dbSize),
zap.String("download-took", downloadTook.String()),
) )
} else { } else {
plog.Infof("successfully received and saved database snapshot [in dex: %d, from: %s, raft message size: %s, db size: %s]", m.Snapshot.Metadata.Ind ex, types.ID(m.From), msgSize, dbSize) plog.Infof("successfully received and saved database snapshot [in dex: %d, from: %s, raft message size: %s, db size: %s, took: %s]", m.Snapshot.Me tadata.Index, types.ID(m.From), msgSize, dbSize, downloadTook.String())
} }
if err := h.r.Process(context.TODO(), m); err != nil { if err := h.r.Process(context.TODO(), m); err != nil {
switch v := err.(type) { switch v := err.(type) {
// Process may return writerToResponse error when doing some // Process may return writerToResponse error when doing some
// additional checks before calling raft.Node.Step. // additional checks before calling raft.Node.Step.
case writerToResponse: case writerToResponse:
v.WriteTo(w) v.WriteTo(w)
default: default:
msg := fmt.Sprintf("failed to process raft message (%v)", err) msg := fmt.Sprintf("failed to process raft message (%v)", err)
 End of changes. 3 change blocks. 
1 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)