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/OSDMonitor: increase last_epoch_clean's lower bound if possible #14855

Merged
merged 1 commit into from Apr 28, 2017

Conversation

Projects
None yet
3 participants
@tchaikov
Copy link
Contributor

tchaikov commented Apr 28, 2017

Signed-off-by: Kefu Chai kchai@redhat.com

mon/OSDMonitor: increase last_epoch_clean's lower bound if possible
Signed-off-by: Kefu Chai <kchai@redhat.com>

@liewegas liewegas added the needs-qa label Apr 28, 2017

// stale lec
return;
}
epoch_by_pg[ps] = last_epoch_clean;
if (last_epoch_clean < floor) {
floor = last_epoch_clean;
} else if (last_epoch_clean > floor) {
if (old_lec == floor) {

This comment has been minimized.

Copy link
@gregsfortytwo

gregsfortytwo Apr 28, 2017

Member

Probably clearer to combine these two if statements into one? As is it kinda looks like there should be a change even if old_lec != floor.

Either way, LGTM.

This comment has been minimized.

Copy link
@tchaikov

tchaikov Apr 28, 2017

Author Contributor

@gregsfortytwo actually i thought about this. but it seems that it maintains better symmetry (compares last_epoch_clean with floor) this way. and the condition clause is quite simple and small, so it is unlikely to confuse future readers.

This comment has been minimized.

Copy link
@gregsfortytwo

gregsfortytwo Apr 28, 2017

Member

else if (last_epoch_clean > floor && old_lec == floor)
Is what I meant.
But, either way.

This comment has been minimized.

Copy link
@tchaikov

tchaikov Apr 28, 2017

Author Contributor

yes, i did get you.

if (a < b) {
} else if (a > b) {
}

has better symmetry. that's what i meant.

@liewegas liewegas merged commit 11247bd into ceph:master Apr 28, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details

@tchaikov tchaikov deleted the tchaikov:wip-increase-lec branch Apr 29, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.