Skip to content

Commit

Permalink
#1934: Update trimming condition to avoid unnecessary operations
Browse files Browse the repository at this point in the history
  • Loading branch information
thearusable committed Nov 7, 2023
1 parent 10b94da commit bdb2791
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vt/vrt/collection/balance/node_lb_data.cc
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ void NodeLBData::startIterCleanup(PhaseType phase) {

void NodeLBData::trimLBDataHistory() {
auto trim_data = [this](auto& map){
if(map.size() >= min_hist_lb_data_) {
if(map.size() > min_hist_lb_data_) {
auto target = map.upper_bound(map.rbegin()->first - min_hist_lb_data_);
map.erase(map.begin(), target);
}
Expand Down

0 comments on commit bdb2791

Please sign in to comment.