public:
MapCacher(StoreDriver<K, V> *driver) : driver(driver) {}
+ void reset() {
+ in_progress.reset();
+ }
+
/// Fetch first key/value std::pair after specified key
int get_next(
K key, ///< [in] key after which to get next
#include <map>
#include <memory>
#include "common/ceph_mutex.h"
+#include "include/ceph_assert.h"
/**
* Provides a registry of shared_ptr<V> indexed by K while
waiting(0)
{}
+ void reset() {
+ ceph_assert(!waiting);
+ contents.clear();
+ }
+
bool empty() {
std::lock_guard l(lock);
return contents.empty();
// is save and in time.
peering_state.state_clear(PG_STATE_SNAPTRIM);
peering_state.state_clear(PG_STATE_SNAPTRIM_ERROR);
+ snap_mapper.reset_backend();
}
void PG::context_registry_on_change() {
return prefix_itr;
}
+ /// reset the MapCacher backend, this should be called on pg interval change
+ void reset_backend() {
+ backend.reset();
+ }
+
/// Update snaps for oid, empty new_snaps removes the mapping
int update_snaps(
const hobject_t &oid, ///< [in] oid to update