Skip to content

Commit

Permalink
Skip logging cancellations in each arm of prewarmer (#7484)
Browse files Browse the repository at this point in the history
  • Loading branch information
benaadams authored and brbrr committed Sep 25, 2024
1 parent e0c12ca commit 1b2a4c1
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ private void WarmupWithdrawals(ParallelOptions parallelOptions, IReleaseSpec spe
i = Interlocked.Increment(ref progress) - 1;
scope.WorldState.WarmUp(block.Withdrawals[i].Address);
}
catch (OperationCanceledException)
{
// Ignore
}
catch (Exception ex)
{
if (_logger.IsDebug) _logger.Error($"Error pre-warming withdrawal {i}", ex);
Expand Down Expand Up @@ -140,6 +144,10 @@ private void WarmupTransactions(ParallelOptions parallelOptions, IReleaseSpec sp
TransactionResult result = scope.TransactionProcessor.Trace(systemTransaction, new BlockExecutionContext(block.Header.Clone()), NullTxTracer.Instance);
if (_logger.IsTrace) _logger.Trace($"Finished pre-warming cache for tx[{i}] {tx.Hash} with {result}");
}
catch (OperationCanceledException)
{
// Ignore
}
catch (Exception ex)
{
if (_logger.IsDebug) _logger.Error($"Error pre-warming cache {tx?.Hash}", ex);
Expand Down Expand Up @@ -173,6 +181,10 @@ void IThreadPoolWorkItem.Execute()
using IReadOnlyTxProcessingScope scope = env.Build(StateRoot);
WarmupAddresses(parallelOptions, Block, scope);
}
catch (OperationCanceledException)
{
// Ignore
}
catch (Exception ex)
{
if (PreWarmer._logger.IsDebug) PreWarmer._logger.Error($"Error pre-warming addresses", ex);
Expand Down Expand Up @@ -215,6 +227,10 @@ private void WarmupAddresses(ParallelOptions parallelOptions, Block block, IRead
scope.WorldState.WarmUp(to);
}
}
catch (OperationCanceledException)
{
// Ignore
}
catch (Exception ex)
{
if (PreWarmer._logger.IsDebug) PreWarmer._logger.Error($"Error pre-warming addresses {i}", ex);
Expand Down

0 comments on commit 1b2a4c1

Please sign in to comment.