int skip_zero_entries = false; // log show
int purge_keys = false;
int yes_i_really_mean_it = false;
+ int tech_preview = false;
int delete_child_objects = false;
int fix = false;
int remove_bad = false;
// do nothing
} else if (ceph_argparse_binary_flag(args, i, &yes_i_really_mean_it, NULL, "--yes-i-really-mean-it", (char*)NULL)) {
// do nothing
+ } else if (ceph_argparse_binary_flag(args, i, &tech_preview, NULL, "--tech-preview", (char*)NULL)) {
+ // do nothing
} else if (ceph_argparse_binary_flag(args, i, &fix, NULL, "--fix", (char*)NULL)) {
// do nothing
} else if (ceph_argparse_binary_flag(args, i, &remove_bad, NULL, "--remove-bad", (char*)NULL)) {
dedup_type = dedup_req_type_t::DEDUP_TYPE_ESTIMATE;
}
else {
+ if (!yes_i_really_mean_it) {
+ cerr << "Full Dedup is dangerous and could lead to data loss!\n"
+ << "do you really mean it? (requires --yes-i-really-mean-it)"
+ << std::endl;
+ return EINVAL;
+ }
+ if (!tech_preview) {
+ cerr << "Full Dedup is supplied as a tech-preview only and should not be used on production systems!\n"
+ << "Please acknowledge that you understand this is a tech preview (requires --tech-preview)"
+ << std::endl;
+ return EINVAL;
+ }
dedup_type = dedup_req_type_t::DEDUP_TYPE_FULL;
#ifndef FULL_DEDUP_SUPPORT
std::cerr << "Only dedup estimate is supported!" << std::endl;
#include "include/encoding.h"
#include "common/dout.h"
-//#define FULL_DEDUP_SUPPORT
+#define FULL_DEDUP_SUPPORT
namespace rgw::dedup {
using work_shard_t = uint16_t;
using md5_shard_t = uint16_t;
result = admin(['dedup', 'estimate'])
reset_full_dedup_stats(expected_dedup_stats)
else:
- result = admin(['dedup', 'restart'])
+ result = admin(['dedup', 'restart', '--yes-i-really-mean-it', '--tech-preview'])
assert result[1] == 0
log.debug("wait for dedup to complete")
global full_dedup_state_was_checked
global full_dedup_state_disabled
log.debug("check_full_dedup_state:: sending FULL Dedup request")
- result = admin(['dedup', 'restart'])
+ result = admin(['dedup', 'restart', '--yes-i-really-mean-it', '--tech-preview'])
if result[1] == 0:
- log.debug("full dedup is enabled!")
+ log.info("full dedup is enabled!")
full_dedup_state_disabled = False
result = admin(['dedup', 'abort'])
assert result[1] == 0
else:
- log.debug("full dedup is disabled, skip all full dedup tests")
+ log.info("full dedup is disabled, skip all full dedup tests")
full_dedup_state_disabled = True
full_dedup_state_was_checked = True