Skip to content

Commit a6db252

Browse files
authored
Merge pull request ceph#60686 from zhsgao/mds_bal_overload_epochs
mds: fix option mds_bal_overload_epochs Reviewed-by: Venky Shankar <[email protected]>
2 parents a3cc16a + 2f4a6b8 commit a6db252

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/mds/MDBalancer.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -830,8 +830,9 @@ void MDBalancer::prep_rebalance(int beat)
830830
dout(7) << " i am underloaded or barely overloaded, doing nothing." << dendl;
831831
return;
832832
}
833+
auto overload_epochs = g_conf().get_val<int64_t>("mds_bal_overload_epochs");
833834
// am i over long enough?
834-
if (last_epoch_under && beat_epoch - last_epoch_under < g_conf()->mds_bal_overload_epochs) {
835+
if (last_epoch_under && beat_epoch - last_epoch_under < overload_epochs) {
835836
dout(7) << " i am overloaded, but only for " << (beat_epoch - last_epoch_under) << " epochs" << dendl;
836837
return;
837838
}
@@ -854,7 +855,7 @@ void MDBalancer::prep_rebalance(int beat)
854855
importer_set.insert(it->second);
855856
} else {
856857
int mds_last_epoch_under = mds_last_epoch_under_map[it->second];
857-
if (!(mds_last_epoch_under && beat_epoch - mds_last_epoch_under < 2)) {
858+
if (!(mds_last_epoch_under && beat_epoch - mds_last_epoch_under < overload_epochs)) {
858859
dout(15) << " mds." << it->second << " is exporter" << dendl;
859860
exporters.insert(pair<double,mds_rank_t>(it->first,it->second));
860861
exporter_set.insert(it->second);

0 commit comments

Comments
 (0)