op->delta_stats = delta_stats;
op->version = at_version;
op->trim_to = trim_to;
- op->pg_committed_to = std::max(pg_committed_to, rmw_pipeline.committed_to);
+ /* We update PeeringState::pg_committed_to via the callback
+ * invoked from ECBackend::handle_sub_write_reply immediately
+ * before updating rmw_pipeline.commited_to via
+ * rmw_pipeline.check_ops()->try_finish_rmw(), so these will
+ * *usually* match. However, the PrimaryLogPG::submit_log_entries
+ * pathway can perform an out-of-band log update which updates
+ * PeeringState::pg_committed_to independently. Thus, the value
+ * passed in is the right one to use. */
+ op->pg_committed_to = pg_committed_to;
op->log_entries = log_entries;
std::swap(op->updated_hit_set_history, hset_history);
op->on_all_commit = on_all_commit;
osd_reqid_t reqid;
ZTracer::Trace trace;
- eversion_t pg_committed_to; /// Soon to be generated internally
+ /**
+ * pg_commited_to
+ *
+ * Represents a version v such that all v' < v handled by RMWPipeline
+ * have fully committed. This may actually lag
+ * PeeringState::pg_committed_to if PrimaryLogPG::submit_log_entries
+ * submits an out-of-band log update.
+ *
+ * Soon to be generated internally.
+ */
+ eversion_t pg_committed_to;
/// Ancillary also provided from submit_transaction caller
std::map<hobject_t, ObjectContextRef> obc_map;