]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commitdiff
Re-add retired mempurge flag definitions for legacy-options-file temporary support...
authorBaptiste Lemaire <blemaire@fb.com>
Wed, 11 Aug 2021 23:04:19 +0000 (16:04 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 11 Aug 2021 23:07:30 +0000 (16:07 -0700)
Summary:
Current internal regression tests pass in an old option flag `experimental_allow_mempurge` to a more recently built db.
This flag was retired and removed in a recent PR (https://github.com/facebook/rocksdb/issues/8628), and therefore, the following error comes up : `Failed: Invalid argument: Could not find option: : experimental_allow_mempurge`.
In this PR, I reintroduce the two flags retired in https://github.com/facebook/rocksdb/issues/8628, `experimental_allow_mempurge` and `experimental_mempurge_policy` in `db_options.cc` and mark them both as `kDeprecated`.
This is a temporary fix to save us time to find a long term solution, which hopefully will consist in ignoring options prefixed with `experimental_` that are no longer recognized.

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

Reviewed By: pdillinger

Differential Revision: D30257307

Pulled By: bjlemaire

fbshipit-source-id: 35303655fd2dd9789fd9e3c450e9d8009f3c1f54

options/db_options.cc

index 3e2c8bf13e1cd5eab47740f1fe35e094e0bbc013..ee156942db062c3a3d8566561fa57f2de2b987c5 100644 (file)
@@ -192,6 +192,12 @@ static std::unordered_map<std::string, OptionTypeInfo>
          {offsetof(struct ImmutableDBOptions, error_if_exists),
           OptionType::kBoolean, OptionVerificationType::kNormal,
           OptionTypeFlags::kNone}},
+        {"experimental_allow_mempurge",
+         {0, OptionType::kBoolean, OptionVerificationType::kDeprecated,
+          OptionTypeFlags::kNone}},
+        {"experimental_mempurge_policy",
+         {0, OptionType::kString, OptionVerificationType::kDeprecated,
+          OptionTypeFlags::kNone}},
         {"experimental_mempurge_threshold",
          {offsetof(struct ImmutableDBOptions, experimental_mempurge_threshold),
           OptionType::kDouble, OptionVerificationType::kNormal,