Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mon,osd: track history and past_intervals for creating pgs #27696

Merged
merged 5 commits into from
Apr 24, 2019

Conversation

liewegas
Copy link
Member

@liewegas liewegas commented Apr 19, 2019

PG create messages from mons are the last case where the OSD may have to
scan an unbounded number of old maps in order to construct a valid
pg_history_t and PastIntervals. Try to avoid making that a difficult case
by maintaining those structures on the monitor.

https://trello.com/c/wselOluN/412-mon-track-pastintervals-and-history-for-creating-pgs

@xiexingguo
Copy link
Member

Does not build yet but this feature is super welcome!

Signed-off-by: Sage Weil <sage@redhat.com>
PG create messages from mons are the last case where the OSD may have to
scan an unbounded number of old maps in order to construct a valid
pg_history_t and PastIntervals.  Try to avoid making that a difficult
case by maintaining those structures on the monitor.

It is still possible that the mon may send a pg create message to the OSD
and it sits in a message queue for a very long time, but this would be a
very difficult situation to get into, and is no different from inter-OSD
messages that include history and past_intervals.

Signed-off-by: Sage Weil <sage@redhat.com>
If we get a mismatched epoch and past_intervals, error out early, or else
we'll end up asserting later in the PastIntervals code.

Signed-off-by: Sage Weil <sage@redhat.com>
@liewegas liewegas merged commit b9865ad into ceph:master Apr 24, 2019
liewegas added a commit that referenced this pull request Apr 24, 2019
* refs/pull/27696/head:
	osd: make use of pg history and past_intervals in pg_create2 messages
	mon/OSDMonitor: track history and past_intervals for creating pgs
	osd/osd_types: make PastIntervals pi_compact_rep print participants
	osd/osd_types: take bare const OSDMap * to check_new_interval
	osd/osd_types: add pg_history_t ctor that takes creation epoch+stamp

Reviewed-by: Neha Ojha <nojha@redhat.com>
@liewegas liewegas deleted the wip-pg-create-history branch February 26, 2020 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants