Bug #80360
closedpwlc is able to retain values larger than the last_update in proc_replica_log
0%
Description
In certain scenarios during peering, it was possible for us to tell other nodes they needed to roll back their last update when we have divergent entries. PGLog::proc_replica_log is one of these places where we merge divergent entries and potentially roll back the last update, however what we do not do when we do this is modify the pwlc in like we do in proc_master_log when this happens. Because of this, this means we have the potential to have a pwlc with a newer version in it than the agreed upon latest update, which it is then possible to be propogated out to non-primary shards causing each of those shards to assert as I saw in my local test. I've put together this fix which limits the the value of proc_master_log after deciding on a new value for last_update.
Below is the summary of the timeline where I observed this:
- (osd.1, shard 0) 45.472 write (tid=15010, 0~4096) started on primary, which would be 536’12007 (and two more which would be 536’12009)
- (osd.1, shard 0) 45.501 new peering interval started
- (osd.1, shard 0) 45.502 write (tid=15010) cancelled
- (osd.1, shard 0) 48.668 rollback pwlc for shard 1 to 536'12006,536'12006
- (osd.1, shard 0) 48.668 rollback pwlc for shard 2 to 536'12006,536'12006
- (osd.1, shard 0) 48.668 rollback pwlc for shard 3 to 536'12006,536'12006
- (osd.1, shard 0) 48.680 rollback pg from 536’12008 to 536’12006
- (osd.1, shard 0) 48.710 GetMissing::react(MLogRec) received from osd.4, containing info version log((532'11853,536'12008], crt=536'12003)
- (osd.1, shard 0) 48.713 _merge_object_divergent_entries determines that rollback to 536’12006 is possible for osd.4 and sets in memory copy of osd.4’s last update to 536’12006
- (osd.1, shard 0) 48.714 update_peer_info sets pwlc to 536’12008 on the current shard using the pwlc of the incoming shard
- (osd.0, shard 3) 52.742 Stray::react(MLogRec) received, containing info version 536’12006
- (osd.0, shard 3) 52.748 apply_pwlc, setting last_update and last_complete from 536’12006 to 536’12008
- (osd.2, shard 1) 52.759 Stray::react(MLogRec) received, containing info version 536’12006
- (osd.2, shard 1) 52.759 apply_pwlc, setting last_update and last_complete from 536’11854 to 536’12008
- (osd.2, shard 1) 52.765 apply_pwlc, setting last_update and last_complete from 536’12006 to 536’12008
- (osd.3, shard 2) 52.858 Stray::react(MLogRec) received, containing info version 536’12006
- (osd.3, shard 2) 52.865 apply_pwlc, setting last_update and last_complete from 536’12006 to 536’12008
- (osd.1, shard 0) 53.398 write (tid=15013, 0~4096) started on primary, will be version 544’12007
- (osd.1, shard 0) 53.400 cache_ready creates Transactions for ALL shards because first_write_in_interval is true, so non-primaries get sent a transaction which includes a setattr for the OI and nothing else
- (osd.0, shard 3) 53.401 dequeue_op tid=15013
- (osd.3, shard 2) 53.401 dequeue_op tid=15013
- (osd.2, shard 1) 53.401 dequeue_op tid=15013
- (osd.0, shard 3) 53.452 Assert on osd.0 when trying to append log at version 544’12007
- (osd.2, shard 1) 53.454 Assert on osd.2 when trying to append log at version 544’12007
- (osd.3, shard 2) 53.456 Assert on osd.3 when trying to append log at version 544’12007
A fix for this has been created here: https://github.com/ceph/ceph/pull/71579
JB Updated by Jonathan Bailey 3 months ago
- Status changed from New to In Progress
RZ Updated by Radoslaw Zarzynski 3 months ago
- Status changed from In Progress to Fix Under Review
LF Updated by Laura Flores 3 months ago
PR needs a re-review.
LF Updated by Laura Flores 2 months ago
- Status changed from Fix Under Review to Resolved
UB Updated by Upkeep Bot 2 months ago
- Merge Commit set to 221a920584e4d319d2b66b6f014735db6acc11a5
- Fixed In set to v21.3.0-3590-g221a920584
- Upkeep Timestamp set to 2026-09-23T22:17:24+00:00
JB Updated by Jonathan Bailey 2 months ago
- Status changed from Resolved to Pending Backport
- Backport set to umbrella , tentacle
JB Updated by Jonathan Bailey 2 months ago
- Backport changed from umbrella , tentacle to umbrella,tentacle
UB Updated by Upkeep Bot 2 months ago
- Copied to Backport #81111: tentacle: pwlc is able to retain values larger than the last_update in proc_replica_log added
UB Updated by Upkeep Bot 2 months ago
- Copied to Backport #81112: umbrella: pwlc is able to retain values larger than the last_update in proc_replica_log added
UB Updated by Upkeep Bot 2 months ago
- Status changed from Pending Backport to Backporting
- Upkeep Timestamp changed from 2026-09-23T22:17:24+00:00 to 2026-09-29T12:30:15+00:00