std::vector<pg_log_entry_t>&& log_entries) = 0;
friend class ReplicatedRecoveryBackend;
friend class ::crimson::osd::PG;
+
+protected:
+ boost::container::flat_set<hobject_t> temp_contents;
+
+ template <class... Args>
+ void add_temp_obj(Args&&... args) {
+ temp_contents.insert(std::forward<Args>(args)...);
+ }
+ void clear_temp_obj(const hobject_t &oid) {
+ temp_contents.erase(oid);
+ }
+ template <class T>
+ void clear_temp_objs(const T &cont) {
+ for (const auto& oid : cont) {
+ clear_temp_obj(oid);
+ }
+ }
+ friend class RecoveryBackend;
};
return hoid;
}
+void RecoveryBackend::add_temp_obj(const hobject_t &oid)
+{
+ backend->add_temp_obj(oid);
+}
+
+void RecoveryBackend::clear_temp_obj(const hobject_t &oid)
+{
+ backend->clear_temp_obj(oid);
+}
+
void RecoveryBackend::clean_up(ceph::os::Transaction& t,
std::string_view why)
{
boost::container::flat_set<hobject_t> temp_contents;
- void add_temp_obj(const hobject_t &oid) {
- temp_contents.insert(oid);
- }
- void clear_temp_obj(const hobject_t &oid) {
- temp_contents.erase(oid);
- }
+ void add_temp_obj(const hobject_t &oid);
+ void clear_temp_obj(const hobject_t &oid);
+
void clean_up(ceph::os::Transaction& t, std::string_view why);
virtual seastar::future<> on_stop() = 0;
private: