Skip to content

Commit

Permalink
Adjust AEC vacancy notification threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
pwojcikdev committed Oct 9, 2023
1 parent d7c09e3 commit 41986ff
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion nano/node/scheduler/hinted.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@ void nano::scheduler::hinted::stop ()

void nano::scheduler::hinted::notify ()
{
condition.notify_all ();
// Avoid notifying when there is very little space inside AEC
auto const limit = active.limit (nano::election_behavior::hinted);
if (active.vacancy (nano::election_behavior::hinted) >= (limit / 5))
{
condition.notify_all ();
}
}

bool nano::scheduler::hinted::predicate () const
Expand Down

0 comments on commit 41986ff

Please sign in to comment.