Periodically refresh read transaction in backlog_population (#4329)
This commit is contained in:
parent
c774654dc6
commit
94d44c10f5
1 changed files with 2 additions and 0 deletions
|
|
@ -95,6 +95,8 @@ void nano::backlog_population::populate_backlog (nano::unique_lock<nano::mutex>
|
||||||
auto const end = store.account.end ();
|
auto const end = store.account.end ();
|
||||||
for (; i != end && count < chunk_size; ++i, ++count, ++total)
|
for (; i != end && count < chunk_size; ++i, ++count, ++total)
|
||||||
{
|
{
|
||||||
|
transaction.refresh_if_needed ();
|
||||||
|
|
||||||
stats.inc (nano::stat::type::backlog, nano::stat::detail::total);
|
stats.inc (nano::stat::type::backlog, nano::stat::detail::total);
|
||||||
|
|
||||||
auto const & account = i->first;
|
auto const & account = i->first;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue