This commit actually changes the bound we're propagating. This solves
two bugs:
- Using min_last_complete_ondisk caused replicas to be two update rounds
behind rather than one
- Replicas don't actually have enough information to set
min_last_complete_ondisk on activation, so we couldn't serve replica
reads until the first write. pg_committed_to, on the other hand, is
fine as the activation last_update cannot become divergent.
Moreover, last_complete won't advance past missing objects causing
min_last_complete_ondisk to be blocked by any replica missing object.
Note that the replica read pathway seperately checks whether the target
is missing locally, so that property was not needed.
Fixes: https://tracker.ceph.com/issues/65086
Fixes: https://tracker.ceph.com/issues/65085
Signed-off-by: Samuel Just <sjust@redhat.com>
osd_op_params->mtime = msg->get_mtime();
osd_op_params->at_version = pg->get_next_version();
osd_op_params->pg_trim_to = pg->get_pg_trim_to();
- osd_op_params->pg_committed_to = pg->get_min_last_complete_ondisk();
+ osd_op_params->pg_committed_to = pg->get_pg_committed_to();
osd_op_params->last_complete = pg->get_info().last_complete;
osd_op_params->user_modify = (m == modified_by::user);
}
}
eversion_t get_min_last_complete_ondisk() const {
- return peering_state.get_min_last_complete_ondisk();
+ return peering_state.get_pg_committed_to();
+ }
+
+ eversion_t get_pg_committed_to() const {
+ return peering_state.get_pg_committed_to();
}
const pg_info_t& get_info() const final {
if (info.last_epoch_started < activation_epoch) {
info.last_epoch_started = activation_epoch;
info.last_interval_started = info.history.same_interval_since;
+
+ // updating last_epoch_started ensures that last_update will not
+ // become divergent after activation completes.
+ pg_committed_to = info.last_update;
}
}
ctx->at_version,
std::move(ctx->op_t),
recovery_state.get_pg_trim_to(),
- recovery_state.get_min_last_complete_ondisk(),
+ recovery_state.get_pg_committed_to(),
std::move(ctx->log),
ctx->updated_hset_history,
on_all_commit,