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

osd: PeeringState: fix selection order in calc_replicated_acting_stretch #44518

Merged
merged 1 commit into from Jan 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/osd/PeeringState.cc
Expand Up @@ -1854,8 +1854,8 @@ class bucket_candidates_t {
}
osd_id_t pop_osd() {
ceph_assert(!is_empty());
auto ret = osds.back();
osds.pop_back();
auto ret = osds.front();
osds.pop_front();
return ret.second;
}

Expand All @@ -1864,7 +1864,7 @@ class bucket_candidates_t {

osd_ord_t get_ord() const {
return osds.empty() ? std::make_tuple(false, eversion_t())
: osds.back().first;
: osds.front().first;
}

bool is_empty() const { return osds.empty(); }
Expand Down