OPTION(bluefs_allocator, OPT_STR) // stupid | bitmap
OPTION(bluefs_preextend_wal_files, OPT_BOOL) // this *requires* that rocksdb has recycling enabled
OPTION(bluefs_replay_recovery, OPT_BOOL)
+OPTION(bluefs_replay_recovery_disable_compact, OPT_BOOL)
OPTION(bluestore_bluefs, OPT_BOOL)
OPTION(bluestore_bluefs_env_mirror, OPT_BOOL) // mirror to normal Env for debug
"This options enables heuristics that scans devices for missing data. "
"DO NOT ENABLE BY DEFAULT"),
+ Option("bluefs_replay_recovery_disable_compact", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
+ .set_default(false)
+ .set_description(""),
+
Option("bluestore_bluefs", Option::TYPE_BOOL, Option::LEVEL_DEV)
.set_default(true)
.set_flag(Option::FLAG_CREATE)
void BlueFS::compact_log()
{
- std::unique_lock l(lock);
- if (cct->_conf->bluefs_compact_log_sync) {
- _compact_log_sync();
- } else {
- _compact_log_async(l);
+ std::unique_lock<ceph::mutex> l(lock);
+ if (!cct->_conf->bluefs_replay_recovery_disable_compact) {
+ if (cct->_conf->bluefs_compact_log_sync) {
+ _compact_log_sync();
+ } else {
+ _compact_log_async(l);
+ }
}
}
dout(10) << __func__ << " done in " << (ceph_clock_now() - start) << dendl;
}
- if (!avoid_compact && _should_compact_log()) {
+ if (!avoid_compact &&
+ !cct->_conf->bluefs_replay_recovery_disable_compact &&
+ _should_compact_log()) {
if (cct->_conf->bluefs_compact_log_sync) {
_compact_log_sync();
} else {