*: fix github links
parent
9454c4cab0
commit
aa4313a55a
|
@ -191,7 +191,7 @@ func TestOldHealthBalancerGraylist(t *testing.T) {
|
||||||
|
|
||||||
// TestBalancerDoNotBlockOnClose ensures that balancer and grpc don't deadlock each other
|
// TestBalancerDoNotBlockOnClose ensures that balancer and grpc don't deadlock each other
|
||||||
// due to rapid open/close conn. The deadlock causes balancer.Close() to block forever.
|
// due to rapid open/close conn. The deadlock causes balancer.Close() to block forever.
|
||||||
// See issue: https://go.etcd.io/etcd/issues/7283 for more detail.
|
// See issue: https://github.com/etcd-io/etcd/issues/7283 for more detail.
|
||||||
func TestOldHealthBalancerDoNotBlockOnClose(t *testing.T) {
|
func TestOldHealthBalancerDoNotBlockOnClose(t *testing.T) {
|
||||||
defer testutil.AfterTest(t)
|
defer testutil.AfterTest(t)
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
//
|
//
|
||||||
// 1. context error: canceled or deadline exceeded.
|
// 1. context error: canceled or deadline exceeded.
|
||||||
// 2. gRPC status error: e.g. when clock drifts in server-side before client's context deadline exceeded.
|
// 2. gRPC status error: e.g. when clock drifts in server-side before client's context deadline exceeded.
|
||||||
// 3. gRPC error: see https://go.etcd.io/etcd/blob/master/etcdserver/api/v3rpc/rpctypes/error.go
|
// 3. gRPC error: see https://github.com/etcd-io/etcd/blob/master/etcdserver/api/v3rpc/rpctypes/error.go
|
||||||
//
|
//
|
||||||
// Here is the example code to handle client errors:
|
// Here is the example code to handle client errors:
|
||||||
//
|
//
|
||||||
|
|
|
@ -132,7 +132,7 @@ type Lease interface {
|
||||||
// given context "ctx" is canceled or timed out.
|
// given context "ctx" is canceled or timed out.
|
||||||
//
|
//
|
||||||
// TODO(v4.0): post errors to last keep alive message before closing
|
// TODO(v4.0): post errors to last keep alive message before closing
|
||||||
// (see https://go.etcd.io/etcd/pull/7866)
|
// (see https://github.com/etcd-io/etcd/pull/7866)
|
||||||
KeepAlive(ctx context.Context, id LeaseID) (<-chan *LeaseKeepAliveResponse, error)
|
KeepAlive(ctx context.Context, id LeaseID) (<-chan *LeaseKeepAliveResponse, error)
|
||||||
|
|
||||||
// KeepAliveOnce renews the lease once. The response corresponds to the
|
// KeepAliveOnce renews the lease once. The response corresponds to the
|
||||||
|
|
|
@ -68,7 +68,7 @@ type Watcher interface {
|
||||||
// TODO: explicitly set context error in the last "WatchResponse" message and close channel?
|
// TODO: explicitly set context error in the last "WatchResponse" message and close channel?
|
||||||
// Currently, client contexts are overwritten with "valCtx" that never closes.
|
// Currently, client contexts are overwritten with "valCtx" that never closes.
|
||||||
// TODO(v3.4): configure watch retry policy, limit maximum retry number
|
// TODO(v3.4): configure watch retry policy, limit maximum retry number
|
||||||
// (see https://go.etcd.io/etcd/issues/8980)
|
// (see https://github.com/etcd-io/etcd/issues/8980)
|
||||||
Watch(ctx context.Context, key string, opts ...OpOption) WatchChan
|
Watch(ctx context.Context, key string, opts ...OpOption) WatchChan
|
||||||
|
|
||||||
// RequestProgress requests a progress notify response be sent in all watch channels.
|
// RequestProgress requests a progress notify response be sent in all watch channels.
|
||||||
|
|
|
@ -162,7 +162,7 @@ type Config struct {
|
||||||
//
|
//
|
||||||
// If single-node, it advances ticks regardless.
|
// If single-node, it advances ticks regardless.
|
||||||
//
|
//
|
||||||
// See https://go.etcd.io/etcd/issues/9333 for more detail.
|
// See https://github.com/etcd-io/etcd/issues/9333 for more detail.
|
||||||
InitialElectionTickAdvance bool `json:"initial-election-tick-advance"`
|
InitialElectionTickAdvance bool `json:"initial-election-tick-advance"`
|
||||||
|
|
||||||
QuotaBackendBytes int64 `json:"quota-backend-bytes"`
|
QuotaBackendBytes int64 `json:"quota-backend-bytes"`
|
||||||
|
@ -246,7 +246,7 @@ type Config struct {
|
||||||
// CVE-2018-5702 reference:
|
// CVE-2018-5702 reference:
|
||||||
// - https://bugs.chromium.org/p/project-zero/issues/detail?id=1447#c2
|
// - https://bugs.chromium.org/p/project-zero/issues/detail?id=1447#c2
|
||||||
// - https://github.com/transmission/transmission/pull/468
|
// - https://github.com/transmission/transmission/pull/468
|
||||||
// - https://go.etcd.io/etcd/issues/9353
|
// - https://github.com/etcd-io/etcd/issues/9353
|
||||||
HostWhitelist map[string]struct{}
|
HostWhitelist map[string]struct{}
|
||||||
|
|
||||||
// UserHandlers is for registering users handlers and only used for
|
// UserHandlers is for registering users handlers and only used for
|
||||||
|
|
|
@ -412,7 +412,7 @@ func stopServers(ctx context.Context, ss *servers) {
|
||||||
|
|
||||||
// do not grpc.Server.GracefulStop with TLS enabled etcd server
|
// do not grpc.Server.GracefulStop with TLS enabled etcd server
|
||||||
// See https://github.com/grpc/grpc-go/issues/1384#issuecomment-317124531
|
// See https://github.com/grpc/grpc-go/issues/1384#issuecomment-317124531
|
||||||
// and https://go.etcd.io/etcd/issues/8916
|
// and https://github.com/etcd-io/etcd/issues/8916
|
||||||
if ss.secure {
|
if ss.secure {
|
||||||
shutdownNow()
|
shutdownNow()
|
||||||
return
|
return
|
||||||
|
|
|
@ -164,7 +164,7 @@ func actionMemberRemove(c *cli.Context) error {
|
||||||
if m.Name == removalID {
|
if m.Name == removalID {
|
||||||
// Note that, so long as it's not ambiguous, we *could* do the right thing by name here.
|
// Note that, so long as it's not ambiguous, we *could* do the right thing by name here.
|
||||||
fmt.Fprintf(os.Stderr, "Found a member named %s; if this is correct, please use its ID, eg:\n\tetcdctl member remove %s\n", m.Name, m.ID)
|
fmt.Fprintf(os.Stderr, "Found a member named %s; if this is correct, please use its ID, eg:\n\tetcdctl member remove %s\n", m.Name, m.ID)
|
||||||
fmt.Fprintf(os.Stderr, "For more details, read the documentation at https://go.etcd.io/etcd/blob/master/Documentation/runtime-configuration.md#remove-a-member\n\n")
|
fmt.Fprintf(os.Stderr, "For more details, read the documentation at https://github.com/etcd-io/etcd/blob/master/Documentation/runtime-configuration.md#remove-a-member\n\n")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if !foundID {
|
if !foundID {
|
||||||
|
|
|
@ -135,7 +135,7 @@ func clientConfigFromCmd(cmd *cobra.Command) *clientConfig {
|
||||||
// WARNING logs contain important information like TLS misconfirugation, but spams
|
// WARNING logs contain important information like TLS misconfirugation, but spams
|
||||||
// too many routine connection disconnects to turn on by default.
|
// too many routine connection disconnects to turn on by default.
|
||||||
//
|
//
|
||||||
// See https://go.etcd.io/etcd/pull/9623 for background
|
// See https://github.com/etcd-io/etcd/pull/9623 for background
|
||||||
clientv3.SetLogger(grpclog.NewLoggerV2(ioutil.Discard, ioutil.Discard, os.Stderr))
|
clientv3.SetLogger(grpclog.NewLoggerV2(ioutil.Discard, ioutil.Discard, os.Stderr))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -516,7 +516,7 @@ func (c *RaftCluster) IsReadyToAddNewMember() bool {
|
||||||
|
|
||||||
if nstarted == 1 && nmembers == 2 {
|
if nstarted == 1 && nmembers == 2 {
|
||||||
// a case of adding a new node to 1-member cluster for restoring cluster data
|
// a case of adding a new node to 1-member cluster for restoring cluster data
|
||||||
// https://go.etcd.io/etcd/blob/master/Documentation/v2/admin_guide.md#restoring-the-cluster
|
// https://github.com/etcd-io/etcd/blob/master/Documentation/v2/admin_guide.md#restoring-the-cluster
|
||||||
if c.lg != nil {
|
if c.lg != nil {
|
||||||
c.lg.Debug("number of started member is 1; can accept add member request")
|
c.lg.Debug("number of started member is 1; can accept add member request")
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -96,7 +96,7 @@ type ServerConfig struct {
|
||||||
//
|
//
|
||||||
// If single-node, it advances ticks regardless.
|
// If single-node, it advances ticks regardless.
|
||||||
//
|
//
|
||||||
// See https://go.etcd.io/etcd/issues/9333 for more detail.
|
// See https://github.com/etcd-io/etcd/issues/9333 for more detail.
|
||||||
InitialElectionTickAdvance bool
|
InitialElectionTickAdvance bool
|
||||||
|
|
||||||
BootstrapTimeout time.Duration
|
BootstrapTimeout time.Duration
|
||||||
|
|
|
@ -26,7 +26,7 @@ const (
|
||||||
// Wait more when it recovers from slow network, because network layer
|
// Wait more when it recovers from slow network, because network layer
|
||||||
// needs extra time to propagate traffic control (tc command) change.
|
// needs extra time to propagate traffic control (tc command) change.
|
||||||
// Otherwise, we get different hash values from the previous revision.
|
// Otherwise, we get different hash values from the previous revision.
|
||||||
// For more detail, please see https://go.etcd.io/etcd/issues/5121.
|
// For more detail, please see https://github.com/etcd-io/etcd/issues/5121.
|
||||||
waitRecover = 5 * time.Second
|
waitRecover = 5 * time.Second
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -593,7 +593,7 @@ func (clus *Cluster) WaitHealth() error {
|
||||||
// wait 60s to check cluster health.
|
// wait 60s to check cluster health.
|
||||||
// TODO: set it to a reasonable value. It is set that high because
|
// TODO: set it to a reasonable value. It is set that high because
|
||||||
// follower may use long time to catch up the leader when reboot under
|
// follower may use long time to catch up the leader when reboot under
|
||||||
// reasonable workload (https://go.etcd.io/etcd/issues/2698)
|
// reasonable workload (https://github.com/etcd-io/etcd/issues/2698)
|
||||||
for i := 0; i < 60; i++ {
|
for i := 0; i < 60; i++ {
|
||||||
for _, m := range clus.Members {
|
for _, m := range clus.Members {
|
||||||
if err = m.WriteHealthKey(); err != nil {
|
if err = m.WriteHealthKey(); err != nil {
|
||||||
|
|
|
@ -450,7 +450,7 @@ func TestRejectUnhealthyRemove(t *testing.T) {
|
||||||
|
|
||||||
// TestRestartRemoved ensures that restarting removed member must exit
|
// TestRestartRemoved ensures that restarting removed member must exit
|
||||||
// if 'initial-cluster-state' is set 'new' and old data directory still exists
|
// if 'initial-cluster-state' is set 'new' and old data directory still exists
|
||||||
// (see https://go.etcd.io/etcd/issues/7512 for more).
|
// (see https://github.com/etcd-io/etcd/issues/7512 for more).
|
||||||
func TestRestartRemoved(t *testing.T) {
|
func TestRestartRemoved(t *testing.T) {
|
||||||
defer testutil.AfterTest(t)
|
defer testutil.AfterTest(t)
|
||||||
|
|
||||||
|
|
|
@ -201,7 +201,7 @@ func TestElectionSessionRecampaign(t *testing.T) {
|
||||||
// TestElectionOnPrefixOfExistingKey checks that a single
|
// TestElectionOnPrefixOfExistingKey checks that a single
|
||||||
// candidate can be elected on a new key that is a prefix
|
// candidate can be elected on a new key that is a prefix
|
||||||
// of an existing key. To wit, check for regression
|
// of an existing key. To wit, check for regression
|
||||||
// of bug #6278. https://go.etcd.io/etcd/issues/6278
|
// of bug #6278. https://github.com/etcd-io/etcd/issues/6278
|
||||||
//
|
//
|
||||||
func TestElectionOnPrefixOfExistingKey(t *testing.T) {
|
func TestElectionOnPrefixOfExistingKey(t *testing.T) {
|
||||||
clus := NewClusterV3(t, &ClusterConfig{Size: 1})
|
clus := NewClusterV3(t, &ClusterConfig{Size: 1})
|
||||||
|
|
|
@ -60,7 +60,7 @@ func TestV3MaintenanceDefragmentInflightRange(t *testing.T) {
|
||||||
// TestV3KVInflightRangeRequests ensures that inflight requests
|
// TestV3KVInflightRangeRequests ensures that inflight requests
|
||||||
// (sent before server shutdown) are gracefully handled by server-side.
|
// (sent before server shutdown) are gracefully handled by server-side.
|
||||||
// They are either finished or canceled, but never crash the backend.
|
// They are either finished or canceled, but never crash the backend.
|
||||||
// See https://go.etcd.io/etcd/issues/7322 for more detail.
|
// See https://github.com/etcd-io/etcd/issues/7322 for more detail.
|
||||||
func TestV3KVInflightRangeRequests(t *testing.T) {
|
func TestV3KVInflightRangeRequests(t *testing.T) {
|
||||||
defer testutil.AfterTest(t)
|
defer testutil.AfterTest(t)
|
||||||
clus := NewClusterV3(t, &ClusterConfig{Size: 1})
|
clus := NewClusterV3(t, &ClusterConfig{Size: 1})
|
||||||
|
|
|
@ -337,14 +337,14 @@ func TestV3LeaseLeases(t *testing.T) {
|
||||||
|
|
||||||
// TestV3LeaseRenewStress keeps creating lease and renewing it immediately to ensure the renewal goes through.
|
// TestV3LeaseRenewStress keeps creating lease and renewing it immediately to ensure the renewal goes through.
|
||||||
// it was oberserved that the immediate lease renewal after granting a lease from follower resulted lease not found.
|
// it was oberserved that the immediate lease renewal after granting a lease from follower resulted lease not found.
|
||||||
// related issue https://go.etcd.io/etcd/issues/6978
|
// related issue https://github.com/etcd-io/etcd/issues/6978
|
||||||
func TestV3LeaseRenewStress(t *testing.T) {
|
func TestV3LeaseRenewStress(t *testing.T) {
|
||||||
testLeaseStress(t, stressLeaseRenew)
|
testLeaseStress(t, stressLeaseRenew)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestV3LeaseTimeToLiveStress keeps creating lease and retrieving it immediately to ensure the lease can be retrieved.
|
// TestV3LeaseTimeToLiveStress keeps creating lease and retrieving it immediately to ensure the lease can be retrieved.
|
||||||
// it was oberserved that the immediate lease retrieval after granting a lease from follower resulted lease not found.
|
// it was oberserved that the immediate lease retrieval after granting a lease from follower resulted lease not found.
|
||||||
// related issue https://go.etcd.io/etcd/issues/6978
|
// related issue https://github.com/etcd-io/etcd/issues/6978
|
||||||
func TestV3LeaseTimeToLiveStress(t *testing.T) {
|
func TestV3LeaseTimeToLiveStress(t *testing.T) {
|
||||||
testLeaseStress(t, stressLeaseTimeToLive)
|
testLeaseStress(t, stressLeaseTimeToLive)
|
||||||
}
|
}
|
||||||
|
@ -437,7 +437,7 @@ func TestV3PutOnNonExistLease(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestV3GetNonExistLease ensures client retrieving nonexistent lease on a follower doesn't result node panic
|
// TestV3GetNonExistLease ensures client retrieving nonexistent lease on a follower doesn't result node panic
|
||||||
// related issue https://go.etcd.io/etcd/issues/6537
|
// related issue https://github.com/etcd-io/etcd/issues/6537
|
||||||
func TestV3GetNonExistLease(t *testing.T) {
|
func TestV3GetNonExistLease(t *testing.T) {
|
||||||
defer testutil.AfterTest(t)
|
defer testutil.AfterTest(t)
|
||||||
clus := NewClusterV3(t, &ClusterConfig{Size: 3})
|
clus := NewClusterV3(t, &ClusterConfig{Size: 3})
|
||||||
|
|
|
@ -289,8 +289,8 @@ func (s *server) To() string {
|
||||||
|
|
||||||
// TODO: implement packet reordering from multiple TCP connections
|
// TODO: implement packet reordering from multiple TCP connections
|
||||||
// buffer packets per connection for awhile, reorder before transmit
|
// buffer packets per connection for awhile, reorder before transmit
|
||||||
// - https://go.etcd.io/etcd/issues/5614
|
// - https://github.com/etcd-io/etcd/issues/5614
|
||||||
// - https://go.etcd.io/etcd/pull/6918#issuecomment-264093034
|
// - https://github.com/etcd-io/etcd/pull/6918#issuecomment-264093034
|
||||||
|
|
||||||
func (s *server) listenAndServe() {
|
func (s *server) listenAndServe() {
|
||||||
defer s.closeWg.Done()
|
defer s.closeWg.Done()
|
||||||
|
|
|
@ -1524,7 +1524,7 @@ func TestHandleHeartbeatResp(t *testing.T) {
|
||||||
|
|
||||||
// TestRaftFreesReadOnlyMem ensures raft will free read request from
|
// TestRaftFreesReadOnlyMem ensures raft will free read request from
|
||||||
// readOnly readIndexQueue and pendingReadIndex map.
|
// readOnly readIndexQueue and pendingReadIndex map.
|
||||||
// related issue: https://go.etcd.io/etcd/issues/7571
|
// related issue: https://github.com/etcd-io/etcd/issues/7571
|
||||||
func TestRaftFreesReadOnlyMem(t *testing.T) {
|
func TestRaftFreesReadOnlyMem(t *testing.T) {
|
||||||
sm := newTestRaft(1, []uint64{1, 2}, 5, 1, NewMemoryStorage())
|
sm := newTestRaft(1, []uint64{1, 2}, 5, 1, NewMemoryStorage())
|
||||||
sm.becomeCandidate()
|
sm.becomeCandidate()
|
||||||
|
|
|
@ -111,7 +111,7 @@ func iterateBucket(dbPath, bucket string, limit uint64, decode bool) (err error)
|
||||||
// iterate in reverse order (use First() and Next() for ascending order)
|
// iterate in reverse order (use First() and Next() for ascending order)
|
||||||
for k, v := c.Last(); k != nil; k, v = c.Prev() {
|
for k, v := c.Last(); k != nil; k, v = c.Prev() {
|
||||||
// TODO: remove sensitive information
|
// TODO: remove sensitive information
|
||||||
// (https://go.etcd.io/etcd/issues/7620)
|
// (https://github.com/etcd-io/etcd/issues/7620)
|
||||||
if dec, ok := decoders[bucket]; decode && ok {
|
if dec, ok := decoders[bucket]; decode && ok {
|
||||||
dec(k, v)
|
dec(k, v)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue