瀏覽代碼

Merge pull request #4169 from gyuho/typo

*: fix minor typos
Jonathan Boulle 10 年之前
父節點
當前提交
cb3ca4f8fb

+ 3 - 3
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
 		}

+ 1 - 1
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,

+ 3 - 3
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,

+ 1 - 1
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()
 }

+ 1 - 1
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 {

+ 1 - 1
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
 }
 

+ 1 - 1
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
 		}