Browse code

bump github.com/coreos/etcd v3.3.12

full diff: https://github.com/etcd-io/etcd/compare/v3.3.9...v3.3.12

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2019/04/16 01:11:06
Showing 4 changed files
... ...
@@ -57,7 +57,7 @@ github.com/vishvananda/netlink                      b2de5d10e38ecce8607e6b438b6d
57 57
 github.com/BurntSushi/toml                          3012a1dbe2e4bd1391d42b32f0577cb7bbc7f005 # v0.3.1
58 58
 github.com/samuel/go-zookeeper                      d0e0d8e11f318e000a8cc434616d69e329edc374
59 59
 github.com/deckarep/golang-set                      ef32fa3046d9f249d399f98ebaf9be944430fd1d
60
-github.com/coreos/etcd                              fca8add78a9d926166eb739b8e4a124434025ba3 # v3.3.9
60
+github.com/coreos/etcd                              d57e8b8d97adfc4a6c224fe116714bf1a1f3beb9 # v3.3.12
61 61
 github.com/coreos/go-semver                         8ab6407b697782a06568d4b7f1db25550ec2e4c6 # v0.2.0
62 62
 github.com/ugorji/go                                b4c50a2b199d93b13dc15e78929cfb23bfdf21ab # v1.1.1
63 63
 github.com/hashicorp/consul                         9a9cc9341bb487651a0399e3fc5e1e8a42e62dd9 # v0.5.2
... ...
@@ -21,6 +21,7 @@ import (
21 21
 	"io/ioutil"
22 22
 	"os"
23 23
 	"path/filepath"
24
+	"time"
24 25
 
25 26
 	"github.com/coreos/etcd/pkg/fileutil"
26 27
 )
... ...
@@ -30,6 +31,8 @@ var ErrNoDBSnapshot = errors.New("snap: snapshot file doesn't exist")
30 30
 // SaveDBFrom saves snapshot of the database from the given reader. It
31 31
 // guarantees the save operation is atomic.
32 32
 func (s *Snapshotter) SaveDBFrom(r io.Reader, id uint64) (int64, error) {
33
+	start := time.Now()
34
+
33 35
 	f, err := ioutil.TempFile(s.dir, "tmp")
34 36
 	if err != nil {
35 37
 		return 0, err
... ...
@@ -37,7 +40,9 @@ func (s *Snapshotter) SaveDBFrom(r io.Reader, id uint64) (int64, error) {
37 37
 	var n int64
38 38
 	n, err = io.Copy(f, r)
39 39
 	if err == nil {
40
+		fsyncStart := time.Now()
40 41
 		err = fileutil.Fsync(f)
42
+		snapDBFsyncSec.Observe(time.Since(fsyncStart).Seconds())
41 43
 	}
42 44
 	f.Close()
43 45
 	if err != nil {
... ...
@@ -57,6 +62,7 @@ func (s *Snapshotter) SaveDBFrom(r io.Reader, id uint64) (int64, error) {
57 57
 
58 58
 	plog.Infof("saved database snapshot to disk [total bytes: %d]", n)
59 59
 
60
+	snapDBSaveSec.Observe(time.Since(start).Seconds())
60 61
 	return n, nil
61 62
 }
62 63
 
... ...
@@ -33,9 +33,33 @@ var (
33 33
 		Help:      "The marshalling cost distributions of save called by snapshot.",
34 34
 		Buckets:   prometheus.ExponentialBuckets(0.001, 2, 14),
35 35
 	})
36
+
37
+	snapDBSaveSec = prometheus.NewHistogram(prometheus.HistogramOpts{
38
+		Namespace: "etcd",
39
+		Subsystem: "snap_db",
40
+		Name:      "save_total_duration_seconds",
41
+		Help:      "The total latency distributions of v3 snapshot save",
42
+
43
+		// lowest bucket start of upper bound 0.1 sec (100 ms) with factor 2
44
+		// highest bucket start of 0.1 sec * 2^9 == 51.2 sec
45
+		Buckets: prometheus.ExponentialBuckets(0.1, 2, 10),
46
+	})
47
+
48
+	snapDBFsyncSec = prometheus.NewHistogram(prometheus.HistogramOpts{
49
+		Namespace: "etcd",
50
+		Subsystem: "snap_db",
51
+		Name:      "fsync_duration_seconds",
52
+		Help:      "The latency distributions of fsyncing .snap.db file",
53
+
54
+		// lowest bucket start of upper bound 0.001 sec (1 ms) with factor 2
55
+		// highest bucket start of 0.001 sec * 2^13 == 8.192 sec
56
+		Buckets: prometheus.ExponentialBuckets(0.001, 2, 14),
57
+	})
36 58
 )
37 59
 
38 60
 func init() {
39 61
 	prometheus.MustRegister(saveDurations)
40 62
 	prometheus.MustRegister(marshallingDurations)
63
+	prometheus.MustRegister(snapDBSaveSec)
64
+	prometheus.MustRegister(snapDBFsyncSec)
41 65
 }
... ...
@@ -26,7 +26,7 @@ import (
26 26
 var (
27 27
 	// MinClusterVersion is the min cluster version this etcd binary is compatible with.
28 28
 	MinClusterVersion = "3.0.0"
29
-	Version           = "3.3.9"
29
+	Version           = "3.3.12"
30 30
 	APIVersion        = "unknown"
31 31
 
32 32
 	// Git SHA Value will be set during build