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

luminous: mon/OSDMonitor: check creating_pgs.last_scan_epoch instead when sending creates #17257

Merged
merged 1 commit into from Aug 26, 2017

Conversation

Projects
None yet
2 participants
@tchaikov
Contributor

tchaikov commented Aug 25, 2017

backport of #17248

Fixes: http://tracker.ceph.com/issues/20785
Signed-off-by: Kefu Chai kchai@redhat.com

mon/OSDMonitor: check creating_pgs.last_scan_epoch instead when sendi…
…ng creates

we cannot be sure that the creating_pgs_by_osd_epoch is in sync with
creating_pgs.pgs even if mapping.get_epoch() is less or equal to
creating_pgs_epoch. because, 1) the access to mapping.epoch is not
protected by lock, 2) even worse, the mapping might be not finished yet
when we are trying to send pg-creates to subscribers.

so instead of comparing creating_pgs_epoch with mapping's epoch, we
should compare it with creating_pgs.last_scan_epoch. the former is
updated once the creating_pgs_by_osd_epoch is updated with the latest
mapping's epoch and creating_pgs.pgs; the latter is updated with current
osdmap's epoch when creating_pgs is being updated with the inc osd map.
if we are using a creating_pgs_epoch in sync, creating_pgs_epoch should
be creating_pgs.last_scan_epoch + 1.

Fixes: http://tracker.ceph.com/issues/20785
Signed-off-by: Kefu Chai <kchai@redhat.com>

@tchaikov tchaikov added this to the luminous milestone Aug 25, 2017

@liewegas liewegas merged commit 1715764 into ceph:luminous Aug 26, 2017

3 of 4 checks passed

make check make check failed
Details
Docs: build check OK - docs built
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details

@tchaikov tchaikov deleted the tchaikov:wip-luminous-pr-17248 branch Aug 27, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment