osd/PeeringState: drop pg_rebuild_max_secs/min_secs from the interim rebuild-stats solution
pg_rebuild_duration's avgtime (sum/avgcount) is sufficient on its own for the durability-score use case these counters were added for; the max/min-seconds counters are just supplementary statistics, not required for that calculation. Since recoverystate_perf is a single OSD-wide PerfCounters object shared by every PG shard, and the max/min update logic used a caller-side get()+compare+set() sequence that is not atomic as a whole (unlike tinc()'s true atomic accumulation for sum/avgcount), so concurrently recording PGs could race and silently lose an update to these min/max counters. These can be fixed, but is deferred until the full solution. Remove rs_pg_rebuild_max_secs/rs_pg_rebuild_min_secs (enum entries and registration), the counter updates in prepare_stats_for_publish(), and the corresponding assertions in TestPeeringState.cc. Only rs_pg_rebuild_duration remains. Fixes: https://tracker.ceph.com/issues/79028 Signed-off-by: Sridhar Seshasayee <sridhar.seshasayee@ibm.com>
S
Sridhar Seshasayee committed
2b519db7ccdf60817689b1a49fcbe24897cea44d
Parent: 6dcdaa0