diff --git a/etcdctl/README.md b/etcdctl/README.md index d6323b5cc..53fee373a 100644 --- a/etcdctl/README.md +++ b/etcdctl/README.md @@ -647,12 +647,16 @@ The lease length of a leader defaults to 60 seconds. If a candidate is abnormall progress may be delayed by up to 60 seconds. -### COMPACTION \ +### COMPACTION [options] \ COMPACTION discards all etcd event history prior to a given revision. Since etcd uses a multiversion concurrency control model, it preserves all key updates as event history. When the event history up to some revision is no longer needed, all superseded keys may be compacted away to reclaim storage space in the etcd backend database. +#### Options + +- physical -- 'true' to wait for compaction to physically remove all old revisions + #### Return value - On success, prints the compacted revision and returns a zero exit code. diff --git a/etcdctl/ctlv3/command/compaction_command.go b/etcdctl/ctlv3/command/compaction_command.go index 9fa3f6f42..1b791b9d1 100644 --- a/etcdctl/ctlv3/command/compaction_command.go +++ b/etcdctl/ctlv3/command/compaction_command.go @@ -27,7 +27,7 @@ var compactPhysical bool // NewCompactionCommand returns the cobra command for "compaction". func NewCompactionCommand() *cobra.Command { cmd := &cobra.Command{ - Use: "compaction ", + Use: "compaction [options] ", Short: "Compacts the event history in etcd", Run: compactionCommandFunc, }