From a53563d86ec6cca1b60e58e0444d2beda99c689e Mon Sep 17 00:00:00 2001 From: Baptiste Lemaire Date: Wed, 11 Aug 2021 16:04:19 -0700 Subject: [PATCH] Re-add retired mempurge flag definitions for legacy-options-file temporary support. (#8650) 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 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/options/db_options.cc b/options/db_options.cc index 3e2c8bf13..ee156942d 100644 --- a/options/db_options.cc +++ b/options/db_options.cc @@ -192,6 +192,12 @@ static std::unordered_map {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,