virtual int check(std::ostream &out, bool repair = false) { return 0; }
+ virtual void compact() {}
+
typedef KeyValueDB::GenericIteratorImpl ObjectMapIteratorImpl;
typedef ceph::shared_ptr<ObjectMapIteratorImpl> ObjectMapIterator;
virtual ObjectMapIterator get_iterator(const ghobject_t &oid) {
// DEBUG
virtual void inject_data_error(const ghobject_t &oid) {}
virtual void inject_mdata_error(const ghobject_t &oid) {}
+
+ virtual void compact() {}
};
WRITE_CLASS_ENCODER(ObjectStore::Transaction)
WRITE_CLASS_ENCODER(ObjectStore::Transaction::TransactionData)
RWLock::WLocker l(debug_read_error_lock);
debug_mdata_error_objects.insert(o);
}
+ void compact() override {
+ assert(db);
+ db->compact();
+ }
+
private:
bool _debug_data_eio(const ghobject_t& o) {
if (!cct->_conf->bluestore_debug_inject_read_err) {
/// Ensure that all previous operations are durable
int sync(const ghobject_t *oid=0, const SequencerPosition *spos=0) override;
+ void compact() override {
+ assert(db);
+ db->compact();
+ }
+
/// Util, get all objects, there must be no other concurrent access
int list_objects(vector<ghobject_t> *objs ///< [out] objects
);
dout(10) << __FUNC__ << ": init error on " << oid << dendl;
mdata_error_set.insert(oid);
}
+
void FileStore::debug_obj_on_delete(const ghobject_t &oid) {
Mutex::Locker l(read_error_lock);
dout(10) << __FUNC__ << ": clear error on " << oid << dendl;
set<ghobject_t> mdata_error_set; // getattr(),stat() will return -EIO
void inject_data_error(const ghobject_t &oid) override;
void inject_mdata_error(const ghobject_t &oid) override;
+
+ void compact() override {
+ assert(object_map);
+ object_map->compact();
+ }
+
void debug_obj_on_delete(const ghobject_t &oid);
bool debug_data_eio(const ghobject_t &oid);
bool debug_mdata_eio(const ghobject_t &oid);
TrackedOpRef op = TrackedOpRef(),
ThreadPool::TPHandle *handle = NULL) override;
+ void compact () override {
+ assert(db);
+ db->compact();
+ }
+
private:
// --------------------------------------------------------
// write ops