dirty_to_dups,
dirty_from_dups,
write_from_dups,
- &rebuilt_missing_with_deletes,
+ &may_include_deletes_in_missing_dirty,
(pg_log_debug ? &log_keys_debug : nullptr));
undirty();
} else {
const ghobject_t &log_oid,
const pg_missing_tracker_t &missing,
bool require_rollback,
- bool *rebuilt_missing_with_deletes)
+ bool *may_include_deletes_in_missing_dirty)
{
_write_log_and_missing(
t, km, log, coll, log_oid,
eversion_t::max(),
eversion_t(),
eversion_t(),
- rebuilt_missing_with_deletes, nullptr);
+ may_include_deletes_in_missing_dirty, nullptr);
}
// static
eversion_t dirty_to_dups,
eversion_t dirty_from_dups,
eversion_t write_from_dups,
- bool *rebuilt_missing_with_deletes, // in/out param
+ bool *may_include_deletes_in_missing_dirty, // in/out param
set<string> *log_keys_debug
) {
set<string> to_remove;
}
// since we encode individual missing items instead of a whole
// missing set, we need another key to store this bit of state
- if (*rebuilt_missing_with_deletes) {
+ if (*may_include_deletes_in_missing_dirty) {
(*km)["may_include_deletes_in_missing"] = bufferlist();
- *rebuilt_missing_with_deletes = false;
+ *may_include_deletes_in_missing_dirty = false;
}
missing.get_changed(
[&](const hobject_t &obj) {
}
}
missing.clear();
- missing.may_include_deletes = true;
// go through the log and add items that are not present or older
// versions on disk, just as if we were reading the log + metadata
for (const auto& p : extra_missing) {
missing.add(p.first, p.second.need, p.second.have, p.second.is_delete());
}
- rebuilt_missing_with_deletes = true;
+
+ set_missing_may_contain_deletes();
}
/// Log is clean on [dirty_to, dirty_from)
bool touched_log;
bool clear_divergent_priors;
- bool rebuilt_missing_with_deletes = false;
+ bool may_include_deletes_in_missing_dirty = false;
void mark_dirty_to(eversion_t to) {
if (to > dirty_to)
(dirty_to_dups != eversion_t()) ||
(dirty_from_dups != eversion_t::max()) ||
(write_from_dups != eversion_t::max()) ||
- rebuilt_missing_with_deletes;
+ may_include_deletes_in_missing_dirty;
}
void mark_log_for_rewrite() {
mark_dirty_from_dups(eversion_t());
touched_log = false;
}
- bool get_rebuilt_missing_with_deletes() const {
- return rebuilt_missing_with_deletes;
+ bool get_may_include_deletes_in_missing_dirty() const {
+ return may_include_deletes_in_missing_dirty;
}
protected:
opg_log->mark_dirty_to_dups(eversion_t::max());
mark_dirty_to(eversion_t::max());
mark_dirty_to_dups(eversion_t::max());
- if (missing.may_include_deletes)
- opg_log->rebuilt_missing_with_deletes = true;
+ if (missing.may_include_deletes) {
+ opg_log->set_missing_may_contain_deletes();
+ }
}
void merge_from(
const pg_log_t &olog,
pg_missing_t& omissing, pg_shard_t from) const;
+ void set_missing_may_contain_deletes() {
+ missing.may_include_deletes = true;
+ may_include_deletes_in_missing_dirty = true;
+ }
+
void rebuild_missing_set_with_deletes(ObjectStore *store,
ObjectStore::CollectionHandle& ch,
const pg_info_t &info);
eversion_t dirty_to_dups,
eversion_t dirty_from_dups,
eversion_t write_from_dups,
- bool *rebuilt_missing_with_deletes,
+ bool *may_include_deletes_in_missing_dirty,
set<string> *log_keys_debug
);
<< get_pg_log().get_missing() << dendl;
if (!pg_log.get_missing().may_include_deletes &&
- get_osdmap()->test_flag(CEPH_OSDMAP_RECOVERY_DELETES)) {
+ !perform_deletes_during_peering()) {
pl->rebuild_missing_set_with_deletes(pg_log);
}
ceph_assert(
- pg_log.get_missing().may_include_deletes == get_osdmap()->test_flag(
- CEPH_OSDMAP_RECOVERY_DELETES));
+ pg_log.get_missing().may_include_deletes ==
+ !perform_deletes_during_peering());
pl->on_new_interval();
}
info.stats.acting_primary = new_acting_primary;
info.stats.mapping_epoch = info.history.same_interval_since;
+ if (!perform_deletes_during_peering()) {
+ pg_log.set_missing_may_contain_deletes();
+ }
+
if (backfill) {
psdout(10) << __func__ << ": Setting backfill" << dendl;
info.set_last_backfill(hobject_t());
clear();
{
- rebuilt_missing_with_deletes = false;
+ may_include_deletes_in_missing_dirty = false;
missing.may_include_deletes = true;
PGLog child_log(cct);
pg_t child_pg;
split_into(child_pg, 6, &child_log);
ASSERT_TRUE(child_log.get_missing().may_include_deletes);
- ASSERT_TRUE(child_log.get_rebuilt_missing_with_deletes());
+ ASSERT_TRUE(child_log.get_may_include_deletes_in_missing_dirty());
}
{
- rebuilt_missing_with_deletes = false;
+ may_include_deletes_in_missing_dirty = false;
missing.may_include_deletes = false;
PGLog child_log(cct);
pg_t child_pg;
split_into(child_pg, 6, &child_log);
ASSERT_FALSE(child_log.get_missing().may_include_deletes);
- ASSERT_FALSE(child_log.get_rebuilt_missing_with_deletes());
+ ASSERT_FALSE(child_log.get_may_include_deletes_in_missing_dirty());
}
}