<commit_before>## Upgrade etcd from 3.1 to 3.2

In the general case, upgrading from etcd 3.1 to 3.2 can be a zero-downtime, rolling upgrade:
 - one by one, stop the etcd v3.1 processes and replace them with etcd v3.2 processes
 - after running all v3.2 processes, new features in v3.2 are available to the cluster

Before [starting an upgrade](#upgrade-procedure), read through the rest of this guide to prepare.

### Client upgrade checklists

3.2 introduces two breaking changes.

Previously, `clientv3.Lease.TimeToLive` API returned `lease.ErrLeaseNotFound` on non-existent lease ID. 3.2 instead returns TTL=-1 in its response and no error (see [#7305](https://github.com/coreos/etcd/pull/7305)).

Before

```go
// when leaseID does not exist
resp, err := TimeToLive(ctx, leaseID)
resp == nil
err == lease.ErrLeaseNotFound
```

After

```go
// when leaseID does not exist
resp, err := TimeToLive(ctx, leaseID)
resp.TTL == -1
err == nil
```

Previously, `clientv3.Lease.KeepAlive` interface does not return error (see [#7488](https://github.com/coreos/etcd/issues/7488) and [#7732](https://github.com/coreos/etcd/pull/7732)).

Before

```go
// clientv3
type Lease interface {
    KeepAlive(ctx context.Context, id LeaseID) (<-chan *LeaseKeepAliveResponse, error)
    KeepAliveOnce(ctx context.Context, id LeaseID) (*LeaseKeepAliveResponse, error)
}
```

After

```go
// clientv3
type Lease interface {
    KeepAlive(ctx context.Context, id LeaseID) LeaseKeepAliveChan
    KeepAliveOnce(ctx context.Context, id LeaseID) LeaseKeepAliveResponse
}

// check error
for ka := range <-LeaseKeepAliveChan { ka.Err }
LeaseKeepAliveResponse.Err
```<commit_msg>Documentation/upgrades: revert KeepAlive interface change<commit_after>## Upgrade etcd from 3.1 to 3.2

In the general case, upgrading from etcd 3.1 to 3.2 can be a zero-downtime, rolling upgrade:
 - one by one, stop the etcd v3.1 processes and replace them with etcd v3.2 processes
 - after running all v3.2 processes, new features in v3.2 are available to the cluster

Before [starting an upgrade](#upgrade-procedure), read through the rest of this guide to prepare.

### Client upgrade checklists

3.2 introduces two breaking changes.

Previously, `clientv3.Lease.TimeToLive` API returned `lease.ErrLeaseNotFound` on non-existent lease ID. 3.2 instead returns TTL=-1 in its response and no error (see [#7305](https://github.com/coreos/etcd/pull/7305)).

Before

```go
// when leaseID does not exist
resp, err := TimeToLive(ctx, leaseID)
resp == nil
err == lease.ErrLeaseNotFound
```

After

```go
// when leaseID does not exist
resp, err := TimeToLive(ctx, leaseID)
resp.TTL == -1
err == nil
```
{'fraction_non_alphanumeric': 0.11169811320754718, 'fraction_numerical': 0.030566037735849056, 'mean_word_length': 4.377281947261663, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3088516', 'n_tokens_mistral': 916, 'n_tokens_neox': 845, 'n_words': 306}