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:
parent
b35a2f9146
commit
842bd2742a
@ -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));
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user