OPTION(objecter_inflight_ops, OPT_U64, 1024) // max in-flight ios
OPTION(objecter_completion_locks_per_session, OPT_U64, 32) // num of completion locks per each session, for serializing same object responses
OPTION(objecter_inject_no_watch_ping, OPT_BOOL, false) // suppress watch pings
+OPTION(objecter_retry_writes_after_first_reply, OPT_BOOL, false) // ignore the first reply for each write, and resend the osd op instead
// Max number of deletes at once in a single Filer::purge call
OPTION(filer_max_purge_ops, OPT_U32, 10)
<< dendl;
Op *op = iter->second;
+ if (retry_writes_after_first_reply && op->attempts == 1 &&
+ (op->target.flags & CEPH_OSD_FLAG_WRITE)) {
+ ldout(cct, 7) << "retrying write after first reply: " << tid << dendl;
+ if (op->onack) {
+ num_unacked.dec();
+ }
+ if (op->oncommit || op->oncommit_sync) {
+ num_uncommitted.dec();
+ }
+ _session_op_remove(s, op);
+ sl.unlock();
+ put_session(s);
+
+ _op_submit(op, sul, NULL);
+ m->put();
+ return;
+ }
+
if (m->get_retry_attempt() >= 0) {
if (m->get_retry_attempt() != (op->attempts - 1)) {
ldout(cct, 7) << " ignoring reply from attempt "
op_throttle_bytes(cct, "objecter_bytes",
cct->_conf->objecter_inflight_op_bytes),
op_throttle_ops(cct, "objecter_ops", cct->_conf->objecter_inflight_ops),
- epoch_barrier(0)
+ epoch_barrier(0),
+ retry_writes_after_first_reply(cct->_conf->objecter_retry_writes_after_first_reply)
{ }
~Objecter();
private:
epoch_t epoch_barrier;
+ bool retry_writes_after_first_reply;
public:
void set_epoch_barrier(epoch_t epoch);
};