From 3b4ac8076bff9fd6a8b4ccbc37a1995d08981840 Mon Sep 17 00:00:00 2001 From: Andrew Kryczka Date: Tue, 7 Feb 2017 11:36:01 -0800 Subject: [PATCH] Clarify ldb column family argument Summary: move the argument description to the right section, make it clearer that the '=' sign is required, and use it in one subcommand where it seemed forgotten before. Closes https://github.com/facebook/rocksdb/pull/1840 Differential Revision: D4515096 Pulled By: ajkr fbshipit-source-id: 7b5b1c1 --- tools/ldb_cmd.cc | 2 +- tools/ldb_tool.cc | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/ldb_cmd.cc b/tools/ldb_cmd.cc index 39bc6621c..d8912f81d 100644 --- a/tools/ldb_cmd.cc +++ b/tools/ldb_cmd.cc @@ -1770,7 +1770,7 @@ void ChangeCompactionStyleCommand::DoCommand() { // verify compaction result files_per_level = ""; int num_files = 0; - for (int i = 0; i < db_->NumberLevels(); i++) { + for (int i = 0; i < db_->NumberLevels(GetCfHandle()); i++) { db_->GetProperty(GetCfHandle(), "rocksdb.num-files-at-level" + NumberToString(i), &property); diff --git a/tools/ldb_tool.cc b/tools/ldb_tool.cc index a2bee1d5d..291cf56a1 100644 --- a/tools/ldb_tool.cc +++ b/tools/ldb_tool.cc @@ -29,15 +29,15 @@ void LDBCommandRunner::PrintHelp(const char* exec_name) { " : Values are input/output as hex\n"); ret.append(" --" + LDBCommand::ARG_HEX + " : Both keys and values are input/output as hex\n"); - ret.append( - " --" + LDBCommand::ARG_CF_NAME + - " : name of the column family to operate on. default: default column " - "family\n"); ret.append("\n"); ret.append( "The following optional parameters control the database " "internals:\n"); + ret.append( + " --" + LDBCommand::ARG_CF_NAME + + "= : name of the column family to operate on. default: default " + "column family\n"); ret.append(" --" + LDBCommand::ARG_TTL + " with 'put','get','scan','dump','query','batchput'" " : DB supports ttl and value is internally timestamp-suffixed\n");