diff --git a/HISTORY.md b/HISTORY.md index 233f5f1b1..40430a59d 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -9,6 +9,7 @@ * Transaction::GetForUpdate is extended with a do_validate parameter with default value of true. If false it skips validating the snapshot before doing the read. Similarly ::Merge, ::Put, ::Delete, and ::SingleDelete are extended with assume_tracked with default value of false. If true it indicates that call is assumed to be after a ::GetForUpdate. * `TableProperties::num_entries` and `TableProperties::num_deletions` now also account for number of range tombstones. * Remove geodb, spatial_db, document_db, json_document, date_tiered_db, and redis_lists. +* With "ldb ----try_load_options", when wal_dir specified by the option file doesn't exist, ignore it. ### Bug Fixes * Fix a deadlock caused by compaction and file ingestion waiting for each other in the event of write stalls. diff --git a/tools/ldb_cmd.cc b/tools/ldb_cmd.cc index abd8ec1e8..350832937 100644 --- a/tools/ldb_cmd.cc +++ b/tools/ldb_cmd.cc @@ -332,6 +332,12 @@ void LDBCommand::OpenDB() { db_ = nullptr; return; } + if (options_.env->FileExists(options_.wal_dir).IsNotFound()) { + options_.wal_dir = db_path_; + fprintf( + stderr, + "wal_dir loaded from the option file doesn't exist. Ignore it.\n"); + } } options_ = PrepareOptionsForOpenDB(); if (!exec_state_.IsNotStarted()) {