PeeringState::proc_replica_log needs to apply pwlc before
calling PGLog so that any partial writes that have occurred
are taken into account when working out where a replica/stray
has diverged from the primary.
Signed-off-by: Bill Scales <bill_scales@uk.ibm.com>
void PeeringState::proc_replica_log(
pg_info_t &oinfo,
- const pg_log_t &olog,
+ pg_log_t &olog,
pg_missing_t&& omissing,
pg_shard_t from)
{
psdout(10) << "proc_replica_log for osd." << from << ": "
<< oinfo << " " << olog << " " << omissing << dendl;
+ if (info.partial_writes_last_complete.contains(from.shard)) {
+ apply_pwlc(info.partial_writes_last_complete[from.shard], from, oinfo,
+ &olog);
+ }
pg_log.proc_replica_log(oinfo, olog, omissing, from, pool.info.allows_ecoptimizations());
peer_info[from] = oinfo;
void proc_master_log(ObjectStore::Transaction& t, pg_info_t &oinfo,
pg_log_t&& olog, pg_missing_t&& omissing,
pg_shard_t from);
- void proc_replica_log(pg_info_t &oinfo, const pg_log_t &olog,
+ void proc_replica_log(pg_info_t &oinfo, pg_log_t &olog,
pg_missing_t&& omissing, pg_shard_t from);
void calc_min_last_complete_ondisk();