Skip to content

Commit 597b5b3

Browse files
authored
Merge pull request ceph#57582 from sajibreadd/wip-66059
OSD: PG stat is not synchronized between osds after deep-scrub
2 parents 54e0865 + a24f3cf commit 597b5b3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/osd/PeeringState.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3033,7 +3033,9 @@ void PeeringState::proc_primary_info(
30333033
ceph_assert(!is_primary());
30343034

30353035
update_history(oinfo.history);
3036-
if (!info.stats.stats_invalid && info.stats.stats.sum.num_scrub_errors) {
3036+
bool has_scrub_error = (!info.stats.stats_invalid && info.stats.stats.sum.num_scrub_errors);
3037+
info.stats = oinfo.stats;
3038+
if (has_scrub_error) {
30373039
info.stats.stats.sum.num_scrub_errors = 0;
30383040
info.stats.stats.sum.num_shallow_scrub_errors = 0;
30393041
info.stats.stats.sum.num_deep_scrub_errors = 0;

0 commit comments

Comments
 (0)