mon/OSDMonitor: resize oversized Lec::epoch_by_pg, after PG merging, preventing osdmap trimming#42136
Merged
tchaikov merged 1 commit intoceph:masterfrom Jul 7, 2021
Merged
Conversation
3163ddc to
b8cadf0
Compare
tchaikov
reviewed
Jul 6, 2021
tchaikov
reviewed
Jul 6, 2021
tchaikov
approved these changes
Jul 6, 2021
Contributor
tchaikov
left a comment
There was a problem hiding this comment.
just a couple nits, LGTM
b8cadf0 to
aa1a61c
Compare
tchaikov
approved these changes
Jul 6, 2021
tchaikov
requested changes
Jul 7, 2021
3 tasks
04fcebd to
f343001
Compare
Contributor
f343001 to
381ea94
Compare
After a pool has merged PGs, the epoch_by_pg accounting will refer to osdmap epochs of PGs that no longer exist. We'll never again get OSD beacons for these PGs, so the min epoch in epoch_by_pg will not advance until the mon leader has restarted. The effect of this is that osdmaps are not trimmed after a pool has undergone PG merging, until the mon leader restarts. To fix, we unconditionally resize epoch_by_pg to the pg_num of the pool during each beacon report. Fixes: https://tracker.ceph.com/issues/48212 Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
381ea94 to
cf5ea22
Compare
Contributor
Author
Contributor
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After a pool has merged PGs the epoch_by_pg accounting needs to
forget about the deleted PGs. Without this, we can never advance
l_e_c beyond that of the now deleted PGs, and osdmaps won't trim.
Fixes: https://tracker.ceph.com/issues/48212
Signed-off-by: Dan van der Ster daniel.vanderster@cern.ch