Skip to content

Commit 9a12d7f

Browse files
committed
go/oasis-node/cmd/storage: Make compact command experimental
I prefer to release this as experimental first, due to the known corner case where compacting, then syncing only little data and finally compacting once more, may at the peak of the compaction consume 2x of the database disk space.
1 parent b5bacd8 commit 9a12d7f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

go/oasis-node/cmd/storage/storage.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,14 @@ var (
6060
}
6161

6262
storageCompactCmd = &cobra.Command{
63-
Use: "compact",
63+
Use: "compact-experimental",
6464
Args: cobra.NoArgs,
65-
Short: "trigger compaction for all the databases",
66-
Long: "Optimize the storage for all the databases by doing the manual compaction",
67-
RunE: doDBCompactions,
65+
Short: "EXPERIMENTAL: trigger compaction for all consensus databases",
66+
Long: `EXPERIMENTAL: Optimize the storage for all consensus databases by manually compacting the underyling storage engines.
67+
68+
WARNING: Ensure you have at least as much of a free disk as your largest database.
69+
`,
70+
RunE: doDBCompactions,
6871
}
6972

7073
logger = logging.GetLogger("cmd/storage")

0 commit comments

Comments
 (0)