Browse Source

etcdctlv3: updated compaction options

sharat 9 years ago
parent
commit
5fa233a564
2 changed files with 6 additions and 2 deletions
  1. 5 1
      etcdctl/README.md
  2. 1 1
      etcdctl/ctlv3/command/compaction_command.go

+ 5 - 1
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.
 progress may be delayed by up to 60 seconds.
 
 
 
 
-### COMPACTION \<revision\>
+### COMPACTION [options] \<revision\>
 
 
 COMPACTION discards all etcd event history prior to a given revision. Since etcd uses a multiversion concurrency control
 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,
 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.
 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
 #### Return value
 
 
 - On success, prints the compacted revision and returns a zero exit code.
 - On success, prints the compacted revision and returns a zero exit code.

+ 1 - 1
etcdctl/ctlv3/command/compaction_command.go

@@ -27,7 +27,7 @@ var compactPhysical bool
 // NewCompactionCommand returns the cobra command for "compaction".
 // NewCompactionCommand returns the cobra command for "compaction".
 func NewCompactionCommand() *cobra.Command {
 func NewCompactionCommand() *cobra.Command {
 	cmd := &cobra.Command{
 	cmd := &cobra.Command{
-		Use:   "compaction <revision>",
+		Use:   "compaction [options] <revision>",
 		Short: "Compacts the event history in etcd",
 		Short: "Compacts the event history in etcd",
 		Run:   compactionCommandFunc,
 		Run:   compactionCommandFunc,
 	}
 	}