From f76166a04169c181a7545f0cdc19b5bad66f5abd Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Fri, 8 Jan 2016 00:21:19 -0800 Subject: [PATCH] *: fix minor typos --- etcdserver/cluster_util.go | 6 +++--- etcdserver/cluster_util_test.go | 2 +- etcdserver/server.go | 6 +++--- etcdserver/v3demo_server.go | 2 +- pkg/transport/listener_test.go | 2 +- storage/kv.go | 2 +- storage/watchable_store.go | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/etcdserver/cluster_util.go b/etcdserver/cluster_util.go index f7e966917..2de091522 100644 --- a/etcdserver/cluster_util.go +++ b/etcdserver/cluster_util.go @@ -166,9 +166,9 @@ func decideClusterVersion(vers map[string]*version.Versions) *semver.Version { return cv } -// isCompatibleWithCluster return true if the local member has a compitable version with +// isCompatibleWithCluster return true if the local member has a compatible version with // the current running cluster. -// The version is considered as compitable when at least one of the other members in the cluster has a +// The version is considered as compatible when at least one of the other members in the cluster has a // cluster version in the range of [MinClusterVersion, Version] and no known members has a cluster version // out of the range. // We set this rule since when the local member joins, another member might be offline. @@ -187,7 +187,7 @@ func isCompatibleWithCluster(cl Cluster, local types.ID, rt http.RoundTripper) b func isCompatibleWithVers(vers map[string]*version.Versions, local types.ID, minV, maxV *semver.Version) bool { var ok bool for id, v := range vers { - // ignore comparasion with local version + // ignore comparison with local version if id == local.String() { continue } diff --git a/etcdserver/cluster_util_test.go b/etcdserver/cluster_util_test.go index e602bddad..bf315acc6 100644 --- a/etcdserver/cluster_util_test.go +++ b/etcdserver/cluster_util_test.go @@ -32,7 +32,7 @@ func TestDecideClusterVersion(t *testing.T) { map[string]*version.Versions{"a": {Server: "2.0.0"}}, semver.Must(semver.NewVersion("2.0.0")), }, - // unknow + // unknown { map[string]*version.Versions{"a": nil}, nil, diff --git a/etcdserver/server.go b/etcdserver/server.go index 9042bfda9..f0968692e 100644 --- a/etcdserver/server.go +++ b/etcdserver/server.go @@ -541,7 +541,7 @@ func (s *EtcdServer) run() { defer func() { s.r.stop() - // kv and backend can be nil if runing without v3 enabled + // kv and backend can be nil if running without v3 enabled // or running unit tests. if s.kv != nil { s.kv.Close() @@ -856,7 +856,7 @@ func (s *EtcdServer) configure(ctx context.Context, cc raftpb.ConfChange) error // sync proposes a SYNC request and is non-blocking. // This makes no guarantee that the request will be proposed or performed. -// The request will be cancelled after the given timeout. +// The request will be canceled after the given timeout. func (s *EtcdServer) sync(timeout time.Duration) { ctx, cancel := context.WithTimeout(context.Background(), timeout) req := pb.Request{ @@ -1203,7 +1203,7 @@ func (s *EtcdServer) monitorVersions() { v := decideClusterVersion(getVersions(s.cluster, s.id, s.versionRt)) if v != nil { - // only keep major.minor version for comparasion + // only keep major.minor version for comparison v = &semver.Version{ Major: v.Major, Minor: v.Minor, diff --git a/etcdserver/v3demo_server.go b/etcdserver/v3demo_server.go index b5516d9e0..28b34af41 100644 --- a/etcdserver/v3demo_server.go +++ b/etcdserver/v3demo_server.go @@ -122,7 +122,7 @@ func (s *EtcdServer) processInternalRaftRequest(ctx context.Context, r pb.Intern } } -// Watcable returns a watchable interface attached to the etcdserver. +// Watchable returns a watchable interface attached to the etcdserver. func (s *EtcdServer) Watchable() dstorage.Watchable { return s.getKV() } diff --git a/pkg/transport/listener_test.go b/pkg/transport/listener_test.go index 6ae93e5c0..48618b648 100644 --- a/pkg/transport/listener_test.go +++ b/pkg/transport/listener_test.go @@ -45,7 +45,7 @@ func fakeCertificateParserFunc(cert tls.Certificate, err error) func(certPEMBloc } // TestNewListenerTLSInfo tests that NewListener with valid TLSInfo returns -// a TLS listerner that accepts TLS connections. +// a TLS listener that accepts TLS connections. func TestNewListenerTLSInfo(t *testing.T) { tmp, err := createTempFile([]byte("XXX")) if err != nil { diff --git a/storage/kv.go b/storage/kv.go index 2833d1bc4..7fc4e246f 100644 --- a/storage/kv.go +++ b/storage/kv.go @@ -80,7 +80,7 @@ type WatchableKV interface { // Watchable is the interface that wraps the NewWatchStream function. type Watchable interface { // NewWatchStream returns a WatchStream that can be used to - // watch events happened or happending on the KV. + // watch events happened or happening on the KV. NewWatchStream() WatchStream } diff --git a/storage/watchable_store.go b/storage/watchable_store.go index ffc4bf3bf..0325862a5 100644 --- a/storage/watchable_store.go +++ b/storage/watchable_store.go @@ -294,7 +294,7 @@ func (s *watchableStore) syncWatchers() { if w.cur < compactionRev { // TODO: return error compacted to that watcher instead of - // just removing it sliently from unsynced. + // just removing it silently from unsynced. delete(s.unsynced, w) continue }