const hobject_t &oid,
const ObjectRecoveryInfo &recovery_info,
ObjectContextRef obc,
+ bool is_delete,
ObjectStore::Transaction *t
) = 0;
*/
virtual void on_global_recover(
const hobject_t &oid,
- const object_stat_sum_t &stat_diff
+ const object_stat_sum_t &stat_diff,
+ bool is_delete
) = 0;
/**
const hobject_t oid) = 0;
virtual void failed_push(const list<pg_shard_t> &from, const hobject_t &soid) = 0;
-
+ virtual void primary_failed(const hobject_t &soid) = 0;
+ virtual bool primary_error(const hobject_t& soid, eversion_t v) = 0;
virtual void cancel_pull(const hobject_t &soid) = 0;
virtual void apply_stats(
const hobject_t &soid,
const object_stat_sum_t &delta_stats) = 0;
+ /**
+ * Called when a read on the primary fails when pushing
+ */
+ virtual void on_primary_error(
+ const hobject_t &oid,
+ eversion_t v
+ ) = 0;
+
+ virtual void remove_missing_object(const hobject_t &oid,
+ eversion_t v,
+ Context *on_complete) = 0;
/**
* Bless a context
virtual ceph_tid_t get_tid() = 0;
virtual LogClientTemp clog_error() = 0;
+ virtual LogClientTemp clog_warn() = 0;
virtual bool check_failsafe_full(ostream &ss) = 0;
*/
struct RecoveryHandle {
bool cache_dont_need;
+ map<pg_shard_t, vector<pair<hobject_t, eversion_t> > > deletes;
RecoveryHandle(): cache_dont_need(false) {}
virtual ~RecoveryHandle() {}
int priority ///< [in] msg priority
) = 0;
+ void recover_delete_object(const hobject_t &oid, eversion_t v,
+ RecoveryHandle *h);
+ void send_recovery_deletes(int prio,
+ const map<pg_shard_t, vector<pair<hobject_t, eversion_t> > > &deletes);
+
/**
* recover_object
*
* @param missing [in] set of info, missing pairs for queried nodes
* @param overlaps [in] mapping of object to file offset overlaps
*/
- virtual void recover_object(
+ virtual int recover_object(
const hobject_t &hoid, ///< [in] object to recover
eversion_t v, ///< [in] version to recover
ObjectContextRef head, ///< [in] context of the head/snapdir object
virtual bool can_handle_while_inactive(OpRequestRef op) = 0;
/// gives PGBackend a crack at an incoming message
- virtual bool handle_message(
+ bool handle_message(
OpRequestRef op ///< [in] message received
- ) = 0; ///< @return true if the message was handled
+ ); ///< @return true if the message was handled
+
+ /// the variant of handle_message that is overridden by child classes
+ virtual bool _handle_message(OpRequestRef op) = 0;
virtual void check_recovery_sources(const OSDMapRef& osdmap) = 0;
ObjectStore::Transaction *t);
protected:
+
+ void handle_recovery_delete(OpRequestRef op);
+ void handle_recovery_delete_reply(OpRequestRef op);
+
/// Reapply old attributes
void rollback_setattrs(
const hobject_t &hoid,