Running ./ldb without any extra arg print usage (#7107)

Summary:
as title.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/7107

Test Plan: make ldb && ./ldb

Reviewed By: pdillinger

Differential Revision: D22451399

Pulled By: riversand963

fbshipit-source-id: 797645e06473bb9cf139c533877e5161281515e8
This commit is contained in:
Yanqin Jin 2020-07-09 10:18:52 -07:00 committed by Facebook GitHub Bot
parent b35a2f9146
commit 842bd2742a
2 changed files with 5 additions and 2 deletions

View File

@ -464,7 +464,7 @@ Status StressTest::NewTxn(WriteOptions& write_opts, Transaction** txn) {
}
static std::atomic<uint64_t> txn_id = {0};
TransactionOptions txn_options;
txn_options.lock_timeout = 60000; // 1min
txn_options.lock_timeout = 60000; // 1min
txn_options.deadlock_detect = true;
*txn = txn_db_->BeginTransaction(write_opts, txn_options);
auto istr = std::to_string(txn_id.fetch_add(1));

View File

@ -107,7 +107,10 @@ int LDBCommandRunner::RunCommand(
const LDBOptions& ldb_options,
const std::vector<ColumnFamilyDescriptor>* column_families) {
if (argc <= 2) {
if (std::string(argv[1]) == "--version") {
if (argc <= 1) {
PrintHelp(ldb_options, argv[0], /*to_stderr*/ true);
return 1;
} else if (std::string(argv[1]) == "--version") {
printf("ldb from RocksDB %d.%d.%d\n", ROCKSDB_MAJOR, ROCKSDB_MINOR,
ROCKSDB_PATCH);
return 0;