Skip to content

Commit

Permalink
mon: rename maybe_engage_stretch_mode to try_engage_stretch_mode
Browse files Browse the repository at this point in the history
Signed-off-by: Greg Farnum <[email protected]>
  • Loading branch information
gregsfortytwo committed Apr 13, 2021
1 parent f9e1c6b commit 596d09a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/mon/Monitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6527,7 +6527,7 @@ void Monitor::notify_new_monmap(bool can_change_external_state)
}

if (monmap->stretch_mode_enabled) {
maybe_engage_stretch_mode();
try_engage_stretch_mode();
}

if (is_stretch_mode()) {
Expand Down Expand Up @@ -6561,10 +6561,10 @@ struct CMonEnableStretchMode : public Context {
Monitor *m;
CMonEnableStretchMode(Monitor *mon) : m(mon) {}
void finish(int r) {
m->maybe_engage_stretch_mode();
m->try_engage_stretch_mode();
}
};
void Monitor::maybe_engage_stretch_mode()
void Monitor::try_engage_stretch_mode()
{
dout(20) << __func__ << dendl;
if (stretch_mode_engaged) return;
Expand Down
2 changes: 1 addition & 1 deletion src/mon/Monitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ class Monitor : public Dispatcher,
bool is_stretch_mode() { return stretch_mode_engaged; }
bool is_degraded_stretch_mode() { return degraded_stretch_mode; }
bool is_recovering_stretch_mode() { return recovering_stretch_mode; }
void maybe_engage_stretch_mode();
void try_engage_stretch_mode();
void maybe_go_degraded_stretch_mode();
void trigger_degraded_stretch_mode(const set<string>& dead_mons,
const set<int>& dead_buckets);
Expand Down
2 changes: 1 addition & 1 deletion src/mon/OSDMonitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@ void OSDMonitor::update_from_paxos(bool *need_bootstrap)
}
if (osdmap.stretch_mode_enabled) {
dout(20) << "Stretch mode enabled in this map" << dendl;
mon.maybe_engage_stretch_mode();
mon.try_engage_stretch_mode();
if (osdmap.degraded_stretch_mode) {
dout(20) << "Degraded stretch mode set in this map" << dendl;
if (!osdmap.recovering_stretch_mode) {
Expand Down

0 comments on commit 596d09a

Please sign in to comment.