diff --git a/clientv3/concurrency/session.go b/clientv3/concurrency/session.go index 598ec0e4ffd5..97eb7631067d 100644 --- a/clientv3/concurrency/session.go +++ b/clientv3/concurrency/session.go @@ -47,7 +47,7 @@ func NewSession(client *v3.Client, opts ...SessionOption) (*Session, error) { if err != nil { return nil, err } - id = v3.LeaseID(resp.ID) + id = resp.ID } ctx, cancel := context.WithCancel(ops.ctx) diff --git a/clientv3/integration/lease_test.go b/clientv3/integration/lease_test.go index 9b383c6f31cd..86aff8582429 100644 --- a/clientv3/integration/lease_test.go +++ b/clientv3/integration/lease_test.go @@ -86,7 +86,7 @@ func TestLeaseRevoke(t *testing.T) { t.Errorf("failed to create lease %v", err) } - _, err = lapi.Revoke(context.Background(), clientv3.LeaseID(resp.ID)) + _, err = lapi.Revoke(context.Background(), resp.ID) if err != nil { t.Errorf("failed to revoke lease %v", err) } diff --git a/clientv3/mirror/syncer.go b/clientv3/mirror/syncer.go index e00af70ee514..a984105fe74c 100644 --- a/clientv3/mirror/syncer.go +++ b/clientv3/mirror/syncer.go @@ -90,7 +90,7 @@ func (s *syncer) SyncBase(ctx context.Context) (<-chan clientv3.GetResponse, cha return } - respchan <- (clientv3.GetResponse)(*resp) + respchan <- *resp if !resp.More { return diff --git a/clientv3/options.go b/clientv3/options.go index 4660acea067f..aceff31971ba 100644 --- a/clientv3/options.go +++ b/clientv3/options.go @@ -47,7 +47,7 @@ var ( // client-side streaming retry limit, only applied to requests where server responds with // a error code clearly indicating it was unable to process the request such as codes.Unavailable. // If set to 0, retry is disabled. - defaultStreamMaxRetries = uint(^uint(0)) // max uint + defaultStreamMaxRetries = uint(0) // max uint // client-side retry backoff wait between requests. defaultBackoffWaitBetween = 25 * time.Millisecond