mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Documentation/upgrades: highlight wal, embed changes
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
This commit is contained in:
parent
c716bea43c
commit
b7ce6b7265
@ -67,7 +67,7 @@ See [code changes](https://github.com/coreos/etcd/compare/v3.3.0...v3.4.0) and [
|
|||||||
- Change [`wal` package function signatures](https://github.com/coreos/etcd/pull/9572) to support [structured logger and logging to file](https://github.com/coreos/etcd/issues/9438) in server-side.
|
- Change [`wal` package function signatures](https://github.com/coreos/etcd/pull/9572) to support [structured logger and logging to file](https://github.com/coreos/etcd/issues/9438) in server-side.
|
||||||
- Previously, `Open(dirpath string, snap walpb.Snapshot) (*WAL, error)`, now `Open(lg *zap.Logger, dirpath string, snap walpb.Snapshot) (*WAL, error)`.
|
- Previously, `Open(dirpath string, snap walpb.Snapshot) (*WAL, error)`, now `Open(lg *zap.Logger, dirpath string, snap walpb.Snapshot) (*WAL, error)`.
|
||||||
- Previously, `OpenForRead(dirpath string, snap walpb.Snapshot) (*WAL, error)`, now `OpenForRead(lg *zap.Logger, dirpath string, snap walpb.Snapshot) (*WAL, error)`.
|
- Previously, `OpenForRead(dirpath string, snap walpb.Snapshot) (*WAL, error)`, now `OpenForRead(lg *zap.Logger, dirpath string, snap walpb.Snapshot) (*WAL, error)`.
|
||||||
- Previously, `Repair(dirpath string) bool` now `Repair(lg *zap.Logger, dirpath string) bool`.
|
- Previously, `Repair(dirpath string) bool`, now `Repair(lg *zap.Logger, dirpath string) bool`.
|
||||||
- Previously, `Create(dirpath string, metadata []byte) (*WAL, error)`, now `Create(lg *zap.Logger, dirpath string, metadata []byte) (*WAL, error)`.
|
- Previously, `Create(dirpath string, metadata []byte) (*WAL, error)`, now `Create(lg *zap.Logger, dirpath string, metadata []byte) (*WAL, error)`.
|
||||||
- Remove [`embed.Config.SetupLogging`](https://github.com/coreos/etcd/pull/9572).
|
- Remove [`embed.Config.SetupLogging`](https://github.com/coreos/etcd/pull/9572).
|
||||||
- Now logger is set up automatically based on [`embed.Config.Logger`, `embed.Config.LogOutput`, `embed.Config.Debug` fields](https://github.com/coreos/etcd/pull/9572).
|
- Now logger is set up automatically based on [`embed.Config.Logger`, `embed.Config.LogOutput`, `embed.Config.Debug` fields](https://github.com/coreos/etcd/pull/9572).
|
||||||
|
@ -26,7 +26,7 @@ Highlighted breaking changes in 3.4.
|
|||||||
+etcd --peer-trusted-ca-file ca-peer.crt
|
+etcd --peer-trusted-ca-file ca-peer.crt
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Change in ``pkg/transport`
|
#### Change in `pkg/transport`
|
||||||
|
|
||||||
Deprecated `pkg/transport.TLSInfo.CAFile` field.
|
Deprecated `pkg/transport.TLSInfo.CAFile` field.
|
||||||
|
|
||||||
@ -45,6 +45,40 @@ if err != nil {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Change in `wal`
|
||||||
|
|
||||||
|
Changed `wal` function signatures to support structured logger.
|
||||||
|
|
||||||
|
```diff
|
||||||
|
import "github.com/coreos/etcd/wal"
|
||||||
|
+import "go.uber.org/zap"
|
||||||
|
|
||||||
|
+lg, _ = zap.NewProduction()
|
||||||
|
|
||||||
|
-wal.Open(dirpath, snap)
|
||||||
|
+wal.Open(lg, dirpath, snap)
|
||||||
|
|
||||||
|
-wal.OpenForRead(dirpath, snap)
|
||||||
|
+wal.OpenForRead(lg, dirpath, snap)
|
||||||
|
|
||||||
|
-wal.Repair(dirpath)
|
||||||
|
+wal.Repair(lg, dirpath)
|
||||||
|
|
||||||
|
-wal.Create(dirpath, metadata)
|
||||||
|
+wal.Create(lg, dirpath, metadata)
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Change in `embed.Etcd`
|
||||||
|
|
||||||
|
`embed.Config.SetupLogging` has been removed in order to prevent wrong logging configuration, and now set up automatically.
|
||||||
|
|
||||||
|
```diff
|
||||||
|
import "github.com/coreos/etcd/embed"
|
||||||
|
|
||||||
|
cfg := &embed.Config{Debug: false}
|
||||||
|
-cfg.SetupLogging()
|
||||||
|
```
|
||||||
|
|
||||||
### Server upgrade checklists
|
### Server upgrade checklists
|
||||||
|
|
||||||
#### Upgrade requirements
|
#### Upgrade requirements
|
||||||
|
Loading…
x
Reference in New Issue
Block a user