}
auto &&[old_v, new_v] = pwlc_iter->second;
if (old_v == new_v) {
- if (old_v.version >= entry.version.version) {
+ if (old_v.version == eversion_t::max().version) {
+ // shard is backfilling or in async recovery, pwlc is
+ // invalid
+ ldpp_dout(dpp, 20) << __func__ << " pwlc invalid " << shard
+ << dendl;
+ } else if (old_v.version >= entry.version.version) {
// Abnormal case - consider_adjusting_pwlc may advance pwlc
// during peering because all shards have updates but these
// have not been marked complete. At the end of peering
} else if (pwlc_iter != info->partial_writes_last_complete.end()) {
auto &&[old_v, new_v] = pwlc_iter->second;
// Log updated or shard absent, partial write entry is a no-op
- if (old_v.version >= entry.version.version) {
- // Abnormal case - see above
- ldpp_dout(dpp, 20) << __func__ << " pwlc is ahead of entry " << shard
+ if (old_v.version == eversion_t::max().version) {
+ // shard is backfilling or in async recovery, pwlc is invalid
+ ldpp_dout(dpp, 20) << __func__ << " pwlc invalid " << shard
+ << dendl;
+ } else if (old_v.version >= entry.version.version) {
+ // Abnormal case - see above
+ ldpp_dout(dpp, 20) << __func__ << " pwlc is ahead of entry " << shard
<< dendl;
} else {
old_v = new_v = entry.version;
* object is deleted before we can _merge_object_divergent_entries().
*/
pg_log.skip_rollforward(&info, handler.get());
+ /* Invalidate pwlc for this shard until the next interval when
+ * it will be updated with the pwlc from another shard
+ */
+ for (auto & [shard, versionrange] :
+ info.partial_writes_last_complete) {
+ auto & [fromversion, toversion] = versionrange;
+ fromversion.epoch = 0;
+ fromversion.version = eversion_t::max().version;
+ toversion = fromversion;
+ }
}
for (auto p = logv.begin(); p != logv.end(); ++p) {